Re: [HACKERS] Regclass and quoted table names

2009-03-04 Thread Emmanuel Cecchet
Tom Lane wrote: Emmanuel Cecchet m...@asterdata.com writes: It looks like the behavior of regclass is not consistent when table names are quoted. The name is returned without the quotes if the name is lower case with eventual trailing numbers, otherwise it is returned with quotes.

Re: [HACKERS] Regclass and quoted table names

2009-03-04 Thread Greg Stark
On Wed, Mar 4, 2009 at 12:34 PM, Emmanuel Cecchet m...@asterdata.com wrote: This is problematic in situations where the output of the cast is involved in some later join which returns incorrect results because of the extra double quotes surrounding the table name. Is there a way to override

Re: [HACKERS] Regclass and quoted table names

2009-03-04 Thread Tom Lane
Greg Stark st...@enterprisedb.com writes: On Wed, Mar 4, 2009 at 12:34 PM, Emmanuel Cecchet m...@asterdata.com wrote: This is problematic in situations where the output of the cast is involved in some later join which returns incorrect results because of the extra double quotes surrounding the

Re: [HACKERS] Regclass and quoted table names

2009-03-04 Thread Emmanuel Cecchet
marcin mank wrote: Use plain oids or regclass values, not a text column, if you are trying to store table identities. wouldn`t oids change on dump/reload? I don't know. I'd also be interested to know if there is a difference if we use pg_restore with a binary format or sql dump, or if

Re: [HACKERS] Regclass and quoted table names

2009-03-04 Thread marcin mank
Use plain oids or regclass values, not a text column, if you are trying to store table identities. wouldn`t oids change on dump/reload? Greetings Marcin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

[HACKERS] Regclass and quoted table names

2009-03-03 Thread Emmanuel Cecchet
Hi all, It looks like the behavior of regclass is not consistent when table names are quoted. The name is returned without the quotes if the name is lower case with eventual trailing numbers, otherwise it is returned with quotes. See some examples here: tpch=# CREATE VIEW test AS SELECT *

Re: [HACKERS] Regclass and quoted table names

2009-03-03 Thread Tom Lane
Emmanuel Cecchet m...@asterdata.com writes: It looks like the behavior of regclass is not consistent when table names are quoted. The name is returned without the quotes if the name is lower case with eventual trailing numbers, otherwise it is returned with quotes. It's intentional that it