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

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 deletions 5 expected/orderby.out
Original file line number Diff line number Diff 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 deletions 7 sql/orderby.sql
Original file line number Diff line number Diff 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 deletion 2 src/rumscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ rumFillScanKey(RumScanOpaque so, OffsetNumber attnum,
}

if (scanKey == NULL)
elog(ERROR, "cannot order without attribute %d in WHERE clause",
elog(ERROR, "cannot order without attribute %d in ORDER BY clause",
key->attnum);
else if (scanKey->nentries > 1)
elog(ERROR, "scan key should contain only one value");
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.