Re: patch: plpgsql - access records with rec.(expr)

From: Matt <matt(at)kynx(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: plpgsql - access records with rec.(expr)
Date: 2004-11-18 15:36:35
Message-ID: 1100792195.4229.125.camel@matt.kynx.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 5. Because of the way the expression is parsed (looking for closing
> parenth), this will choke if you try and put a function in there. Would
> it be better to use curly braces '{expr}' or another character to mark
> the expression?

I lie! pgpgsql_read_expression() is smarter than that!

However, I do have another problem. If the value of the expr changes
inside a loop to a fieldname of a different type, it dies with the "type
of \"%s\" does not match that when preparing the plan" message, which is
quite true: it obviously doesn't.

Just setting expectedtypeoid to InvalidOid bombs the whole thing :(
Hrm.... the "best made plans" and all that...

Matt

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-18 15:45:53 Re: invalid page header
Previous Message G u i d o B a r o s i o 2004-11-18 14:37:41 invalid page header