[GENERAL] cannot use column references in default expression?

2010-05-28 Thread Jignesh Shah
Could anyone please help me to get rid of following error? I want to set the 'ishuman' column based on the value of 'ID' column but it is not allowing me to do so. Any alternatives? techdb= CREATE TABLE Users ( ID INTEGER, isHumanBOOLEAN NOT NULL

Re: [GENERAL] cannot use column references in default expression?

2010-05-28 Thread Craig Ringer
On 29/05/2010 1:20 AM, Jignesh Shah wrote: Could anyone please help me to get rid of following error? I want to set the 'ishuman' column based on the value of 'ID' column but it is not allowing me to do so. Any alternatives? Use a BEFORE trigger to set it. -- Craig Ringer -- Sent via

Re: [GENERAL] cannot use column references in default expression?

2010-05-28 Thread Jignesh Shah
Trigger should be the last solution. This used to be working but I think with latest postgresql upgrade, this stopped working. Might be someone around here knows whats going on here. Thanks, Jignesh On Fri, May 28, 2010 at 11:00 PM, Craig Ringer cr...@postnewspapers.com.auwrote: On 29/05/2010

Re: [GENERAL] cannot use column references in default expression?

2010-05-28 Thread Christophe Pettus
On May 28, 2010, at 10:41 AM, Jignesh Shah wrote: Trigger should be the last solution. This used to be working but I think with latest postgresql upgrade, this stopped working. Might be someone around here knows whats going on here. I'm afraid not. It's never been allowed to have a

Re: [GENERAL] cannot use column references in default expression?

2010-05-28 Thread Adrian Klaver
On 05/28/2010 10:41 AM, Jignesh Shah wrote: Trigger should be the last solution. This used to be working but I think with latest postgresql upgrade, this stopped working. Might be someone around here knows whats going on here. Thanks, Jignesh On Fri, May 28, 2010 at 11:00 PM, Craig Ringer

Re: [GENERAL] cannot use column references in default expression?

2010-05-28 Thread Nilesh Govindarajan
On Fri, May 28, 2010 at 10:50 PM, Jignesh Shah jignesh.shah1...@gmail.com wrote: Could anyone please help me to get rid of following error? I want to set the 'ishuman' column based on the value of 'ID' column but it is not allowing me to do so. Any alternatives? techdb= CREATE TABLE Users (