Re: column default dependant on another columns value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Fernando Hevia" <fhevia(at)ip-tel(dot)com(dot)ar>
Cc: "'Richard Broersma'" <richard(dot)broersma(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: column default dependant on another columns value
Date: 2008-07-01 22:24:24
Message-ID: 25086.1214951064@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Fernando Hevia" <fhevia(at)ip-tel(dot)com(dot)ar> writes:
> Anyway, the rule didn't work. Got "an infinite recursion error" when
> inserting on the table.
> Can't figure out where the recursion is

You didn't show us the rule, but I imagine that you think the WHERE
clause is applied while expanding the rule. It's not, it can only
suppress rows at run-time; and what you've got is infinite macro
expansion recursion.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Fernando Hevia 2008-07-02 13:52:02 Re: column default dependant on another columns value
Previous Message Fernando Hevia 2008-07-01 21:51:27 Re: column default dependant on another columns value