Re: Index question

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Troy D" <ugly_hippo(at)yahoo(dot)ca>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Index question
Date: 2002-07-22 19:29:32
Message-ID: D85C66DA59BA044EB96AB9683819CF61015147@dogbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> -----Original Message-----
> From: Troy D [mailto:ugly_hippo(at)yahoo(dot)ca]
> Sent: 19 July 2002 20:20
> To: pgadmin-support(at)postgresql(dot)org
> 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.

Browse pgadmin-support by date

  From Date Subject
Next Message heatherm 2002-07-23 01:35:32 unsubscribe
Previous Message Dave Page 2002-07-22 19:11:09 Re: error on connect