Re: Sequence name with SERIAL type - Mailing list pgsql-general

From Paul Thomas
Subject Re: Sequence name with SERIAL type
Date
Msg-id 20031217094631.A31451@bacon
Whole thread Raw
In response to Sequence name with SERIAL type  (Marek Lewczuk <newsy@lewczuk.com>)
List 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 by date:

Previous
From: Richard Huxton
Date:
Subject: Re: md5 function
Next
From: Michael Fuhr
Date:
Subject: Re: md5 function