From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, Erik Norvelle <root(at)linux(dot)norvelle(dot)com>, progman2(at)ibm(dot)net |
Subject: | Re: [GENERAL] Some questions about oid's and sequences. |
Date: | 1998-09-02 15:25:15 |
Message-ID: | 1725.980902@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello Erik,
mercoledì, 2 settembre 98, you wrote:
EN> Howdy:
EN> I am coming from the Windows world, and Microsoft SQL variants in
EN> particular. Both Access and SQL Server have autoincrement data types --
EN> I understand that Postgresql has "sequences" which do the same thing,
EN> but I can't find any documentation on them. I have browsed all the
EN> online documentation that comes with Postgresql, and can't find anything
EN> about it. Could someone point me to some docs that would explain how to
EN> use sequences?
if U have v6.4 then:
CREATE TABLE tbl(fld SERIAL);
if you have v6.3.2 then:
CREATE SEQUENCE serial;
CREATE TABLE distributors (
did DECIMAL(03) PRIMARY KEY DEFAULT NEXTVAL('serial')
);
EN> I have a similar question about oid's. I am not sure what they are --
EN> from their name, I would guess that they are autoassigned, unique
EN> identifiers for each row in a table. Is that correct?
Yes. OIDs are uniq to the whole database not only for tables.
EN> If so (or even
EN> if not), how do I create and use them. Any documentation that addresses
EN> oid usage specifically? I am confused because oid's seem to be to
EN> substitute for the BLOB data type which is available in other RDBMS's.
EN> If you post a reply to this, could you also cc: to
EN> enorvelle1(at)uswest(dot)net(dot) TKA for your assistance.
EN> -Erik Norvelle
Best regards,
Jose' mailto:sferac(at)bo(dot)nettuno(dot)it
From | Date | Subject | |
---|---|---|---|
Next Message | James Olin Oden | 1998-09-02 19:48:18 | Re: [GENERAL] Some questions about oid's and sequences. |
Previous Message | Brook Milligan | 1998-09-02 14:27:41 | Re: [GENERAL] C++ / pgsql Interface |