Re: Values of fields in Rules - Mailing list pgsql-hackers

From mito
Subject Re: Values of fields in Rules
Date
Msg-id gtq349$2gil$1@news.hub.org
Whole thread Raw
In response to Values of fields in Rules  (mito <milos.orszag@gmail.com>)
Responses Re: Values of fields in Rules  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: bytea vs. pg_dump
Next
From: Robert Haas
Date:
Subject: Re: Wrong stats for empty tables