Skip site navigation (1) Skip section navigation (2)

Re: pg_dump, libdump, dump API, & backend again

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump, libdump, dump API, & backend again
Date: 2000-07-26 00:54:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
At 22:41 25/07/00 +0200, Peter Eisentraut wrote:
>Philip Warner writes:
>> >* order
>> This is an issue for the client. I am not proposing a
>> 'Dump_The_Entire_Datbase' call; just a
>> 'Dump_One_Thing_And_A_List_Of_Dependencies' call.
>How? Functions can only return one value reliably.

The API is easy, and in the case of the database, it would take the form of
multiple rows in a result set, or possibly two querues - one returning a
single value (the definition), and the oter returning the dependants in
multiple rows. I guess another option would be to return an array.

>> >* How to resolve circular dependencies?
>> Issue for the client.
>Not really. If you have a circular dependency `table --(column default)-->
>function --(reads)--> table' then you need to dump the table differently
>(perhaps leave out the constraint and add it after the function is

I would expect ALL constraints would be left off the table definition - it
would dump the most basic definition possible, with references to the
constraints appearing in the dependency list. That is why I say it's a
problem for the client. For the purpose of displaying the deinition in
psql, circularity does not matter, and in the case of pg_dump, it actually
wants to separate constraints and the table definition.

Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://          |                /           \|
                                 |    --________--
PGP key available upon request,  |  /
and from   |/

In response to

pgsql-hackers by date

Next:From: Henry B. HotzDate: 2000-07-26 00:58:09
Subject: Installation Report for powerpc-apple-netbsdelf1.5
Previous:From: Philip WarnerDate: 2000-07-26 00:43:43
Subject: Re: Re: Problem with disabling triggers in pg_dump

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group