On Fri, 14 Feb 2003, John Savage wrote:
> I came across the EXECUTE command while googling for a solution to this
> problem but found
> a) it was incredibly hard to read because of all the quotes and
> b) I couldn't find much documentation for it. It isn't mentioned on the main
> red hat postgreSQL manual pages at all
> (http://www.redhat.com/docs/manuals/database/) and the word EXECUTE isn't
> the best word to google on :). The best resource for plpgsql I could find is
> at http://www.phpfreaks.com/postgresqlmanual/page/plpgsql.html but I wasn't
> sure if this was going to help me. Are there any better resources for
> plpgsql? I'll look into it more now anyway. Thanks.
I don't know if techdocs has anything more useful, otherwise the official
interactive docs have a short section. (Programmer's Guide)
The short form is that for most general queries you want to run you can
make a string that contains the full query and then EXECUTE that string.