mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-23 23:07:15 +08:00
psql: Add option for procedures to \df
This commit is contained in:
@ -11,14 +11,20 @@ AS $$
|
||||
INSERT INTO cp_test VALUES (1, x);
|
||||
$$;
|
||||
|
||||
\df ptest1
|
||||
SELECT pg_get_functiondef('ptest1'::regproc);
|
||||
|
||||
-- show only normal functions
|
||||
\dfn public.*test*1
|
||||
|
||||
-- show only procedures
|
||||
\dfp public.*test*1
|
||||
|
||||
SELECT ptest1('x'); -- error
|
||||
CALL ptest1('a'); -- ok
|
||||
CALL ptest1('xy' || 'zzy'); -- ok, constant-folded arg
|
||||
CALL ptest1(substring(random()::numeric(20,15)::text, 1, 1)); -- ok, volatile arg
|
||||
|
||||
\df ptest1
|
||||
SELECT pg_get_functiondef('ptest1'::regproc);
|
||||
|
||||
SELECT * FROM cp_test ORDER BY b COLLATE "C";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user