By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,044 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,044 IT Pros & Developers. It's quick & easy.

doubt in a datatype

priyan
P: 54
what is the equivalent datatype in postgre for uniqueidentifier in sql . please help me
Aug 4 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 534
what is the equivalent datatype in postgre for uniqueidentifier in sql . please help me
I am not quite sure of what you mean by "uniqueidentifier in sql"
If you are looking for an auto-increment number that can be used as a key for the records this would be SERIAL (also see the Sequence manupilation functions )

If you are wondering about internal object id which is being maintained by the database this is something called OID, although in the latest PostgreSQL versions user tables are created without OIDs unless you specifically ask for it in CREATE TABLE command.
Aug 6 '07 #2

priyan
P: 54
I am not quite sure of what you mean by "uniqueidentifier in sql"
If you are looking for an auto-increment number that can be used as a key for the records this would be SERIAL (also see the Sequence manupilation functions )

If you are wondering about internal object id which is being maintained by the database this is something called OID, although in the latest PostgreSQL versions user tables are created without OIDs unless you specifically ask for it in CREATE TABLE command.

i mean uniqueidentifier in sql we can have a 16 bit value
Aug 6 '07 #3

Expert 100+
P: 534
I think what you have in mind is GUID (a.k.a. UUID)
I would not call it "uniqueidentifier in sql", but anyway, if this is what you need this feature is being planned for, there's no uuid generator in the current PostgreSQL version.
There are other tools you can use to generate GUID, and you can store them in a varchar field.
Aug 6 '07 #4

priyan
P: 54
I think what you have in mind is GUID (a.k.a. UUID)
I would not call it "uniqueidentifier in sql", but anyway, if this is what you need this feature is being planned for, there's no uuid generator in the current PostgreSQL version.
There are other tools you can use to generate GUID, and you can store them in a varchar field.
thank u very much michaelb for helping me .
Aug 8 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.