> -----Original Message-----
> From: Troy D [mailto:[EMAIL PROTECTED]] 
> Sent: 19 July 2002 20:20
> To: [EMAIL PROTECTED]
> Subject: [pgadmin-support] Index question
> 
> 
> Hi,
> 
> I am running pg7.1 on SuSE 7.2.
> I have a table with three varchar fields making up the 
> primary key, plus 
> four data fields.
> 
> create table "foo"(
>   "pk1" varchar(7) not null,
>   "pk2" varchar(7) not null,
>   "pk3" varchar(7) not null,
>   "data1" float8 default 0 not null,
>   "data2" float8 default 0 not null,
>   "data3" float8 default 0 not null,
>   "data4" float8 default 0 not null
>   constraint "foo_pkey" primary key ("pk1", "pk2", "pk3")
> );
> 
> This automatically creates an index (so says pgadmin)

Does it? Well, I mean it should create an index, but I don't recall
making pgAdmin warn you about it :-).

> 
> create unique index foo_pkey on foo using btree ( pk1 
> varchar_ops, pk2 
> varchar_ops, pk3 varchar_ops );
> 
> On this table, I run an insert/update routine that reads from 
> table bar 
> and inserts or updates table foo.  I have used php to read in (about 
> 2000) records from table bar and then insert or update table 
> foo, then 
> print the record number (of result from bar) and the time.

To be honest, I don't know what's causing your problem. I would suggest
you might find better help on one of the PostgreSQL lists.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to