"Terri Reid" <treid@xxxxxxxxxxxxxxxxxxx> writes: > I have data that is being updated in a table that I need to export to a flat > file via a database trigger on insert or update. The user performing the > update will not be a superuser. I've tried to use COPY TO, but that doesn't > work for non-superusers. It will if invoked in a trigger function that's marked SECURITY DEFINER and owned by a superuser. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match