Re: Does PostgreSQL support Dynamic SQL? - Mailing list pgsql-general

From Tom Lane
Subject Re: Does PostgreSQL support Dynamic SQL?
Date
Msg-id 21193.979535840@sss.pgh.pa.us
Whole thread Raw
In response to RE: Does PostgreSQL support Dynamic SQL?  (Mike Mascari <mascarm@mascari.com>)
List pgsql-general
Mike Mascari <mascarm@mascari.com> writes:
> Its an extension to the embedded SQL preprocessor which allows you to
> dynamically build queries at run-time, instead of compile-time.
> [...]
> you can *dynamically* build a SELECT statement, ask the database for a
> description of the result sets' attributes, allocate the variables
> dynamically to hold the results, and then perform the FETCH.

Well, this is obviously trivial if you use libpq directly.  I don't
know whether ecpg emulates the spec's idea of the right API for it,
however.

            regards, tom lane

pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: RE: Does PostgreSQL support Dynamic SQL?
Next
From: Anand Raman
Date:
Subject: Re: Newbie question