From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | hackers(at)postgreSQL(dot)org (PostgreSQL-development) |
Subject: | regproc fix |
Date: | 1998-10-02 05:28:26 |
Message-ID: | 199810020528.BAA27973@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have implemented a regproc fix.
Now, if you supply just the pg_proc.proname, and it is unique, you can
use it.
If there is more than one match for that proname, it prints a message
saying you have to supply the oid in quotes:
test=> create table testr(x regproc);
CREATE
test=> insert into testr values ('int4in');
INSERT 18665 1
test=> insert into testr values (300);
ERROR: parser: attribute 'x' is of type 'regproc' but expression is of type 'int4'
You will need to rewrite or cast the expression
test=> insert into testr values ('300');
INSERT 18666 1
test=> insert into testr values ('int4');
ERROR: There is more than one procedure named oid4.
Supply the desired pg_proc oid inside single quotes.
One remaining problem is that you have to supply the oid in quotes,
because regproc has to get a string, not an int. Perhaps we need
another regprocin that allows int4 or char*, but I don't think you can
allow two input functions for a type.
Perhaps we can just leave it. We also output the proname, even if they
used the oid as input.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-10-02 05:34:36 | Re: [HACKERS] Names that suddenly include an OID |
Previous Message | Bruce Momjian | 1998-10-02 05:10:31 | Re: [HACKERS] SQL92 |