ecpg and getting just assigned serial number

From: theofilu(at)eunet(dot)at (Theofilu Andreas)
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ecpg and getting just assigned serial number
Date: 1999-09-12 14:25:17
Message-ID: 199909121425.QAA05055@eunet.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

-----BEGIN PGP SIGNED MESSAGE-----

Hi to all,

I've written a small application first based on Informix and trying to
implement now support for PostgreSQL. I was mostly successful, but there is
still one problem left.
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.

- --
Theofilu Andreas
http://members.eunet.at/theofilu

-------------------------------------------------
Enjoy the science of Linux!
Genieße die Wissenschaft von Linux!
-------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBN9u302j/BcrYxhjVAQGr3gQAhlFZ6Uka/tfcEdSo85NG9Bzq6n4m70HW
f4lsECCTOm8EMCeKHvtJN7t5IZ6PqHTquwkY3WpZpM8PPALRSHPlBtxJF+fI4RrB
dsQ0g02bwm71XgMNh4VLFYf9gttTOAQjxmA30WONIWoYngQIWr6u+7E6ihjOCdb0
BFPplhR5Vts=
=n75F
-----END PGP SIGNATURE-----

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1999-09-12 16:01:41 Re: [INTERFACES] ecpg and getting just assigned serial number
Previous Message rodneyr 1999-09-11 21:24:22 Embedded SQL in C