Re: Fwd: Proposal: variant of regclass

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, Marti Raudsepp <marti(at)juffo(dot)org>, Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, Pavel Golub <pavel(at)microolap(dot)com>, Pavel Stěhule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Fwd: Proposal: variant of regclass
Date: 2014-04-07 16:59:36
Message-ID: 22065.1396889976@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> There's actually another good reason to not copy regclass's behaviour:

> postgres=# CREATE TABLE "123"();
> CREATE TABLE
> postgres=# SELECT '123'::regclass;
> regclass
> ----------
> 123
> (1 row)

> I don't think that's fixable for ::regclass, but we shouldn't copy it.

I think that's not proving what you thought; the case is correctly handled
if you quote:

regression=# create table "123"(z int);
CREATE TABLE
regression=# select '123'::regclass;
regclass
----------
123
(1 row)

regression=# select '"123"'::regclass;
regclass
----------
"123"
(1 row)

But I agree that we don't want these functions accepting numeric OIDs,
even though ::regclass must.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-04-07 17:01:52 Re: B-Tree support function number 3 (strxfrm() optimization)
Previous Message Fabrízio de Royes Mello 2014-04-07 16:47:10 Re: Including replication slot data in base backups