> A bit of context here. The perl DBD::Pg developers are trying to
figure
> out
> how to implement prepared queries sanely. As it stands now they're
> basically
> writing off both binary prepared queries and SQL based prepared
queries as
> basically useless. It would be a shame to have a brand new binary
protocol
> but
> find it ignored by driver writers.
> 
> The problem is that you want to be able to do
> 
>  $sth = $dbh->prepare("SELECT col_a FROM tab WHERE col_b = ?");
>  $sth->execute(1);
>  ...
> 
> And not have to jump through hoops binding parameters to types and so
on.
> 

suggestion: default to text type ('character varying') and overload your
prepare method to allow a vector of types for special cases.  It follows
that if you don't know what type you are dealing with than it gets dealt
with as a string.

Question: what is the relevance of the binary protocol, are you trying
to send/fetch binary data via the command interface?

Merlin


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to