Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PGPRO-11393] Fixed the content of the error message#133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sokolcati merged 2 commits intopostgrespro:masterfromarseny114:PGPRO-11393
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletionsexpected/orderby.out
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -460,6 +460,11 @@ SELECT id, d FROM tsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER
458 | Fri May 20 21:21:22.326724 2016
(3 rows)

-- Test "ORDER BY" error message
DROP INDEX tsts_idx;
CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d);
SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;
ERROR: cannot order without attribute 2 in ORDER BY clause
-- Test multicolumn index
RESET enable_indexscan;
RESET enable_indexonlyscan;
Expand Down
7 changes: 7 additions & 0 deletionssql/orderby.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,6 +95,13 @@ SELECT id, d FROM tsts WHERE t @@ 'wr&qh' AND d <= '2016-05-16 14:21:25' ORDER
SELECT id, d FROM tsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d ASC LIMIT 3;
SELECT id, d FROM tsts WHERE t @@ 'wr&qh' AND d >= '2016-05-16 14:21:25' ORDER BY d DESC LIMIT 3;

-- Test "ORDER BY" error message
DROP INDEX tsts_idx;

CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d);

SELECT id, d, d <=> '2016-05-16 14:21:25' FROM tsts WHERE t @@ 'wr&qh' ORDER BY d <=> '2016-05-16 14:21:25' LIMIT 5;

-- Test multicolumn index

RESET enable_indexscan;
Expand Down
2 changes: 1 addition & 1 deletionsrc/rumscan.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -214,7 +214,7 @@ rumFillScanKey(RumScanOpaque so, OffsetNumber attnum,
}

if (scanKey == NULL)
elog(ERROR, "cannot order without attribute %d inWHERE clause",
elog(ERROR, "cannot order without attribute %d inORDER BY clause",
key->attnum);
else if (scanKey->nentries > 1)
elog(ERROR, "scan key should contain only one value");
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp