Re: Batch Table Creation - Foreign Key Problem

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Batch Table Creation - Foreign Key Problem
Дата
Msg-id 200212161716.30287.josh@agliodbs.com
обсуждение исходный текст
Ответ на Batch Table Creation - Foreign Key Problem  (Daniel Whelan <merlin@ophelan.com>)
Список pgsql-novice
Daniel,

> I'm trying to create a set of tables, some of which have a foreign key
> pointing to other tables in the same set. The problem arises when it
> tries to add a table before the table it depends on has been created. Is
> there any way to defer the checking of foreign key dependancies until
> after the whole transaction block?
>
> Alternately, would I be better off creating the tables with no foreign
> keys, and issuing alter statements at the end to add the keys? Thanks!

Yes, probably.  Take a look at how this is handled in pg_dump files for
version 7.2.2 and higher.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: Brian Scandale
Дата:
Сообщение: Re: Redhat Database ???
Следующее
От: "Geoff Jenkins"
Дата:
Сообщение: Kylix connection problem