You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
postgres=# CREATE TABLE tsts (id int, t tsvector, d timestamp);
CREATE TABLE
postgres=# \copy tsts from '/rum/data/tsts.data'
COPY 508
postgres=# CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d);
CREATE INDEX
postgres=# 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 WHERE clause
postgres=# DROP INDEX tsts_idx;
DROP INDEX
postgres=# 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;
id | d | ?column?
-----+----------------------------+---------------
355 | 2016-05-16 14:21:22.326724 | 2.673276
354 | 2016-05-16 13:21:22.326724 | 3602.673276
371 | 2016-05-17 06:21:22.326724 | 57597.326724
406 | 2016-05-18 17:21:22.326724 | 183597.326724
415 | 2016-05-19 02:21:22.326724 | 215997.326724
(5 rows)
The text was updated successfully, but these errors were encountered:
Use postgres REL_12_STABLE branch
postgres=# CREATE TABLE tsts (id int, t tsvector, d timestamp);
CREATE TABLE
postgres=# \copy tsts from '/rum/data/tsts.data'
COPY 508
postgres=# CREATE INDEX tsts_idx ON tsts USING rum (t rum_tsvector_addon_ops, d);
CREATE INDEX
postgres=# 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 WHERE clause
postgres=# DROP INDEX tsts_idx;
DROP INDEX
postgres=# 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;
id | d | ?column?
-----+----------------------------+---------------
355 | 2016-05-16 14:21:22.326724 | 2.673276
354 | 2016-05-16 13:21:22.326724 | 3602.673276
371 | 2016-05-17 06:21:22.326724 | 57597.326724
406 | 2016-05-18 17:21:22.326724 | 183597.326724
415 | 2016-05-19 02:21:22.326724 | 215997.326724
(5 rows)
The text was updated successfully, but these errors were encountered: