Re: In-order pg_dump (or in-order COPY TO) - Mailing list pgsql-general

From Tom Lane
Subject Re: In-order pg_dump (or in-order COPY TO)
Date
Msg-id 1392027.1756305777@sss.pgh.pa.us
Whole thread Raw
In response to Re: In-order pg_dump (or in-order COPY TO)  (Ron Johnson <ronljohnsonjr@gmail.com>)
Responses Re: In-order pg_dump (or in-order COPY TO)
List pgsql-general
Ron Johnson <ronljohnsonjr@gmail.com> writes:
> On Wed, Aug 27, 2025 at 10:16 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Don't use --format=custom (and not -v either).  That causes pg_dump to
>> include the OIDs and pg_dump object IDs of all the tables and other
>> objects,

> That's interesting.  Why?  (Since isn't it supposed to be Bad to rely on
> OIDs?)

-v in a text-format dump includes that data for debugging purposes:

--
-- TOC entry 1401 (class 1255 OID 16499)
-- Name: fipshash(text); Type: FUNCTION; Schema: public; Owner: postgres
--

(The "TOC entry" comment line wouldn't be there without -v.)
Then custom format has to store the same info so that pg_restore
can produce this identical text output on demand.

Yeah, this is all pretty historical, but nobody wants to change it
at this point.

            regards, tom lane



pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)
Next
From: Ron Johnson
Date:
Subject: Re: In-order pg_dump (or in-order COPY TO)