Re: mysql create table -> psql - Mailing list pgsql-general

From Richard Huxton
Subject Re: mysql create table -> psql
Date
Msg-id 200309091023.17025.dev@archonet.com
Whole thread Raw
In response to mysql create table -> psql  (expect <expect@ihubbell.com>)
Responses Re: mysql create table -> psql
List pgsql-general
On Tuesday 09 September 2003 07:10, expect wrote:
> Hello,
>
> Trying to get this MySql create table command to work, no luck.
>
> create sequence serial;
>
> CREATE TABLE outbound (
> source char(100) default '',
> destination char(100) default '',
> sport int4 default 0 NOT NULL,
> dport int4 NOT NULL default 0,
> time timestamp NOT NULL default '0000-00-00 00:00:00',
> id int8 default nextval('serial') not null,
> constraint id PRIMARY (id)
> );

In addition to everything Ian says, you probably want varchar() not char() for
the source and destination. The char type is space-padded to the length of
the field (MySQL strips them somehow, but can't remember how off the top of
my head - anyway, varchar is the standard variable-length text type).

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: mailrun@mail333.com
Date:
Subject:
Next
From: "Amin Schoeib"
Date:
Subject: German special characters Problem