From: | Felipe Schnack <felipes(at)ritterdosreis(dot)br> |
---|---|
To: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: default values |
Date: | 2002-11-18 20:49:37 |
Message-ID: | 1037652577.1308.188.camel@desenv1.ritterdosreis.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Yes, and you're not wrong (but I don't consider it right too)
1- As I said, my reasons to want that are laziness :-)
Why? Because I store my inserts in an separated, XML file, so I can't
build sql commands on the fly, adding parameters as required, as many
people do. So, as I am lazy, I want to use the same insert command, but
specify that a specific column should get its default value. Is much
easier than edit a separated file, etc, etc
2- This feature is avaliable in pgsql. Why not implement it?
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
From | Date | Subject | |
---|---|---|---|
Next Message | Nic Ferrier | 2002-11-18 20:58:52 | Re: streaming result sets: progress |
Previous Message | Dror Matalon | 2002-11-18 19:52:10 | Re: Create table & serial question |