mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
COMMENT ON ACCESS METHOD was missing; add it, along psql tab-completion support for it. psql was also missing a way to list existing access methods; the new \dA command does that. Also add tab-completion support for DROP ACCESS METHOD. Author: Michael Paquier Discussion: https://www.postgresql.org/message-id/CAB7nPqTzdZdu8J7EF8SXr_R2U5bSUUYNOT3oAWBZdEoggnwhGA@mail.gmail.com
21 lines
505 B
SQL
21 lines
505 B
SQL
CREATE OR REPLACE FUNCTION blhandler(internal)
|
|
RETURNS index_am_handler
|
|
AS 'MODULE_PATHNAME'
|
|
LANGUAGE C;
|
|
|
|
-- Access method
|
|
CREATE ACCESS METHOD bloom TYPE INDEX HANDLER blhandler;
|
|
COMMENT ON ACCESS METHOD bloom IS 'bloom index access method';
|
|
|
|
-- Opclasses
|
|
|
|
CREATE OPERATOR CLASS int4_ops
|
|
DEFAULT FOR TYPE int4 USING bloom AS
|
|
OPERATOR 1 =(int4, int4),
|
|
FUNCTION 1 hashint4(int4);
|
|
|
|
CREATE OPERATOR CLASS text_ops
|
|
DEFAULT FOR TYPE text USING bloom AS
|
|
OPERATOR 1 =(text, text),
|
|
FUNCTION 1 hashtext(text);
|