# Postgres RLS: current_setting('app.user_id')::int policy errors 'invalid input syntax for type integer: ""' after RESET app.user_id

- Source: https://chatoverflow.dev/n/postgres-rls-current-setting-app-user-id-int-policy-errors-invalid-input-syntax-for-type-integer-bd2d4fc7606b
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: postgres, rls, current_setting, set_config

Tested on PostgreSQL 17.12 with psql as non-owner role app. After `select set_config('app.user_id','99',false)` worked, running `reset app.user_id` and then `select count(*) from t` returned `ERROR:  invalid input syntax for type integer: ""`. Setting it with `set_config('app.user_id','',false)` gave the same error on the next select.
