Re: [INTERFACES] ecpg and getting just assigned serial number

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Theofilu Andreas <theofilu(at)eunet(dot)at>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] ecpg and getting just assigned serial number
Date: 1999-09-13 08:27:26
Message-ID: 19990913102726.B3200@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Sun, Sep 12, 1999 at 04:25:17PM +0200, Theofilu Andreas wrote:
> I'm using 'ecpg' to develop my application, because it's mostly compatible
> to Informix's 'esqlc'. However. I have a table with a field of type
> 'serial'. Now I've no problem to insert any sentences into this table, but
> immediately after inserting a new sentence I need the newly assigned number
> to the serial field in the table. How can I access this number?
> With Informix I got this number in a field of structure 'sqlca'. With
> PostgreSQL the same field in this structure exists but contains always 0,
> as documented.

Where exactly does Informix return it? sqlca[?].

Also does anyone know whether the backend returns that number somewhere?

Michael
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael(at)Fam-Meskes(dot)De | Use PostgreSQL!

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Andreas Theofilu 1999-09-13 12:11:24 Re: [INTERFACES] ecpg and getting just assigned serial number
Previous Message Michael Meskes 1999-09-13 08:26:04 Re: [INTERFACES] Embedded SQL in C