Re: stored procs

Поиск
Список
Период
Сортировка
От J.V.
Тема Re: stored procs
Дата
Msg-id 4E8589E3.5010303@gmail.com
обсуждение исходный текст
Ответ на Re: stored procs  (John R Pierce <pierce@hogranch.com>)
Ответы Re: stored procs
Список pgsql-general
For tables that already exist and have a foreign key relationship, is
there an equivalent alter statement for the statement below?

Does this mean that if table xxx.id primary key value changes, the
foreign key value will change as well?

If this is the case, then would not have to match up all the foreign
keys to the new re-sequenced id.

Also another question:  if the "id serial primary key", do I need to
create a sequence at all?  Or is that managed by the database?

Typically you have to link the id to the database sequence object, but
it looks as in this case no "CREATE SEQUENCE" would be needed.

thanks


J.V.

On 9/30/2011 2:45 AM, John R Pierce wrote:
> create table yyy (id serial primary key, xxx_id int references xxx(id));

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

Предыдущее
От: Gregg Jaskiewicz
Дата:
Сообщение: Re: Rules going away
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: stored procs