pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve - DND <postgres@digitalnothing.com>
To: Richard Huxton <dev@archonet.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Junk queries with variables?
Date: Thu, 24 Feb 2005 10:11:04 -0700
Message-ID: <LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com> (raw)
In-Reply-To: <421D8F0B.1060409@archonet.com>

> 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





view thread (13+ messages)  latest in thread

Message-ID: <LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com>
Permalink:  ../LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com/
Also on:    postgresql.org/message-id/LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: postgres@digitalnothing.com, dev@archonet.com
  Subject: Re: Junk queries with variables?
  In-Reply-To: <LDEHKBBOEMIJKHKBOFNFMEHFLLAA.postgres@digitalnothing.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox