Re: Fwd: Proposal: variant of regclass

Поиск
Список
Период
Сортировка
От Yugo Nagata
Тема Re: Fwd: Proposal: variant of regclass
Дата
Msg-id 20140408160124.9a511de9.nagata@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: Fwd: Proposal: variant of regclass  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Fwd: Proposal: variant of regclass  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, 7 Apr 2014 12:00:49 -0400
Robert Haas <robertmhaas@gmail.com> wrote:

> In other words, let's revert the whole refactoring of this file to
> create reg*_guts functions, and instead just copy the relevant logic
> for the name lookups into the new functions.  For to_regproc(), for
> example, it would look like this (untested):
>
>       names = stringToQualifiedNameList(pro_name_or_oid);
>       clist = FuncnameGetCandidates(names, -1, NIL, false, false, false);
>       if (clist == NULL || clist->next != NULL)
>            result = InvalidOid;
>       else
>            result = clist->oid;
>
> With that change, this patch will actually get a whole lot smaller,
> change less already-existing code, and deliver cleaner behavior.

Here is an updated patch. I rewrote regproc.c not to use _guts functions,
and fixed to_reg* not accept a numeric OID. I also updated the documents
and some comments. Is this better than the previous one?

>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company


--
Yugo Nagata <nagata@sraoss.co.jp>

Вложения

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

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Doc typo in "9.28. Event Trigger Functions"
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Including replication slot data in base backups