Re: Postgres SQL Syntax - Mailing list pgsql-general

From Jim C.
Subject Re: Postgres SQL Syntax
Date
Msg-id epvpbc$mld$1@sea.gmane.org
Whole thread Raw
In response to Postgres SQL Syntax  ("Jim C." <jlistnews@gmail.com>)
Responses Re: Postgres SQL Syntax  ("Brandon Aiken" <BAiken@winemantech.com>)
Re: Postgres SQL Syntax  (Richard Huxton <dev@archonet.com>)
List pgsql-general
> CREATE TABLE "credits" (
>   "person" integer NOT NULL default '0',
>   "chanid" int NOT NULL default '0',
>   "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00',
>   "role"
set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest')
NOTNULL default '' 
> --  CONSTRAINT "chanid_constraint0" UNIQUE ("chanid","starttime","person","role")
> --  UNIQUE KEY "chanid" ("chanid","starttime","person","role"),
> --  KEY "person" ("person","role")
> );

I'm doing this table by table, line by line.  Each table, I learn
something new about the differences between MySQL and Postgres, I
mentally catalog it and I can always look it up in my own code next time
for examples.

I've a tool that is providing some help but sometimes it chokes. It
choked on this one for example.

I could use some clues as to how to go about converting this MySQL
implementation of roles to Postgres.

So far I've been through 5 tables and it is getting easier but I'm still
getting stuck now and then.


Jim C.

pgsql-general by date:

Previous
From: "Jim C."
Date:
Subject: Re: Postgres SQL Syntax
Next
From: "finecur"
Date:
Subject: table updated status