Re: PL/PGSQL function with parameters

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <janwieck(at)Yahoo(dot)com>, sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: PL/PGSQL function with parameters
Date: 2001-02-08 16:45:23
Message-ID: 3A82CD23.3584E7B8@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Tom, Jan,

> This is completely pointless, AFAICS. If you don't know what table
> is to be selected from, then you can't do *any* semantic checking or
> planning in advance, so you might as well just do the entire processing
> at runtime. That's exactly what EXECUTE does. I don't see any
> functional advantage in an intermediate step between plpgsql's normal
> behavior (caching of query plans) and EXECUTE. If it bought some
> readability over constructing a query string for EXECUTE, then maybe,
> but dealing in table and column OIDs is not my idea of a pleasant or
> readable way to program ...

Well, given that between you and Jan you have addressed dynamic
querying, it seems that there is no point in tinkering further. Always
great to find that a problem has already been solved.

If I wasn't up to my hairline in behind-schedule projects, I'd offer to
write this up for the User's Manual. Actually, consider that a
medium-term commitment ... before the end of the year, I'll write a much
longer PL/pgSQL chapter which Jan can review & correct. (I think I'm in
a postion to do so, as the current app uses a large assortment of
PL/pgSQL functions as pseudo-middleware).

-Josh Berkus

--
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh(at)agliodbs(dot)com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-02-08 16:45:38 pg_ctl default shutdown mode
Previous Message Ned Lilly 2001-02-08 16:34:15 Re: [GENERAL] Re: full text searching

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-02-08 16:47:38 Re: [SQL] Query never returns ...
Previous Message Brice Ruth 2001-02-08 16:19:43 Re: Query never returns ...