From: | Ari Jolma <ajolma(at)water(dot)hut(dot)fi> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | table rename oddity |
Date: | 2000-05-25 12:44:01 |
Message-ID: | 200005251244.PAA18592@water.hut.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
Is this kind of behavior intended. When I try to rename a table to
a reserved word - I have tried to use 'lseg' which is a type - postgres
gives me an error but the change has been partly done and the
only way back seems to be to go to the database directory and
rename the file. I have tested this with version 7.0.
Regards,
Ari Jolma
An example:
template1=> create table a (a int);
CREATE
template1=> alter table a rename to lseg;
ERROR: TypeRename: type lseg already defined
template1=> \dt
Database = template1
+------------------+----------------------------------+----------+
| Owner | Relation | Type |
+------------------+----------------------------------+----------+
| ajolma | a | table |
+------------------+----------------------------------+----------+
template1=> select * from a;
NOTICE: mdopen: couldn't open a: No such file or directory
NOTICE: RelationIdBuildRelation: smgropen(a): No such file or directory
NOTICE: mdopen: couldn't open a: No such file or directory
NOTICE: mdopen: couldn't open a: No such file or directory
NOTICE: mdopen: couldn't open a: No such file or directory
NOTICE: mdopen: couldn't open a: No such file or directory
ERROR: cannot open relation a
template1=> drop table a;
NOTICE: mdopen: couldn't open a: No such file or directory
NOTICE: mdopen: couldn't open a: No such file or directory
DROP
template1=> \dt
Couldn't find any tables!
From | Date | Subject | |
---|---|---|---|
Next Message | Ari Jolma | 2000-05-25 12:44:08 | problem with NOTICE: _outNode: don't know how to print type |
Previous Message | planx plnetx | 2000-05-25 10:33:38 | Per Tom Lane: planx pltnx: exactly I AM FRENCH !!! :-) |