By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

ERROR: cache lookup for type 0 of ... pg.dropped.14........ failed

P: n/a
Hi All,
I run into an error message.
I have the following function where t_stockchanges is one of my tables.
--------------------------------------------
create or replace function get_last_open(int, int) returns setof
t_stockchanges AS '
declare
ProductID alias for $1;
StockID alias for $2;

q text;
Rec t_stockchanges%ROWTYPE;
begin
q := ''select * from t_stockchanges where '' ||
''stockid='' || quote_literal(StockID) || '' and '' ||
''productid='' || quote_literal(ProductID) || '' and '' ||
''changeid=1 order by time desc limit 1;'';
for Rec in execute q loop
return next Rec;
end loop;
return;
end;'
language 'plpgsql';
--------------------------------------------

Running the following query I get the error message:
#> select * from get_last_open(140,1);

WARNING: plpgsql: ERROR during compile of get_last_open near line 5

ERROR: cache lookup for type 0 of
t_stockchanges.........pg.dropped.14........ failed

------
Could anybody tell me how can I work it around. A tried to restart the
server to make empty the cache, but it seems to be worthless.

Thank you in advance.

Bye,
-- Csaba Egyd
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
=?iso-8859-2?Q?Egy=FCd_Csaba?= <cs*****@vnet.hu> writes:
WARNING: plpgsql: ERROR during compile of get_last_open near line 5
ERROR: cache lookup for type 0 of
t_stockchanges.........pg.dropped.14........ failed


7.3's plpgsql has some bugs with dropped columns. It's fixed in 7.4.
If you don't want to update at the moment, I'd suggest dropping and
recreating the whole t_stockchanges table.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.