| От | Ed L. |
|---|---|
| Тема | Re: determine sequence name for a serial |
| Дата | |
| Msg-id | 200410281750.36003.pgsql@bluepolka.net обсуждение исходный текст |
| Ответ на | Re: determine sequence name for a serial (Michael Fuhr <mike@fuhr.org>) |
| Список | pgsql-general |
On Thursday October 28 2004 5:31, Michael Fuhr wrote: > On Thu, Oct 28, 2004 at 04:51:05PM -0600, Ed L. wrote: > > But I didn't understand why you care to get rid of the explicit > > reference to the sequence object in your code in the first place. In > > PostgreSQL, at least for the past 5 years if not longer, if you create > > a SERIAL column for (schemaname, tablename, columnname), then your > > sequence will *always* be "schemaname.tablename_columnname_seq". > > Only for certain values of "always." Tables and columns can be renamed, > so the sequence name might no longer be "tablename_columnname_seq", > but rather "oldtablename_oldcolumnname_seq". Your point is well taken, I see the gotcha there, and thus the value of a function. Ed
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера