Re: getGeneratedKeys()

From: "Marcus Andree S(dot) Magalhaes" <marcus(dot)magalhaes(at)vlinfo(dot)com(dot)br>
To: <henr-and(at)dsv(dot)su(dot)se>
Cc: <johnsw(at)wardbrook(dot)com>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getGeneratedKeys()
Date: 2003-12-31 08:19:49
Message-ID: 61203.200.174.148.100.1072858789.squirrel@webmail.webnow.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Ahhh.... yes.... good and old "multiplatform code compatibility"...

I remember that from '95, when version Beta 2.0 arrived and I started
to write Java code in applets...

There was a cool hack around to use Netscape to compile code and
generate a class file under Linux 1.2...

The promiss of "write once, run everywhere". Frames used AWT back
then and all have the same cup of cofee when iconized. After all,
the mac wasn;t able to iconize frames. Well, some flexibility was
trade off in the name of compatibility. Fine...

Then, we had to deal with threading issues in Solaris and Windows...
After that, JDBC arrived... True, multiplatform db access.
A query as complex as "select gettime()" could run in SQL Server
and Postgres (or it was called PostgreSQL at that time ?)
and return the same kind of data: a timestamp-like data in SQL Server
and an error in Postgres.

Since then, I never believed in platform independent coding. And it
was a long time ago....

>> Can you do the insert using a function instead, and return the currval
>> on the underlying sequence?
>>
>> John
>>
>
> I'm not sure what you mean. A stored procedure?
>
> The good thing about getGeneratedKeys() is that you don't have to write
> DB-specific code.
> --
> Henrik
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message snpe 2003-12-31 16:27:16 Re: ResultSetMetaData enhancements
Previous Message John Sidney-Woollett 2003-12-31 07:53:20 Re: getGeneratedKeys()