Re: determine sequence name for a serial
От | Jonathan Daugherty |
---|---|
Тема | Re: determine sequence name for a serial |
Дата | |
Msg-id | 20041028232510.GA26259@vulcan.cprogrammer.org обсуждение исходный текст |
Ответ на | Re: determine sequence name for a serial ("Ed L." <pgsql@bluepolka.net>) |
Список | pgsql-general |
# 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". If that naming convention changes, # there will be a whole lotta breakage world-wide. When a table is renamed, related sequences' names don't change (as of 7.4.5). The ability to automagically pull the sequence based on the schema.table.column would be nice if you don't want to worry about having to update your table name and sequence name references in code. -- Jonathan Daugherty Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication & Support Services, (503) 667-4564
В списке pgsql-general по дате отправления: