[GENERAL] Question on trigger data visibility

2010-08-30 Thread Maurice Gittens
Hi, Assume tablex, tabley and tablez are correctly populated in my database. My purpose is to enforce referential integrity between a column in the tablex (the child) and a column in tablez (the parent). Since normal foreign keys do not give me this functionality, I decide to write a trigger. My

Re: [GENERAL] Why No WHERE clause for INSERT statements

2010-08-17 Thread Maurice Gittens
> > All that stuff is buried in the "query" option.  You can do something > like > >        INSERT INTO table SELECT ... WHERE ... > > so the full power of SELECT is available already. > >                        regards, tom lane > Thank you Michael, Tom; I must have missed the nonterminal symbol

[GENERAL] Why No WHERE clause for INSERT statements

2010-08-17 Thread Maurice Gittens
Hi, the postgresql 8.4 documentation defines the syntax of the DELETE statement as: DELETE FROM [ ONLY ] table [ [ AS ] alias ] [ USING usinglist ] [ WHERE condition | WHERE CURRENT OF cursor_name ] [ RETURNING * | output_expression [ [ AS ] output_name ] [, ...] ] The syntax include