| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | expect <expect(at)ihubbell(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: mysql create table -> psql |
| Date: | 2003-09-09 09:23:17 |
| Message-ID: | 200309091023.17025.dev@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amin Schoeib | 2003-09-09 09:29:08 | German special characters Problem |
| Previous Message | mailrun | 2003-09-09 09:10:20 |