Re: Sequence name with SERIAL type

Поиск
Список
Период
Сортировка
От Paul Thomas
Тема Re: Sequence name with SERIAL type
Дата
Msg-id 20031217094631.A31451@bacon
обсуждение исходный текст
Ответ на Sequence name with SERIAL type  (Marek Lewczuk <newsy@lewczuk.com>)
Список pgsql-general
On 17/12/2003 07:59 Marek Lewczuk wrote:
> I'm curious if the default scheme for sequence name (which is created
> with SERIAL data type) can be changed -- currently all sequences are
> named like this: <table_name>_<field_name>_seq -- can it be changed for
> e.g. <table_name>__<field_name>__seq ???


You could try something like

     myfield integer default nextval('mysequence')

where you have previously created the sequence mysequence.

HTH

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: md5 function
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: md5 function