Skip site navigation (1) Skip section navigation (2)

pgsql 'prefix' error

From: Bino Oetomo <bino(at)indoakses-online(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pgsql 'prefix' error
Date: 2009-11-24 10:59:26
Message-ID: 4B0BBC8E.6010803@indoakses-online.com (view raw or flat)
Thread:
Lists: pgsql-general
Dear All
Harald Fuchs wrote:
> For larger tables where an index search would be useful, check out
> pgfoundry.org/projects/prefix:
>
>
> CREATE TABLE myrecords (
>   record prefix_range NOT NULL,
>   PRIMARY KEY (record)
> );
>
> COPY myrecords (record) FROM stdin;
> 1
> 12
> 123
> 1234
> \.
>
>   
I downloaded pgfoundry's prefix, postgresql-8.3-prefix_1.0.0-1_i386.deb
I install it using dpkg , and run the prefix.sql

Create database .. named 'prefbino', and

CREATE TABLE myrecords (
  record prefix_range NOT NULL,
  PRIMARY KEY (record)
);


Looks good, next
I try to create some records, But I got this error :
-----------------------START------------------
prefbino=# COPY myrecords (record) FROM stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
 >> 1
 >> 12
 >> 123
 >> 1234
 >> \.
ERROR: duplicate key value violates unique constraint "myrecords_pkey"
CONTEXT: COPY myrecords, line 2: "12"

-----------------------STOP------------------

Kindly please give me further enlightment

Sincerely
-bino-

In response to

Responses

pgsql-general by date

Next:From: lee brownDate: 2009-11-24 11:04:58
Subject: BUG #5211: invalid password
Previous:From: Pavel StehuleDate: 2009-11-24 10:31:17
Subject: Re: [COMMITTERS] recover deleted records

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group