Dropping tables

Started by Hrvoje Niksicalmost 26 years ago3 messagesgeneral
Jump to latest
#1Hrvoje Niksic
hniksic@iskon.hr

[ Please Cc the responses to me, because I'm not on the list. ]

DROP TABLE does not seem to allow me to fully drop a table. Example:

test=# CREATE TABLE x (id SERIAL);
NOTICE: CREATE TABLE will create implicit sequence 'x_id_seq' for SERIAL column 'x.id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'x_id_key' for table 'x'CREATE

The notices look ominous, but I understand their meaning. OK. Now
say I want to drop the table:

test=# DROP TABLE x;
DROP

Cool. Now say I want to create an `x' table again:

test=# CREATE TABLE x (id SERIAL);
NOTICE: CREATE TABLE will create implicit sequence 'x_id_seq' for SERIAL column 'x.id'
NOTICE: CREATE TABLE/UNIQUE will create implicit index 'x_id_key' for table 'x'
ERROR: Relation 'x_id_seq' already exists

Huh? What is this? Oh, x_id_key somehow survived DROP TABLE. Maybe
I can use DROP INDEX to drop it?

test=# DROP INDEX x_id_seq;
ERROR: relation "x_id_seq" is of type "S"

Oh, x_id_seq is of type "S" -- of course I can't delete it. That was
a joke. Seriously, what am I supposed to do to get rid of it?

Or, better said, what do I do to completely and totally delete a
table?

#2W. van den Akker
wvdakker@wilsoft.nl
In reply to: Hrvoje Niksic (#1)
Error-message in other language

To all cracks,

I'am using PostgreSQL for a project. The users of the programs
aren't happy with the English-messages returned from 'PQerrorMessage'.
Is it possible to create and load a localized message file, so that
errormessage
can be shown to the users in their own language?

If not possible, perhaps a comming feature for version 7.x??

gr,

Willem

#3Peter Eisentraut
peter_e@gmx.net
In reply to: W. van den Akker (#2)
Re: Error-message in other language

W. van den Akker writes:

I'am using PostgreSQL for a project. The users of the programs aren't
happy with the English-messages returned from 'PQerrorMessage'. Is it
possible to create and load a localized message file, so that
errormessage can be shown to the users in their own language?

Not from PostgreSQL's side.

If not possible, perhaps a comming feature for version 7.x??

I think so.

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden