Migrating from mysql. - Mailing list pgsql-general

From Joe Karthauser
Subject Migrating from mysql.
Date
Msg-id 20000515230448.A63003@pavilion.net
Whole thread Raw
Responses Re: Migrating from mysql.  ("Morten W. Petersen" <morten@src.no>)
Re: Migrating from mysql.  (Giles Lean <giles-pgsql@nemeton.com.au>)
List 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 by date:

Previous
From: Thomas Holmgren
Date:
Subject: Why is PostgreSQL 7.0 SQL semantics different from Oracle's?
Next
From: Travis Bauer
Date:
Subject: Re: 7.0 installation problem, help please :-(