From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Wheeler <david(at)kineticode(dot)com>, pgsql-hackers(at)postgresql(dot)org, Rudy Lippan <rlippan(at)remotelinux(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Greg Sabino Mullane <greg(at)turnstep(dot)com> |
Subject: | Re: libpq and prepared statements progress for 8.0 |
Date: | 2004-09-18 01:14:50 |
Message-ID: | 414B8C0A.8000302@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> David Wheeler <david(at)kineticode(dot)com> writes:
>
>>To get initial PREPARE support, I don't think that the other DBD::Pg
>>developers mind sending strings to the PostgreSQL server in a SQL
>>PREPARE statement.
>
>
>>The question, in my mind, is it currently possible to do this without
>>specifying the type of every placeholder?
>
>
> Well, that's the problem: you can't. The SQL PREPARE command doesn't
> have any provision for dealing with unspecified parameters. I think
> this is reasonable since if it could, it would still have no way to tell
> you what it resolved the parameter types as.
But it sounds like the client doesn't care about the type info anyway;
it'd pass all the parameters as text and let the backend sort out the
types when doing implicit conversions in the EXECUTE parse step:
template1=> prepare s1(int) as select $1;
PREPARE
template1=> execute s1('12');
?column?
----------
12
(1 row)
(now replace "int" with "unknown"..)
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-09-18 01:23:55 | Re: libpq and prepared statements progress for 8.0 |
Previous Message | Bruce Momjian | 2004-09-18 00:27:55 | Re: libpq and prepared statements progress for 8.0 |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-09-18 01:23:55 | Re: libpq and prepared statements progress for 8.0 |
Previous Message | Bruce Momjian | 2004-09-18 00:27:55 | Re: libpq and prepared statements progress for 8.0 |