Re: default values

From: Barry Lind <blind(at)xythos(dot)com>
To: Felipe Schnack <felipes(at)ritterdosreis(dot)br>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: default values
Date: 2002-11-20 04:00:20
Message-ID: 3DDB08D4.1030209@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Support for server side prepared statements was added in this way
because there is no other easy way to use them in standard jdbc.
However in this case there is an easy way to get default values using
standard jdbc functionality. I just don't see any compelling reason to
add this extension.

But if you want to add it and provide a patch (and especially test all
the different cases, like server prepared statements, updateable result
sets, callable statements, etc), I would apply the patch, but I don't
plan to spend any time working on this myself.

--Barry

Felipe Schnack wrote:
> So why setUseServerSidePrepare() was implemented? This is not potable,
> not standard, not anything.
>
> On Mon, 2002-11-18 at 22:48, Barry Lind wrote:
>
>>
>>Felipe Schnack wrote:
>>
>>> 2- This feature is avaliable in pgsql. Why not implement it?
>>>
>>
>>Since default column capability isn't part of the jdbc standard yet (but
>>since it is part of the SQL standard, I would expect it to be added
>>someday to the jdbc spec), adding support for it would require the user
>>to write non-portable jdbc code. Since there is a portable way to
>>accomplish the same thing (i.e. not include the column in the insert), I
>>don't see a compelling reason to add this functionality.
>>
>>thanks,
>>--Barry
>>
>>
>>
>>
>>>On Mon, 2002-11-18 at 17:16, Stuart Robinson wrote:
>>>
>>>
>>>>Hi, Felipe.
>>>>
>>>>I'm been trying to follow the discussion about default values and I'm a little
>>>>confused. I think David's reply is sensible. Unless I'm missing something, I
>>>>don't think there's an issue for inserts. All you have to do is not specify the
>>>>default column in the insert and it will automatically get the default value. I
>>>>think the issue only arises when you do updates, if you want to revert to the
>>>>default for a column that has been changed since it was originally inserted.
>>>>
>>>>Ate mais,
>>>>Stuart
>>>>
>>>>Quoting David Wall <David(dot)Wall(at)Yozons(dot)com>:
>>>>
>>>>
>>>>
>>>>>Why not simply remove varcharfield2 from the INSERT statement and let the
>>>>>database insert that value with the default value? Isn't the purpose of a
>>>>>default value to have the DB put that value in when none is specified?
>>>>
>>>>--
>>>>Stuart Robinson <stuart(at)zapata(dot)org>
>>>>
>>>>
>>>>-------------------------------------------------
>>>>This mail sent through IMP: http://horde.org/imp/
>>>
>>
>>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2002-11-20 08:07:34 Re: jdbc bug/feature?
Previous Message Dror Matalon 2002-11-20 01:28:26 Re: default values