Row level security insert policy does not validate update new values/content?

2022-05-17 Thread alias
*Hi,* *original query* > BEGIN; > RESET session AUTHORIZATION; > SET search_path = test; > SET session AUTHORIZATION alice; > CREATE TABLE emp ( > name text, > paydate date, > income numeric > ); > GRANT ALL ON TABLE emp TO public; > INSERT INTO emp > VALUES ('John', '12-01-2009',

generated column cast from timestamptz to timestamp not OK.

2022-05-13 Thread alias
CREATE TABLE test_g ( a timestamptz, b timestamp GENERATED ALWAYS AS (a::timestamp) STORED ); then an error occurred. > ERROR: 42P17: generation expression is not immutable > LOCATION: cookDefault, heap.c:2768 > However the following 2 commands is ok. CREATE TABLE test_i ( > a int

Re: Deferred constraint trigger semantics

2022-05-12 Thread alias
> > > It adds the "initially deferred" decoration to the "create constraint > trigger" statement. This is (still) the result: > > INFO: trg fired. new.v = 10, n = 5 > INFO: trg fired. new.v = 20, n = 5 > INFO: trg fired. new.v = 30, n = 5 > INFO: trg fired. new.v = 40, n = 5 > INFO: trg fired.

Re: How to set password in psql -h -d -U command line?

2022-04-28 Thread alias
Don't Do This - PostgreSQL wiki On Thu, Apr 28, 2022 at 3:13 PM Josha Inglis wrote: > https://www.postgresql.org/docs/current/libpq-envars.html > > Either set the PGPASSWORD environment variable or set up a .pgp

row level security on conflict do update

2022-04-26 Thread alias
git.postgresql.org Git - postgresql.git/blob - src/test/regress/sql/rowsecurity.sql > 58 >