Re: Dynamic SQL with pgsql, how to?

From: Maximilian Tyrtania <maximilian(dot)tyrtania(at)byte-employer(dot)de>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic SQL with pgsql, how to?
Date: 2010-05-04 06:44:34
Message-ID: BB360E2A-C056-41C5-A2C5-AC909BDE9B6D@byte-employer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 03.05.2010 um 23:50 schrieb Andre Lopes:

> Thanks for the reply's,
>
> I need to do a Dynamic SELECT INTO. There is a way of doing it?

Yes. Plpgsql supports this:

EXECUTE command-string [ INTO [STRICT] target ] [ USING expression [, ... ] ];

See http://developer.postgresql.org/pgdocs/postgres/plpgsql-statements.html

Max

Maximilian Tyrtania Software-Entwicklung
Dessauer Str. 6-7
10969 Berlin
Tel.: ++49/30/48827-952
Mobil: 0152/292 707 36
email: maximilian(dot)tyrtania(at)byte-employer(dot)de

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message AI Rumman 2010-05-04 07:09:01 PGPOOL II 2.3.3 encryption
Previous Message Yeb Havinga 2010-05-04 06:20:56 Re: GeSHi module for Postgresql?