Re: Serial data type not starting at 1

From: Tielman J de Villiers <tjdevil(at)bondnet(dot)co(dot)za>
To: "'tony'" <tony(at)animaproductions(dot)com>, Tielman J de Villiers <tjdevil(at)bondnet(dot)co(dot)za>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Serial data type not starting at 1
Date: 2001-11-15 15:02:54
Message-ID: E1F206EC93DCD4119A05009027A413590649A1@sbssvr.bondnet.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Great and thank you very much:

[ create table test2 (x int default nextval('test_serial'),y varchar); ]

Did the trick

Tielman J de Villiers
BondNet Pty Ltd

-----Original Message-----
From: tony [mailto:tony(at)animaproductions(dot)com]
Sent: Thursday, November 15, 2001 4:54 PM
To: Tielman J de Villiers
Cc: 'pgsql-general(at)postgresql(dot)org'
Subject: RE: [GENERAL] Serial data type not starting at 1

On Thu, 2001-11-15 at 15:38, Tielman J de Villiers wrote:
> Thanks Tony,
>
> I have tried:
> db=> create table test2(x serial start 5000,y varchar);
> But it gives:
> ERROR: parser: parse error at or near "start"

create sequence test_serial start 5000;
create table test2 (
x nextval('test_serial'),
y varchar;
);

Tony
--
RedHat Linux on Sony Vaio C1XD/S http://www.animaproductions.com/linux2.html
Macromedia UltraDev with PostgreSQL
http://www.animaproductions.com/ultra.html

Browse pgsql-general by date

  From Date Subject
Next Message Vivek Khera 2001-11-15 15:05:22 Re: Modifying check constraints
Previous Message Stephan Szabo 2001-11-15 14:59:53 Re: Serial data type not starting at 1