Re: Patch for column properties

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Patch for column properties
Date: 2007-03-04 10:24:49
Message-ID: 45EA9E71.3020906@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Dave Page a écrit :
> Guillaume Lelarge wrote:
>> Hi,
>>
>> When someone set a default value for a column and set NOT NULL at the
>> same time, the query could fail if the table already contains NULL
>> values for this column. This patch adds an UPDATE statement to put the
>> DEFAULT value in this column for all NULL values (but only when you
>> SET NULL and SET DEFAULT the column at the same time).
>>
>> I've done this patch for a friend but I don't quite like this patch
>> because of its behaviour. It doesn't warn the user. I think it would
>> be better to show a dialog telling that an UPDATE statement will be
>> executed because otherwise the whole action could fail.
>>
>> So here are some questions :
>> * do you think this patch is worth it ?
>
> I'm not keen on the idea.I prefer to leave that sort of behaviour to the
> server, *if* thats the way it gets written.
>

I don't think this is something that will be done ever by the server. We
have everything we want to be able to dot it. Each statement is
available. I think this is more a user app issue than a server issue.
But I understand you're not confortable adding this behavior. I know I'm
not.

Perhaps this can be available as on option, disabled by default ?

Regards.

--
Guillaume.
<!-- http://abs.traduc.org/
http://lfs.traduc.org/
http://docs.postgresqlfr.org/ -->

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2007-03-04 10:32:37 Re: Patch for column properties
Previous Message svn 2007-03-02 19:27:53 SVN Commit by dpage: r5972 - trunk/pgadmin3/pgadmin/dlg