PostgreSQL trigger not returning anything
问题 I have a PostgreSQL trigger on create that basically redirects inserts into sub-tables. Once I insert the record, I want to ABORT the request as to avoid duplicate data. The only way (that I know of) to do this is to return NULL in the trigger. The problem is that I need the record to be returned so I can get the ID. If I return NULL , I get ... NULL . Any idea how I can have a trigger abort an operation while still returning something other than NULL ? 回答1: Your question leaves room for