On Mon, 2004-11-22 at 10:06 +0000, Matt wrote:
> This would execute a string and pass back the result?

It would evaluate a string as a PL/PgSQL statement (which means you
could construct any PL/PgSQL statement dynamically, including access to
fields of a RECORD determined at runtime).

> > I don't like this: it implicitly coerces a string literal into an
> > identifier (i.e. a column name). Treating data as code can be useful,
> > but I think we need to make it more obvious to the user. I think a
> > proper EVALUATE statement might be a better solution.
> 
> See your point. But what about NEW.($1)?

I don't follow -- what do you mean?

(BTW, I think my comment also applies to variables of type "text" and
similar -- I think the patch would be a lot simpler if you just
implement access to record fields by ordinal position, and don't
implement access by field name.)

-Neil



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

Reply via email to