Re: Using oid as pkey
| От | Joshua D. Drake |
|---|---|
| Тема | Re: Using oid as pkey |
| Дата | |
| Msg-id | 46CA1C0E.6030902@commandprompt.com обсуждение исходный текст |
| Ответ на | Re: Using oid as pkey ("D. Dante Lorenso" <dante@lorenso.com>) |
| Список | 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 по дате отправления: