RE: [HACKERS] Timestamp fileds into index

From: Dan Gowin <DGowin(at)avantec(dot)net>
To: "'Ricardo J(dot)C(dot)Coelho'" <pulsar(at)truenet-ce(dot)com(dot)br>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Timestamp fileds into index
Date: 1999-02-09 14:59:16
Message-ID: 43A3A1806104D211988500A0C9B576EE7CE2EB@avantec_exc.avantec.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So I'm not the only person to see a bug like
this?

D.

-----Original Message-----
From: Ricardo J.C.Coelho [mailto:pulsar(at)truenet-ce(dot)com(dot)br]
Sent: Tuesday, February 09, 1999 8:36 AM
To: 'pgsql-hackers(at)postgresql(dot)org'
Subject: [HACKERS] Timestamp fileds into index

Hi,

I am new in Pgsql-Hacker mailing list. I didn't have any answer from others
lists.

I tried to create a table with a timestamp field as part of primary key.
Pgsql doesn't have an "ops_name" for timestamp. You will see this when you
use create table. DON'T DO THIS WITH YOUR REGULAR DATABASE. Create a
separate one.
If you create the table without primary key and after create an unique
index with abstime_ops, everything will run well.
However if you use primary key clause, the table can't be dropped or
created again. Look the sequence above.

create table TBL (FLD1 int2, FLD2 timestamp, FLD3 text, primary
key(FLD1,FLD2));
--> Pgsql will not create because FLD2 is timestamp
create table TBL (FLD1 int2, FLD2 timestamp, FLD3 text);
--> Pgsql said: Relation TBL already exist.
drop table TBL;
--> Pgsql said: Relation TBL don't exist. (So strange).

I tried vacuum too, but TBL still was there. The only way was: dump
database, destroydb and createdb it again.

I looked into database files. TBL name appears in pg_type_typname_index,
pg_class_relname_index, pg_type.

Seems to me that PgSQL creates the table, try to create the index, but when
the problems occurs, the "rollback" of create table is not completed.

What do you think about this ? Is Hackers the right place to send this ?

I'm using RedHat 5.2 (Intel) with Pgsql 6.4.2

Thanks.

Ricardo Coelho.

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1999-02-09 15:06:49 Re: [HACKERS] Datetime input-parsing shortcoming
Previous Message Thomas G. Lockhart 1999-02-09 14:55:00 Re: [HACKERS] VACUUM ANALYZE problem on linux