Lists: | pgsql-patches |
---|
From: | nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) |
---|---|
To: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | prepareable statements |
Date: | 2002-07-31 21:18:16 |
Message-ID: | 20020731211816.GA28380@klamath.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
I've attached an updated version of the prepareable statements patch. It
is very similar to the latest patch I posted on -hackers -- the only new
changes are a few comment fixes, an unrelated typo fix, and re-sync
with latest CVS. I'm not aware of any outstanding issues with the patch,
so if you'd like me to change something, let me know.
The current syntax is:
PREPARE q1(a,b,c) AS ...;
EXECUTE q1(1,2,3);
DEALLOCATE q1;
Peter objected to the EXECUTE syntax, whereas Rod Taylor said it was
good. Not really sure which way to go...
Cheers,
Neil
--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC
Attachment | Content-Type | Size |
---|---|---|
new_qcache-15.patch | text/plain | 44.8 KB |
From: | Rod Taylor <rbt(at)zort(dot)ca> |
---|---|
To: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: prepareable statements |
Date: | 2002-07-31 22:24:20 |
Message-ID: | 1028154261.4116.40.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
> Peter objected to the EXECUTE syntax, whereas Rod Taylor said it was
> good. Not really sure which way to go...
Why I like Execute:
CALL is for use with functions, so they're different (non-conflicting)
commands.
Works like a function call -- but it's not a function. It implies your
running something that has been prepared or compiled. You compile the
source (etc.), then execute the binary.
You prepare the statement, then execute the result.
Lastly, Perl (DBI) uses execute(args) for a prepared statement so it's
somewhat familiar for a large group.
From: | Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: prepareable statements |
Date: | 2002-08-01 10:30:10 |
Message-ID: | 20020801123009.D10347@zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Wed, Jul 31, 2002 at 05:18:16PM -0400, Neil Conway wrote:
> I've attached an updated version of the prepareable statements patch. It
> is very similar to the latest patch I posted on -hackers -- the only new
> changes are a few comment fixes, an unrelated typo fix, and re-sync
> with latest CVS. I'm not aware of any outstanding issues with the patch,
> so if you'd like me to change something, let me know.
>
> The current syntax is:
>
> PREPARE q1(a,b,c) AS ...;
>
> EXECUTE q1(1,2,3);
>
> DEALLOCATE q1;
>
> Peter objected to the EXECUTE syntax, whereas Rod Taylor said it was
> good. Not really sure which way to go...
I agree with Peter. SQL is not language like C (or others). SQL
queries seem like English sentence and rather then braces use
standard words. The construction q1(1,2,3) seems like table 'q1'
and fields a, b, c or it seems line function call.
IMHO this your syntax is not consisten with other SQL syntax, it's
SQL by C/C++ programmer's glasses :-)
BTW -- Neil, I must thank to you. I'm very glad you finish my old
ideas and work/experiments and put it official tree. Thanks!
Karel
--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
From: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
---|---|
To: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: prepareable statements |
Date: | 2002-08-07 02:57:54 |
Message-ID: | 87fzxrml3h.fsf@klamath.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) writes:
> I've attached an updated version of the prepareable statements patch. It
> is very similar to the latest patch I posted on -hackers -- the only new
> changes are a few comment fixes, an unrelated typo fix, and re-sync
> with latest CVS. I'm not aware of any outstanding issues with the patch,
> so if you'd like me to change something, let me know.
Here's the patch, re-synced with latest CVS -- no other changes.
Regarding the syntax debate, my personal preference is to stick with
the current (function-like) syntax, but I'm not too worried about this
point. I'd prefer that the patch be committed in one form or another
reasonably quickly, so that I have enough time to write the
documentation and do some general "polish" work before the beta.
Let me know what changes, if any, still need to be made.
Cheers,
Neil
--
Neil Conway <neilconway(at)rogers(dot)com>
PGP Key ID: DB3C29FC
Attachment | Content-Type | Size |
---|---|---|
new_qcache-16.patch | text/x-patch | 44.8 KB |