Re: EXECUTE problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Felipe Schnack <felipes(at)ritterdosreis(dot)br>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: EXECUTE problems
Date: 2002-11-22 19:21:00
Message-ID: 26270.1037992860@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Felipe Schnack <felipes(at)ritterdosreis(dot)br> writes:
> I think it should... after all, why you can use DEFAULT in an normal
> insert but you can't in an prepared insert statement?

PREPARE isn't specific to INSERT statements. Even when you use it for
one, it's not very obvious how to assign a default value to the PREPARE
parameters; in any but the most trivial cases, there's not a one-for-one
correspondence between PREPARE parameters and target columns that might
(or might not) have defaults.

> I'm asking this because I'm implementing methods to support the new
> DEFAULT keyword in pgsql 7.3 for the JDBC driver... but if I can't use
> it in prepared sqls, a great deal of it usefulness will be shortened...

PREPAREing a query as trivial as an INSERT ... VALUES is largely a
waste of time anyway. So I cannot get excited about this.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Swinth 2002-11-22 19:26:06 Re: Unwanted Log Entries
Previous Message Don Isgitt 2002-11-22 19:14:26 Re: Lack of use of indexes