Re: Prepared statement already exists

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Prepared statement already exists
Date: 2008-11-20 14:18:28
Message-ID: 20081120141828.GN2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 20, 2008 at 04:03:08PM +0200, WireSpot wrote:
> On Thu, Nov 20, 2008 at 15:45, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> > Have you thought about using stored procedures instead of prepared
> > statements? No need to register them or keep track of that state.
>
> I'm not sure if it would work. What I'm trying to do is have an
> application layer which takes all the client queries and makes
> prepared statements out of them.

I think it depends on what level this abstraction wants to live. If
its purpose is just to make queries run a bit quicker then, no, stored
procedures aren't going to help at all. If this abstraction can be
given knowledge of the things that you actually want to do against the
database then stored procedures could be a win.

The best structure will be determined by your problem, I just thought
that mentioning another solution may push your mental model around a bit
to help clarify the "best" solution.

Sam

In response to

Browse pgsql-general by date

  From Date Subject
Next Message WireSpot 2008-11-20 14:24:14 Re: Prepared statement already exists
Previous Message Alvaro Herrera 2008-11-20 14:07:24 Re: Prepared statement already exists