MySQL comparable syntax for PostgreSQL - Mailing list pgsql-novice

From Ben Clewett
Subject MySQL comparable syntax for PostgreSQL
Date
Msg-id 3E50F5E5.5050107@roadrunner.uk.com
Whole thread Raw
Responses Re: MySQL comparable syntax for PostgreSQL
Re: MySQL comparable syntax for PostgreSQL
List pgsql-novice
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



pgsql-novice by date:

Previous
From: David C.Oshel
Date:
Subject: Re: How to copy database
Next
From: "guillermo schulman"
Date:
Subject: Change the current database programatically