Tom Lane writes: > Okay, I've thought of one: consider the situation where you want to > label each row in a table with the ID of the user who inserted it. > Right now, you can do > ..., > who name default current_user, > ... > or for greater security use a trigger to set the column value. > This will stop working if defaults and triggers run as the table > owner.
According to the SQL standard, privileges on constraints should effectively be checked at the time the constraint is created. For example, when you create a foreign key constraint you may need certain REFERENCES privileges, and equally creating check constraints should require REFERENCES privilege on tables involved in subqueries. While the SQL standard doesn't say anything on how this should apply to column defaults (since there you can't call user-defined functions or subqueries in default clauses), it would make sense to carry this over. -- Peter Eisentraut [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html