Em seg., 20 de jul. de 2026 às 13:01, Philip Alger <[email protected]>
escreveu:

> I am not sure I understand. Could you provide an example, please? Thanks.
>

This patch [1] defines pg_get_table_ddl and you can see that it uses your
function to describe the structure of a table.

+        Note that <literal>trigger</literal> and <literal>policy</literal>
+        are accepted in the vocabulary but currently produce no output;
+        they are reserved for future use when standalone
+        <function>pg_get_trigger_ddl</function> and
+        <function>pg_get_policy_ddl</function> helpers become available.

So it results in something like
select pg_get_table_ddl('sch1.x'::regclass, schema_qualified => false)
CREATE TABLE x(...)
ALTER TABLE x...
CREATE CONSTRAINT yyy on x ...
CREATE INDEX idx on x...
CREATE TRIGGER ... --This one will use your function

Therefore, all results will be displayed with or without the schema name,
but the parts of the result that create the trigger will always have ?

1 -
https://www.postgresql.org/message-id/flat/CAN4CZFMYt2Q%2BntUm3Ywf-Yd22e3_HdA04TyBF4cw5o4kbDy2Kg%40mail.gmail.com#856fcec5f906a42202e1796aec6a72dc

regards
Marcos

Reply via email to