Re: Fwd: Proposal: variant of regclass

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: Proposal: variant of regclass
Дата
Msg-id 22065.1396889976@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fwd: Proposal: variant of regclass  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Fwd: Proposal: variant of regclass  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: B-Tree support function number 3 (strxfrm() optimization)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Fwd: Proposal: variant of regclass