Re: [GENERAL] Auto incrementing primary keys

2008-02-19 Thread Lew
django_user wrote: How can stop postgresql from incrementing the primary key value, so that even after many failed insert statements it get the next id val. ,,, so wouldnt I run out of ids one day, if there are lot of failed insert statements, lets say for every successful insert there are 50 u

Re: [GENERAL] Auto incrementing primary keys

2008-02-19 Thread Gordon
On Feb 18, 1:14 pm, pgsql_user <[EMAIL PROTECTED]> wrote: > On Feb 18, 6:08 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > > > > > On 18 Feb, 13:36, django_user <[EMAIL PROTECTED]> wrote: > > > > How can stop postgresql from incrementing the primary key value, so > > > that even after many failed ins

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Reid Thompson
On Mon, 2008-02-18 at 17:46 +, Raymond O'Donnell wrote: > On 18/02/2008 13:14, pgsql_user wrote: > > so wouldnt I run out of ids one day, if there are lot of failed insert > > statements, lets say for every successful insert there are 50 > > unsuccessful inserts, so ids would be 1, 50, 100, an

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Scott Marlowe
On Feb 18, 2008 12:16 PM, Steve Atkins <[EMAIL PROTECTED]> wrote: > > On Feb 18, 2008, at 9:56 AM, Raymond O'Donnell wrote: > > > On 18/02/2008 17:46, Raymond O'Donnell wrote: > > > >> Well, that depends on your usage, so only you can answer that. > >> According to the docs, "serial" creates an int

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Steve Atkins
On Feb 18, 2008, at 9:56 AM, Raymond O'Donnell wrote: On 18/02/2008 17:46, Raymond O'Donnell wrote: Well, that depends on your usage, so only you can answer that. According to the docs, "serial" creates an integer column, which will give you 2147483647 values - how quickly will you use th

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Raymond O'Donnell
On 18/02/2008 17:46, Raymond O'Donnell wrote: Well, that depends on your usage, so only you can answer that. According to the docs, "serial" creates an integer column, which will give you 2147483647 values - how quickly will you use that lot up? If you think you will run out, by all means use

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Raymond O'Donnell
On 18/02/2008 13:14, pgsql_user wrote: so wouldnt I run out of ids one day, if there are lot of failed insert statements, lets say for every successful insert there are 50 unsuccessful inserts, so ids would be 1, 50, 100, and once I have thousands of rows, I will run out of IDs ? should I use big

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread Paul Boddie
On 18 Feb, 13:36, django_user <[EMAIL PROTECTED]> wrote: > > How can stop postgresql from incrementing the primary key value, so > that even after many failed insert statements it get the next id val. "Auto-incrementing" columns, typically implemented using the serial data type [1], employ sequenc

Re: [GENERAL] Auto incrementing primary keys

2008-02-18 Thread pgsql_user
On Feb 18, 6:08 pm, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 18 Feb, 13:36, django_user <[EMAIL PROTECTED]> wrote: > > > > > How can stop postgresql from incrementing the primary key value, so > > that even after many failed insert statements it get the next id val. > > "Auto-incrementing" colum