Re: Special table names - Mailing list pgsql-novice

From Marcin Krol
Subject Re: Special table names
Date
Msg-id 4B87F598.2010806@gmail.com
Whole thread Raw
In response to Re: Special table names  (Michael Wood <esiotrot@gmail.com>)
Responses Re: Special table names
List pgsql-novice
Michael Wood wrote:
> It seems SQLAlchemy lied to you about creating the table, or perhaps
> you did not check an error code or something.
>
> blah=> create table user (id int);
> ERROR:  syntax error at or near "user"
> LINE 1: create table user (id int);

Apparently it did lie, bc I was able to write objects to that table
without problems IIRC.

>                      ^
>
> Note that it says "syntax error" and not "relation already exists".

SQLA typically does various stuff with table names, uses a lot of
aliases etc. (well it has to considering potential conflicts) so I
wouldn't be surprised if other DBs don't have smth like function or
table 'user' available globally everywhere, so SQLA author had to do
some PG-specific hack around that.

> I suppose any function in the list Andreas pointed you at that don't
> have parentheses.  Also anything called pg_something.  Not sure what
> else.

Thanks!


pgsql-novice by date:

Previous
From: Michael Wood
Date:
Subject: Re: Special table names
Next
From: Marcin Krol
Date:
Subject: Re: Special table names