On Thu, 2006-12-14 at 02:45 -0800, SunWuKung wrote: > > CREATE RULE new_entry AS ON INSERT to logview DO INSTEAD INSERT > > (id,tm,info) VALUES (COALESCE(new.id,[default]),COALESCE(new.tm > > ,[default]),COALESCE(new.info,[default])); > > what would [default] insert here? > the default of the view or the default of the underlying table? I admit, I haven't tested that myself yet. But as I understand 'the theory', it would be the default of a VIEW. This is because we don't have any means to access the [default] of an underlaying table (nothing like 'foreign-default-reference' :), so we define a [default] for a VIEW as an entirely separate entity. This might be a problem for sequences, but in that case, we may put *the*same* sequence for a VIEW [default] and for an underalaying TABLE [default], so we don't actually need 'foreign-default-reference' 'construct' here. Other requirements for 'common [default]' might prove more difficult to implement, but for me this is quite sufficient. -- -R