pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ParsedStatement Behavior
2+ messages / 2 participants
[nested] [flat]

* ParsedStatement Behavior
@ 2006-11-28 02:31  alfranio correia junior <alfranio@lsd.di.uminho.pt>
  0 siblings, 1 reply; 2+ messages in thread

From: alfranio correia junior @ 2006-11-28 02:31 UTC (permalink / raw)
  To: pgsql-jdbc

Please, if there is any archive on this let me know.
I was wondering if the reasons to have an specific protocol in order to 
prepare statements are:

1 - Previous versions of the driver used PREPARE and EXECUTE to 
implement server-prepared statements. This is supported on all server 
versions beginning with 7.3, but produced application-visible changes in 
query results, such as missing ResultSet metadata and row update counts.

2 - The need to transfer strange data types such as circle, point.

3 - To Improve performance as binary data type is usually shorter and 
avoid converting from text to binary and vice-versa.

Disregarding such reasons, might I use "prepare name statement" ?

Regards,

Alfranio.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ParsedStatement Behavior
@ 2006-12-01 14:09  Kris Jurka <books@ejurka.com>
  parent: alfranio correia junior <alfranio@lsd.di.uminho.pt>
  0 siblings, 0 replies; 2+ messages in thread

From: Kris Jurka @ 2006-12-01 14:09 UTC (permalink / raw)
  To: alfranio correia junior <alfranio@lsd.di.uminho.pt>; +Cc: pgsql-jdbc



On Tue, 28 Nov 2006, alfranio correia junior wrote:

> Please, if there is any archive on this let me know.
> I was wondering if the reasons to have an specific protocol in order to 
> prepare statements are:
>
> 1 - Previous versions of the driver used PREPARE and EXECUTE to implement 
> server-prepared statements. This is supported on all server versions 
> beginning with 7.3, but produced application-visible changes in query 
> results, such as missing ResultSet metadata and row update counts.
>
> 2 - The need to transfer strange data types such as circle, point.
>
> 3 - To Improve performance as binary data type is usually shorter and avoid 
> converting from text to binary and vice-versa.
>
> Disregarding such reasons, might I use "prepare name statement" ?

There's nothing stopping you from doing so.  The only potential problem is 
that I think one of the older server versions does not take bind 
parameters passed to execute, but a recent release should avoid that.  The 
other question is why?  The only advantage that I can see is that you have 
better control of the lifespan of prepared statements.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-12-01 14:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-28 02:31 ParsedStatement Behavior alfranio correia junior <alfranio@lsd.di.uminho.pt>
2006-12-01 14:09 ` Kris Jurka <books@ejurka.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox