Re: Using CASE in plpgsql causes 'ERROR: cache lookup failed'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Using CASE in plpgsql causes 'ERROR: cache lookup failed'
Date: 2010-04-14 23:11:39
Message-ID: 16679.1271286699@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mario Splivalo <mario(dot)splivalo(at)megafon(dot)hr> writes:
> When I call 'service_something' function and provide nonexistent
> service_id I get this error:

> ERROR: cache lookup failed for type 37

Hmm. Looks like exec_eval_expr should be more careful about setting
a result datatype when the expression returns no rows. NULL is NULL,
but it still has a defined datatype ...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Mario Splivalo 2010-04-19 09:49:32 CHECK constraints with plpgsql functions - check 'fires' BEFORE data modification?
Previous Message Pavel Stehule 2010-04-14 16:14:30 Re: graphing time series data