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

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

From
pgsql-bugs@postgresql.org
Date:
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
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