Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Bugs > Re: BUG #4120: ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 3720 of 4089
Post > Topic >>

Re: BUG #4120: ERROR: cache lookup failed for function 0

by pgsql-002@[EMAIL PROTECTED] (Pedro Gimeno) Apr 21, 2008 at 08:17 PM

Tom Lane wrote:

>> postgres=# select ''::varchar < ''::varchar;
>> ERROR:  cache lookup failed for function 0
>
> Interesting.  The symptom sounds vaguely familiar, though I can't find
> any relevant-looking CVS log entries right now.  I'd suggest updating to
> 8.2.7 before you spend much time looking at this.  If it's still there
> in 8.2.7, probably the most productive thing is to work on extracting
> a reproducible test case to send in.  I'd suggest approaching that by
> turning on log_statement to get a trace of everything the application
> does up to the failure, and then (assuming you can duplicate the failure
> by running that script) trimming it down to eliminate any private
> information.

Upgrading to 8.2.7 didn't fix it. Upon further investigation, I found
that I was getting the same error when I put a certain schema of my
database in the search_path. That led me at first to erroneously think
that when it started to fail it had become into a broken state. Actually
it happens every time that I put that particular schema in the
search_path. That reminded me of something and it turned out to be the
right track.

Here's a minimal test case:

pruebas=# CREATE FUNCTION vc_gt(varchar,varchar) RETURNS boolean
IMMUTABLE STRICT LANGUAGE SQL AS 'SELECT CAST($1 AS TEXT) > CAST($2 AS
TEXT);';
CREATE FUNCTION
pruebas=# CREATE OPERATOR > (
            PROCEDURE = vc_gt,
    LEFTARG = character varying,
    RIGHTARG = character varying,
    COMMUTATOR = <,
    RESTRICT = scalargtsel,
    JOIN = scalargtjoinsel
);
CREATE OPERATOR
pruebas=# SELECT ''::varchar < ''::varchar;
ERROR:  cache lookup failed for function 0

This was part of my workaround for bug #4083. I only needed MAX so I
only wrote the > operator. BTW, has #4083 been dismissed?

-- Pedro Gimeno

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
 




 4 Posts in Topic:
BUG #4120: ERROR: cache lookup failed for function 0
pgsql-002@[EMAIL PROTECTE  2008-04-21 13:05:24 
Re: BUG #4120: ERROR: cache lookup failed for function 0
tgl@[EMAIL PROTECTED] (T  2008-04-21 10:17:40 
Re: BUG #4120: ERROR: cache lookup failed for function 0
pgsql-002@[EMAIL PROTECTE  2008-04-21 20:17:00 
Re: BUG #4120: ERROR: cache lookup failed for function 0
tgl@[EMAIL PROTECTED] (T  2008-04-21 14:39:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 10:28:03 CDT 2008.