Re: Fwd: Proposal: variant of regclass

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavel Golub <pavel(at)gf(dot)microolap(dot)com>, Pavel Golub <pavel(at)microolap(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pavel Stěhule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: Fwd: Proposal: variant of regclass
Date: 2014-04-08 07:01:24
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 7 Apr 2014 12:00:49 -0400
Robert Haas <robertmhaas(at)gmail(dot)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:
> The Enterprise PostgreSQL Company

Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
to_regclass.patch.v7 application/octet-stream 29.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-04-08 07:08:20 Re: Including replication slot data in base backups
Previous Message Ian Barwick 2014-04-08 06:39:25 Doc typo in "9.28. Event Trigger Functions"