Re: Using oid as pkey

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>, "Ed L(dot)" <pgsql(at)bluepolka(dot)net>, Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using oid as pkey
Date: 2007-08-20 22:56:14
Message-ID: 46CA1C0E.6030902@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

D. Dante Lorenso wrote:
> Michael Glaesemann wrote:
>>
>> On Aug 20, 2007, at 16:58 , Ed L. wrote:
>> You'd have to specify your table WITH OIDS anyway as they're no
>> longer used by default for table rows, so there's really nothing to be
>> gained by using oids.
> Using a brain-dead sample table that looks like this:
>
> CREATE table some_table (
> col0 SERIAL,
> col1 VARCHAR,
> col2 VARCHAR
> );
>
> I want to do something like this:
>
> INSERT INTO some_table (col1, col2)
> VALUES ('val1', 'val2');
>
> I want the value of col0 returned to the application and I don't want to
> know the name of the sequence involved in the SERIAL column. I just
> want the value inserted into the column by using just it's column name.

lastval()

Sincerely,

Joshua D. Drake

- --

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
PostgreSQL solutions since 1997 http://www.commandprompt.com/
UNIQUE NOT NULL
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGyhwOATb/zqfZUUQRArlgAJ9F0exnHPJmM5r8eSASb1qGIl7DtQCfbZZh
UhYLXWZxr2zKiJYBiJnc4rM=
=z7N/
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Thoen 2007-08-20 23:08:35 Re: Searching for Duplicates and Hosed the System
Previous Message D. Dante Lorenso 2007-08-20 22:51:09 Re: Using oid as pkey