Re: stored function, multiple queries, best practices

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Ash Grove <ash_grv7(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: stored function, multiple queries, best practices
Date: 2006-04-16 01:07:34
Message-ID: 444198D6.4080805@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Ash Grove wrote:
>
>>Why assemble a string and parse it? Why not just use
>>multiple parameters
>>directly?
>>-O
>
>
>
> So, Oliver, you're suggesting something like "call
> myfunction('query1','query2','query3')"?

No, I'm suggesting:

call myfunction('data value 1', 42, 1.234, 'data value 4')

I am assuming you know the combinations of updates you will need to run
ahead of time. If you want to run arbitary queries then you are probably
stuck with doing some parsing in the function .. but that is pretty nasty.

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message David Goodenough 2006-04-16 20:58:23 Re: What is the number equivalient of LIMIT ALL
Previous Message Clemens A Mensik 2006-04-15 06:42:38 test-mail