Re: Serial column has suddenly stopped working

From: Malcolm Warren <malcolm(at)villeinitalia(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Serial column has suddenly stopped working
Date: 2004-12-16 14:03:14
Message-ID: 41C195A2.4090804@villeinitalia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The answer is 3. Mistake of mine. I put in a field of the same name to
display it, and it was also sending 0 with the statement.
Thank you for helping me get to the bottom of it.

Malcolm Warren

Richard Huxton wrote:

> Malcolm Warren wrote:
>
>> Thank you for your reply.
>> Yes, I get the next number and the number goes up one, as it should.
>>
>> The rest of the table seems to function normally incidentally, just
>> the serial column gets filled with 0.
>> By the way my version is 7.3 which I forgot to mention.
>
>
> Hmm - since you say you've dumped/restored to another machine that
> leaves two things I can think of:
>
> 1. Schema issue (maybe it's not seeing the sequence).
> 2. Trigger is altering the value supplied.
> 3. The application isn't sending the query you think it is.
>
> What happens if you manually:
> INSERT INTO my_table (..., srl, ...) VALUES (...,
> nextval('booking_srl_seq',...)
>
> If that works, it's not #2, and it's time to look at the application
> (and turn statement logging on).
>
> --
> Richard Huxton
> Archonet Ltd
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Riccardo G. Facchini 2004-12-16 14:04:41 Re: Scheduler in Postgres
Previous Message Richard Huxton 2004-12-16 13:59:24 Re: What HW / OS is recommeded