Migrating from mysql.

Поиск
Список
Период
Сортировка
От Joe Karthauser
Тема Migrating from mysql.
Дата
Msg-id 20000515230448.A63003@pavilion.net
обсуждение исходный текст
Ответы Re: Migrating from mysql.  ("Morten W. Petersen" <morten@src.no>)
Re: Migrating from mysql.  (Giles Lean <giles-pgsql@nemeton.com.au>)
Список pgsql-general
Hi there,

I'm migrating from MySQL to PostgreSQL and I was wondering whether someone
could help me match some datatypes.

Firstly MySQL has a 'timestamp' datatype which automatically updates with
the current timestamp whenever an instance containing it is inserted or
updated.  Is there an equivalent datatype in PostgreSQL?

Secondly MySQL supports an 'enum' datatype which allowed a number of
labels to be defined as valid datatypes for a column, i.e:

  create table account (
      status enum('cancelled','active','onhold') DEFAULT 'active' NOT NULL
      ...
  )

I can't seem to find the equivalent in PostgreSQL.  Is there a way of doing
this?


And last but not least I'm used to using the 'desc tablename' sql command
to show the structure of a table within MySQL.  How do I do the same in
PostgreSQL.

Many thanks in advance,
Joe


В списке pgsql-general по дате отправления:

Предыдущее
От: Thomas Holmgren
Дата:
Сообщение: Why is PostgreSQL 7.0 SQL semantics different from Oracle's?
Следующее
От: Travis Bauer
Дата:
Сообщение: Re: 7.0 installation problem, help please :-(