Re: pg_dump and DEFAULT column values
| От | Eric Ridge |
|---|---|
| Тема | Re: pg_dump and DEFAULT column values |
| Дата | |
| Msg-id | D3ADE25911614840BC69C72E3171E4ED0FBE01@tcdiexch.tcdi.com обсуждение исходный текст |
| Ответ на | pg_dump and DEFAULT column values ("Eric Ridge" <ebr@tcdi.com>) |
| Ответы |
Re: pg_dump and DEFAULT column values
|
| Список | pgsql-general |
> > Have you considered using a sequence, rather than generating > > new values > > as shown above? The approach you are using is extremely fragile: > > consider what happens if two backends try to insert at the > same time. > > a sequence it is! thanks. well, but then again, I want the default value of that field to be 1 greater than the max value, not the next value in a sequence. The client application has the ability to change the value of that field, but new records need to be max+1. So I guess to make pg_dump happy, and to solve potential concurrency issues, I need a trigger for that field? Or will I have the same circular reference problem with a trigger? eric
В списке pgsql-general по дате отправления: