Re: Explicite typecasting of functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Explicite typecasting of functions
Дата
Msg-id 8505.1029338409@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Explicite typecasting of functions  (Richard Huxton <dev@archonet.com>)
Ответы Re: Explicite typecasting of functions  (Andreas Tille <tillea@rki.de>)
Re: Explicite typecasting of functions  (Andreas Tille <tillea@rki.de>)
Список pgsql-sql
Richard Huxton <dev@archonet.com> writes:
> On Wednesday 14 Aug 2002 10:30 am, Andreas Tille wrote:
>> Any hint to solve this kind of chicken-egg-problem?

> Your solution is not safe anyway - you could end up with two processes trying
> to insert the next value.

I concur with Richard that Andreas needs to solve a different problem,
but just for the record, the way you could do it is
CREATE TABLE without mentioning the default
CREATE FUNCTION
ALTER TABLE ... SET DEFAULT

Note however that pg_dump is not bright enough to deduce that you did
this.  It will dump the table definition first, with the DEFAULT clause,
and so you'll have to do manual surgery on the dump file if you ever
need to reload.
        regards, tom lane


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: concurrent connections is worse than serialization?
Следующее
От: Wei Weng
Дата:
Сообщение: Re: concurrent connections is worse than serialization?