Re: Regclass and quoted table names

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Emmanuel Cecchet <manu(at)asterdata(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Regclass and quoted table names
Date: 2009-03-04 12:41:41
Message-ID: 4136ffa0903040441x5ef45455t2e6835292594e810@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 4, 2009 at 12:34 PM, Emmanuel Cecchet <manu(at)asterdata(dot)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 the
> default behavior to have a consistent quoted or non-quoted result?

regclass's output format is intended for human readers, not for
joining against text columns. Why would you need to be joining between
regclass and text anyways? Normally you would be joining regclass to
either regclass columns or oid columns where it does an integer
comparison.

Actually normally you would just be joining oid columns since most
catalog columns are declared to be oids rather than regfoo columns :(

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-03-04 13:26:36 Re: SQL/MED compatible connection manager
Previous Message Emmanuel Cecchet 2009-03-04 12:34:09 Re: Regclass and quoted table names