Re: Junk queries with variables?

From: "Steve - DND" <postgres(at)digitalnothing(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Junk queries with variables?
Date: 2005-02-24 17:11:04
Message-ID: LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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.

Thanks,
Steve

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-02-24 17:15:32 Re: Junk queries with variables?
Previous Message Steve - DND 2005-02-24 17:10:43 Re: Junk queries with variables?