Re: pg_operator.oprcode in 9.2rc1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_operator.oprcode in 9.2rc1
Date
Msg-id 27380.1346352963@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_operator.oprcode in 9.2rc1  (Joe Abbate <jma@freedomcircle.com>)
List pgsql-hackers
Joe Abbate <jma@freedomcircle.com> writes:
> Yes, I suspected that an OID was stored.  What I'd still quibble with is
> the use of the ambiguous regproc in pg_operator (also pg_type) and the
> still-ambiguous schema-qualified proc name.  I guess it's not feasible
> (at least, short term), but it'd be preferable to store a "raw" OID and
> let the user cast to regprocedure (or change the 'regproc' to
> 'regprocedure').

Yeah, ideally those columns would be regprocedure.  There are
bootstrapping problems involved though with populating the initial
contents of the catalogs during initdb --- the regprocedure input
function doesn't work in that environment.  (It might be possible to
hack something for pg_operator, but the circularity is rather
fundamental for loading pg_type, since the input function would need to
consult pg_type to make sense of argument types.)

In the meantime I'd suggest casting the columns to regprocedure when
querying, if you want unambiguous results.  That's what pg_dump does.
Or you can cast to OID if you like numbers.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Joe Abbate
Date:
Subject: Re: pg_operator.oprcode in 9.2rc1
Next
From: Robert Haas
Date:
Subject: Re: Wiki link for max_connections? (Fwd: Re: [ADMIN] PostgreSQL oom_adj postmaster process to -17)