Re: Special table names

From: Marcin Krol <mrkafk(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Special table names
Date: 2010-02-26 16:23:52
Message-ID: 4B87F598.2010806@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Marcin Krol 2010-02-26 16:26:51 Re: Special table names
Previous Message Michael Wood 2010-02-26 14:59:22 Re: Special table names