Hello,
everyone,
I want to know how postgres remain its unique index unique after i have change it,For
example:
CREATE TABLE human(age INT,name CHAR(30));
then in pg_attribute catalog the unique index pg_attribute_relid_attnum_index will use the relid of
'human' and attnum of age to create a index tuple for attribute:age,which is a unique index tuple describing
age ,then i do:
ALTER TABLE human RENAME age TO birthdate;
in the unique index pg_attribute_relid_attnum_index will appear two index tuple which keys are relid of 'human'
and attnum:1 to describe age(In my mind,when insert or update a heap tuple,postgres only inserts a new index
tuple for it in its index relation if it has not delete or tag the old index tuple),but there is no error
happening!!!!So i am interested in the method of remianing the dynamic index unique very much.
would you please tell me how postgres completes it and the src of this?
thank:)
庄继锋
2004-4-30
========================== 263电子邮件-信赖邮自专业
========================== 263电子邮件-信赖邮自专业