mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add more tests for reloptions
This is preparation for a future patch to extensively change how reloptions work. Author: Nikolay Shaplov Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/2615372.orqtEn8VGB@x200m
This commit is contained in:
@ -210,3 +210,20 @@ ORDER BY 1;
|
||||
text_ops | t
|
||||
(2 rows)
|
||||
|
||||
--
|
||||
-- relation options
|
||||
--
|
||||
DROP INDEX bloomidx;
|
||||
CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (length=7, col1=4);
|
||||
SELECT reloptions FROM pg_class WHERE oid = 'bloomidx'::regclass;
|
||||
reloptions
|
||||
-------------------
|
||||
{length=7,col1=4}
|
||||
(1 row)
|
||||
|
||||
-- check for min and max values
|
||||
\set VERBOSITY terse
|
||||
CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (length=0);
|
||||
ERROR: value 0 out of bounds for option "length"
|
||||
CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (col1=0);
|
||||
ERROR: value 0 out of bounds for option "col1"
|
||||
|
@ -81,3 +81,14 @@ SELECT opcname, amvalidate(opc.oid)
|
||||
FROM pg_opclass opc JOIN pg_am am ON am.oid = opcmethod
|
||||
WHERE amname = 'bloom'
|
||||
ORDER BY 1;
|
||||
|
||||
--
|
||||
-- relation options
|
||||
--
|
||||
DROP INDEX bloomidx;
|
||||
CREATE INDEX bloomidx ON tst USING bloom (i, t) WITH (length=7, col1=4);
|
||||
SELECT reloptions FROM pg_class WHERE oid = 'bloomidx'::regclass;
|
||||
-- check for min and max values
|
||||
\set VERBOSITY terse
|
||||
CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (length=0);
|
||||
CREATE INDEX bloomidx2 ON tst USING bloom (i, t) WITH (col1=0);
|
||||
|
Reference in New Issue
Block a user