Check for value with current_setting()

后端 未结 2 1552
轮回少年
轮回少年 2021-02-18 17:57

I\'m trying to work with current_setting().

I came up with this:

CREATE OR REPLACE FUNCTION process_audit() RETURNS TRIGGER AS $audit$
    D         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-18 18:07

    Shouldn't you also make a cast? As follows,

    user_id := current_setting('hws.current_user_id')::integer;
    

提交回复
热议问题