Re: Retail DDL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Retail DDL
Date: 2025-07-25 13:35:11
Message-ID: 1857472.1753450511@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:
> Reproducing a table might need multiple commands. Do you intend to
> return a single string containing multiple semicolon-separated commands,
> or are you thinking in a RETURNS SETOF where each row contains a single
> command?

In the same vein: would we expect this command to also build the
table's indexes? What about foreign key constraints, which might
well reference tables that don't exist yet?

Once you start crawling down this rabbit-hole, you soon realize
why pg_dump is as complicated as it is.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidar Imamov 2025-07-25 13:37:48 Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table
Previous Message Bertrand Drouvot 2025-07-25 12:58:34 Re: Add os_page_num to pg_buffercache