Re: [GENERAL] plpgsql/rule question

2005-01-11 Thread Michael Fuhr
On Tue, Jan 11, 2005 at 07:13:25PM -0700, Ed L. wrote: > > Is it possible to tell if a column in a NEW record in a plpgsql function was > explicitly specified as NULL or simply left out altogether? Why would you want to? What problem are you trying to solve? -- Michael Fuhr http://www.fuhr.or

Re: [GENERAL] plpgsql/rule question

2005-01-11 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > The reason I ask is because I'd like to allow any explicitly specified > values for the view insert, including NULL, to be passed through to the > table insert and override the column defaults. Possibly you can solve your problem by attaching the defaults t

Re: [GENERAL] plpgsql/rule question

2005-01-11 Thread Ed L.
On Tuesday January 11 2005 8:58, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > The reason I ask is because I'd like to allow any explicitly specified > > values for the view insert, including NULL, to be passed through to the > > table insert and override the column defaults. > > Possib

Re: [GENERAL] plpgsql/rule question

2005-01-11 Thread Ed L.
On Tuesday January 11 2005 8:40, Tom Lane wrote: > > > > Is it possible to distinguish within plpgsql between these two queries? > > > > insert into foo (msg) values ('Hello') > > insert into foo (id, msg) values (NULL, 'Hello') > > Well, yes, because the default value in the former case wi

Re: [GENERAL] plpgsql/rule question

2005-01-11 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: > For example, if I have the following table: > create table foo(id serial, msg varchar) > Is it possible to distinguish within plpgsql between these two queries? > insert into foo (msg) values ('Hello') > insert into foo (id, msg) values (NU

[GENERAL] plpgsql/rule question

2005-01-11 Thread Ed L.
Is it possible to tell if a column in a NEW record in a plpgsql function was explicitly specified as NULL or simply left out altogether? For example, if I have the following table: create table foo(id serial, msg varchar) Is it possible to distinguish within plpgsql between these two q