Re: Junk queries with variables?

Поиск
Список
Период
Сортировка
Искать
От
Richard Huxton
Тема
Re: Junk queries with variables?
Дата
Msg-id
421E0ECA.7090403@archonet.com
Ответ на
Список
Дерево обсуждения
Junk queries with variables? "Steve - DND" <postgres@digitalnothing.com>
Re: Junk queries with variables? Michael Fuhr <mike@fuhr.org>
Re: Junk queries with variables? "Steve - DND" <postgres@digitalnothing.com>
Re: Junk queries with variables? Bricklen Anderson <BAnderson@PresiNET.com>
Re: Junk queries with variables? Richard Huxton <dev@archonet.com>
Re: Junk queries with variables? "Steve - DND" <postgres@digitalnothing.com>
Re: Junk queries with variables? Richard Huxton <dev@archonet.com>
Re: Junk queries with variables? Tom Lane <tgl@sss.pgh.pa.us>
Steve - DND wrote:
>>Michael's given you one option - another to look at is PREPARE/EXECUTE
>>PREPARE my_query(int4) AS INSERT INTO foo VALUES ($1);
>>EXECUTE my_query(1);
>>EXECUTE my_query(7);
>>...
> 
> 
> This doesn't seem to be quite what I'm looking for. PREPARE according to the
> docs is for a one line statement. I'm looking for the ability to do multiple
> operations, basically using it for general DB queries that aren't really
> needed more than once. This again comes from my MSSQL background where you
> can go to town and just start writing out TSQL to do one off queries.

Well, if psql vars, prepare or functions don't meet your needs, I'm not 
sure we've got anything that will.

Have you got a specific example where these don't suit your needs?
--  Richard Huxton  Archonet Ltd

В списке pgsql-sql по дате отправления
От: Kent Anderson
Дата:
От: Joel Fradkin
Дата:
FAQ