public inbox for [email protected]
help / color / mirror / Atom feedFrom: Marcos Pegoraro <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Date: Mon, 8 Jun 2026 16:11:05 -0300
Message-ID: <CAB-JLwZXk95KnOs57fe2d7zaOYf5aAAY2kVF5U7cXYXJmZ9jBg@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcxmXNHNyPt5v+LaBJVJmyt=j95D7TDE9SepoM7y15t-w@mail.gmail.com>
References: <CANxoLDfjQnhM=E6JSyYo9s9OdjqoN8s_3wE5yL=kaDu_X8j-dA@mail.gmail.com>
<CANxoLDcxmXNHNyPt5v+LaBJVJmyt=j95D7TDE9SepoM7y15t-w@mail.gmail.com>
Em seg., 8 de jun. de 2026 às 08:30, Akshay Joshi <
[email protected]> escreveu:
> Hi Hackers,
>
> Attached is the v2 patch, which fixes the Meson build failure, and the
> rebased patch.
>
Would be good to have an option "schema-qualified" boolean, because
sometimes I don't want a schema-qualified result.
Suppose you are duplicating a schema, the way your did you cannot do
something like this to have a complete script to generate a new schema
select 'create schema new_schema;' union all
select 'set search_path to new_schema, public;' union all
select string_agg(pg_get_table_ddl(oid),',') from pg_class where
relnamespace::regnamespace::text = 'old_schema' and relkind = 'r';
regards
Marcos
view thread (54+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
In-Reply-To: <CAB-JLwZXk95KnOs57fe2d7zaOYf5aAAY2kVF5U7cXYXJmZ9jBg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox