From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | "samsom, debra" <dsamsom(at)bristol(dot)ca>, 'Josh Berkus' <josh(at)agliodbs(dot)com>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Multiple Primary Keys |
Date: | 2002-04-18 17:47:07 |
Message-ID: | web-1376227@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Debra,
> psql dc postgres -c "create table "attachments"(
> "docn" varchar(25) NOT NULL,
> "issue" varchar(6) NOT NULL,
> "docna" varchar(4) NOT NULL,
> "issuea" varchar(20) NOT NULL,
> "applic" varchar(3),
> "whereused" varchar(1),
> CONSTRAINT "attachments_pkey"
> PRIMARY KEY ("docn","issue","docna","issuea"));"
>
> docn issue docna
> issuea
>
> 012T2100 SHT 01 K001 DR 911380
> A001
> 012T2100 SHT 01 L001 012T2100 SHT 01 ADCN 267
> -001
> 012T2100 SHT 01 L001 012T2100 SHT 01 ADCN 268
> -001
> 012T2100 SHT 01 L001 012T2100 SHT 01 ADCN 270
> -001
> 012T2100 SHT 01 L001 012T2100 SHT 01 ADCN 271
> -001
> 012T2100 SHT 01 L001 012T2100 SHT 01 ADCN 272
> -001
Here's the reason: Your table definition and your data do not match.
In your tabledef, docna has 4 characters and issuea has 20. However,
in your data, docna has 20 characters and issuea has 4. Fix this, and
you should be able to load your data.
-Josh Berkus
From | Date | Subject | |
---|---|---|---|
Next Message | samsom, debra | 2002-04-18 18:22:48 | Re: Multiple Primary Keys |
Previous Message | samsom, debra | 2002-04-18 17:36:03 | Re: Multiple Primary Keys |