logo       

MySQL comparable syntax for PostgreSQL: msg#00203

db.postgresql.novice

Subject: MySQL comparable syntax for PostgreSQL


Hi,

I'm trying out PostgreSQL as an alternate to MySQL. Since MySQL seems a little immature. There are however some constructs I am used to, and can't see a PostgreSQL alternate. Can you let me know what the comparable syntax is, if it exists...

The 'IF EXISTS' extension to CREATE and DROP TABLE. Is there something
similar in PostgreSQL to alow scripts to create/amend table to parse
smoothly without errors? -- Or something which can be added to a script
to instuct PostgreSQL to not thow an error if duplicate tables submitted?

An UNSIGNED number. Is this 'field INTEGER CHECK (field >= 0)', or is
there a direct UNSIGNED reference I have missed?

The AUTO_INREMENT extension to a Primary Key, as used in MuSQL. What is
the official method for auto-incrementing fields? I have found the
'DEFAULT NEXTVAL('...'), but I am not sure whether/how/if this can be
used to auto-increment a primary field?

The SET and ENUM data types, representing a set of, and enumerated data
respecitvelly. Is there anything similar, expecially to ENUM data type,
in PostgreSQL, as I use this extensivelly at the moment...

If anybody can let me know on what I am sure are simple questions, I'd
love to know.

Ben



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise