Re: Using oid as pkey - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Using oid as pkey
Date
Msg-id 46CA1C0E.6030902@commandprompt.com
Whole thread Raw
In response to Re: Using oid as pkey  ("D. Dante Lorenso" <dante@lorenso.com>)
List 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-----

pgsql-general by date:

Previous
From: "D. Dante Lorenso"
Date:
Subject: Re: Using oid as pkey
Next
From: Bill Thoen
Date:
Subject: Re: Searching for Duplicates and Hosed the System