Re: Interface - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Interface
Date
Msg-id 446219F2.9060505@commandprompt.com
Whole thread Raw
In response to Interface  (Bob Pawley <rjpawley@shaw.ca>)
List pgsql-general
Bob Pawley wrote:
> The folks on the Delphi forum haven't been responsive to this question.
> Perhaps the ones that visit the forum don't know the answer.
>
> I have created a Delphi interface to a Postgresql table containing a
> serial column.
>
> When I try to insert a new value through the interface I get an error
> message that the serial field requires a value.
>
> When I remove the serial column the interface inserts a new value with
> no problem. When I insert directly via sql the serial column updates
> automatically.
>
> What am I missing to make this work through Delphi?

Try using DEFAULT as the serial value.. e.g;

INSERT INTO foo VALUES (DEFAULT, 'Hello');

Where DEFAULT is the serial column.

Sincerely,

Joshua D. Drake


>
> Bob


--

            === The PostgreSQL Company: Command Prompt, Inc. ===
      Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
      Providing the most comprehensive  PostgreSQL solutions since 1997
                     http://www.commandprompt.com/



pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: pgcrypto sha256/384/512 don't work on Redhat. Please help!
Next
From: "Bruno Almeida do Lago"
Date:
Subject: Friendly catalog views