Re: [ADMIN] Adding Serial Type

2005-05-28 Thread Bruno Wolff III
On Sat, May 28, 2005 at 16:18:30 -0300, David Pratt <[EMAIL PROTECTED]> wrote: > > Serial should always give me an incremented value that's different so I > am assuming it is unnecessary to use UNIQUE. Am I correct? Unless someone uses setval to lower the value or if you change the configura

Re: [ADMIN] Adding Serial Type

2005-05-28 Thread John DeSoi
On May 28, 2005, at 1:27 PM, David Pratt wrote: CREATE TABLE new_table ( id SERIAL UNIQUE NOT NULL, description TEXT NOT NULL ); Or should I just use below because Serial type implies this. CREATE TABLE new_table ( id

Re: [ADMIN] Adding Serial Type

2005-05-28 Thread Bruno Wolff III
On Sat, May 28, 2005 at 16:18:30 -0300, David Pratt <[EMAIL PROTECTED]> wrote: > > On Saturday, May 28, 2005, at 03:27 PM, Bruno Wolff III wrote: > > >On Sat, May 28, 2005 at 14:27:17 -0300, > > David Pratt <[EMAIL PROTECTED]> wrote: > >>Pretty basic question. Is it necessary to add NOT NULL o

Re: [ADMIN] Adding Serial Type

2005-05-28 Thread David Pratt
On Saturday, May 28, 2005, at 03:27 PM, Bruno Wolff III wrote: On Sat, May 28, 2005 at 14:27:17 -0300, David Pratt <[EMAIL PROTECTED]> wrote: Pretty basic question. Is it necessary to add NOT NULL or UNIQUE NOT NULL to SERIAL or is this implicit and unnecessary? Serials no longer generate

Re: [ADMIN] Adding Serial Type

2005-05-28 Thread David Pratt
Many thanks John and Bruno for your responses. This helps clarify this for me. Regards, David ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTE

Re: [ADMIN] Adding Serial Type

2005-05-28 Thread Bruno Wolff III
On Sat, May 28, 2005 at 14:27:17 -0300, David Pratt <[EMAIL PROTECTED]> wrote: > Pretty basic question. Is it necessary to add NOT NULL or UNIQUE NOT > NULL to SERIAL or is this implicit and unnecessary? Serials no longer generate a uniqie index by default. So in practice you will normally want

[ADMIN] Adding Serial Type

2005-05-28 Thread David Pratt
Pretty basic question. Is it necessary to add NOT NULL or UNIQUE NOT NULL to SERIAL or is this implicit and unnecessary? ie. CREATE TABLE new_table ( id SERIAL UNIQUE NOT NULL, description TEXT NOT NULL ); Or should I just use below becau