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: | 3.0.5.32.20000726105419.02024340@mail.rhyme.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
>created).
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://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
From | Date | Subject | |
---|---|---|---|
Next Message | Henry B. Hotz | 2000-07-26 00:58:09 | Installation Report for powerpc-apple-netbsdelf1.5 |
Previous Message | Philip Warner | 2000-07-26 00:43:43 | Re: Re: Problem with disabling triggers in pg_dump |