MySQL comparable syntax for PostgreSQL

Поиск
Список
Период
Сортировка
От Ben Clewett
Тема MySQL comparable syntax for PostgreSQL
Дата
Msg-id 3E50F5E5.5050107@roadrunner.uk.com
обсуждение исходный текст
Ответы Re: MySQL comparable syntax for PostgreSQL  (Bruno Wolff III <bruno@wolff.to>)
Re: MySQL comparable syntax for PostgreSQL  (Andrew McMillan <andrew@catalyst.net.nz>)
Список 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 по дате отправления:

Предыдущее
От: David C.Oshel
Дата:
Сообщение: Re: How to copy database
Следующее
От: "guillermo schulman"
Дата:
Сообщение: Change the current database programatically