Re: [PATCHES] system catalog relation of a table and a serial sequence

From: Brent Verner <brent(at)rcfile(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Rod Taylor <rbt(at)zort(dot)ca>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] system catalog relation of a table and a serial sequence
Date: 2001-12-17 14:48:58
Message-ID: 20011217144858.GB15077@rcfile.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

[2001-12-16 23:23] Peter Eisentraut said:
| Tom Lane writes:
|
| > I think it'd be a bit surprising if "pg_dump -t table" would dump
| > sequences declared independently of the table. An example where you'd
| > likely not be happy with that is if the same sequence is being used to
| > feed multiple tables.
| >
| > I agree that dumping all such sequences will often be the desired
| > behavior, but that doesn't leave me convinced that it's the right
| > thing to do.
| >
| > Any comments out there?
|
| The more general question is: Should 'pg_dump -t table' dump all objects
| that "table" depends on? Keep in mind that this could mean you have to
| dump the entire database (think foreign keys). In my mind, dumping an
| arbitrary subset of dependencies is not a proper solution, though.

Do you care to share your ideas on what a proper solution /would/ be?

I agree wholly with you that it is worse to dump the "arbitrary
subset" of related objects along with a table.

Assuming that 'pg_dump $ARGS db_1 > psql db_2' should never fail,
we must either dump only table schema for ARGS="-t table" or dump
/all/ dependencies for the same ARGS.

Clearly, we are not in a position to dump all dependencies right now.
Can we make the change that '-t table' is limited to dumping schema?

brent

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing." -- Duane Allman

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2001-12-17 15:18:18 Re: 7.2 is slow?
Previous Message Marc G. Fournier 2001-12-17 14:20:21 Re: Size restriction on patches list

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2001-12-17 22:02:40 Re: [PATCHES] system catalog relation of a table and a
Previous Message Brent Verner 2001-12-17 14:19:54 Re: system catalog relation of a table and a serial sequence