Re: default values

From: Dror Matalon <dror(at)zapatec(dot)com>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: default values
Date: 2002-11-20 01:28:26
Message-ID: 20021120012826.GI43588@four.zapatec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Folks,

This is functionality that's easy to accomplish with the existing
driver, or with minor client side changes. There's little demand for
it so why do we need to change the driver for it?

Dror

On Tue, Nov 19, 2002 at 08:17:25PM -0500, Dave Cramer wrote:
> Well, the only way this is going to work is if you cast it into a
> postgres resultset.
>
> I don't have any particular objection to this extension.
>
> Dave
> On Tue, 2002-11-19 at 18:44, Stuart Robinson wrote:
> > I think Felipe has a point here. I don't see any good reason why the driver's
> > methods can't be a SUPERSET of those specified in the JDBC standard. As long
> > as there's nothing forcing you to use the non-standard methods, it should be
> > fine. So, for those who wish to stick to the standard for portability, there
> > is predictable behavior; and for those who want some of the extra goodies
> > provided by Postgres, there are options.
> >
> > -Stuart
> >
> > Quoting Felipe Schnack <felipes(at)ritterdosreis(dot)br>:
> >
> > > 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/
> > > > >
> > > >
> > > >
> > > >
> > > --
> > >
> > > Felipe Schnack
> > > Analista de Sistemas
> > > felipes(at)ritterdosreis(dot)br
> > > Cel.: (51)91287530
> > > Linux Counter #281893
> > >
> > > Faculdade Ritter dos Reis
> > > www.ritterdosreis.br
> > > felipes(at)ritterdosreis(dot)br
> > > Fone/Fax.: (51)32303328
> > >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 2: you can get off all lists at once with the unregister command
> > > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> > >
> >
> >
> > --
> > Stuart Robinson <stuart(at)zapata(dot)org>
> >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> --
> Dave Cramer <Dave(at)micro-automation(dot)net>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2002-11-20 04:00:20 Re: default values
Previous Message Dave Cramer 2002-11-20 01:17:25 Re: default values