pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: andrew@pillette.com
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: ill-planned queries inside a stored procedure
Date: Sat, 28 Aug 2004 08:13:37 -0700
Message-ID: <200408281513.i7SFDbh04877@pillette.com> (raw)

I use "EXECUTE" inside a stored procedure for just this purpose. This is not the same as PREPARE/EXECUTE, it lets you send an arbitrary string as SQL within the procedure. You have to write the query text on the fly in the procedure, which can be a little messy with quoting and escaping.

Gaetano Mendola <mendola@bigfoot.com> wrote ..
> Hi all,
> do you know any clean workaround at ill-planned queries inside a stored
> procedure?



view thread (3+ messages)  latest in thread

Message-ID: <200408281513.i7SFDbh04877@pillette.com>
Permalink:  ../200408281513.i7SFDbh04877@pillette.com/
Also on:    postgresql.org/message-id/200408281513.i7SFDbh04877@pillette.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-performance@postgresql.org
  Cc: andrew@pillette.com, mendola@bigfoot.com
  Subject: Re: ill-planned queries inside a stored procedure
  In-Reply-To: <200408281513.i7SFDbh04877@pillette.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