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

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: pg_dump, libdump, dump API, & backend again
Дата
Msg-id 3.0.5.32.20000726105419.02024340@mail.rhyme.com.au
обсуждение исходный текст
Ответ на Re: pg_dump, libdump, dump API, & backend again  (Philip Warner <pjw@rhyme.com.au>)
Список 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   |/


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: Re: Problem with disabling triggers in pg_dump
Следующее
От: "Henry B. Hotz"
Дата:
Сообщение: Installation Report for powerpc-apple-netbsdelf1.5