impossible to create a table having the same name of a sequence object

Started by PostgreSQL Bugs Listover 25 years ago2 messagesbugs
Jump to latest
#1PostgreSQL Bugs List
pgsql-bugs@postgresql.org

jose (jose@sferacarta.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
impossible to create a table having the same name of a sequence object

Long Description
prova=# \d
List of relations
Name | Type | Owner
--------------+----------+----------
a | sequence | postgres
comuni | table | postgres
distributors | table | postgres
films | table | postgres
tablename | table | postgres
(5 rows)

prova=# create table a(id int);
ERROR: Relation 'a' already exists
prova=#

Sample Code

No file was uploaded with this report

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PostgreSQL Bugs List (#1)
Re: impossible to create a table having the same name of a sequence object

pgsql-bugs@postgresql.org writes:

impossible to create a table having the same name of a sequence object

This is not a bug. A sequence is a table, of a sort, and so there's
just one namespace for both.

regards, tom lane