Re: Values of fields in Rules

From: mito <milos(dot)orszag(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Values of fields in Rules
Date: 2009-05-05 19:13:15
Message-ID: gtq349$2gil$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mito wrote:
> Hi,
>
> when i create rule(on insert) on view(select id, name from users), i
> will recieve values that were inserted in form of reference words
> new.id, new.name.
>
> if i insert into users (id, name) values (null, null);
> then new.id = null and new.name = null
>
> if i insert into users (name) values (null);
> then new.id = null and new.name = null
>
> is there any way how to distinguish that id column wasnt explicitly named?
>

is there any way how to determinate in rule that null comes from
explicit insert or from not naming column in insert statment

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-05-05 19:30:18 Re: Wrong stats for empty tables
Previous Message Robert Haas 2009-05-05 18:42:09 Re: ALTER TABLE should change respective views