Re: PostgreSQL inheritance vs https://wiki.postgresql.org/wiki/Don%27t_Do_This

2023-11-07 Thread Achilleas Mantzios
Hello All Here is the presentation, it was done under "Percona University Athens". It went ok, I think, although people didn't seem to understand much, as the audience was MySQL/PostgreSQL/Mongo/Oracle mix. However some young people seemed to be interested as they asked questions afterwards.

Re: Cluster for an appliance-type deployment

2023-11-07 Thread Christian Ramseyer
On 06.11.23 20:26, Matthias Leisi wrote: Dear all, I’m reasonably experienced with Postgres with simple (single, „rebuild and restore“) requirements, but would need some hints on what to look for in a more complex situation - deploying Postgres as the backend for a (virtual) appliance. T

Re: procedure string constant is parsed at procedure create time.

2023-11-07 Thread Tom Lane
Alvaro Herrera writes: > On 2023-Nov-07, jian he wrote: >> 2.this will have errors. > The problem seems to be that the procedure uses a single catalog > snapshot during execution, so the INSERT doesn't see the table that > CREATE has made. It looks to me like fmgr_sql does take a new snapsho

Re: procedure string constant is parsed at procedure create time.

2023-11-07 Thread David G. Johnston
On Tuesday, November 7, 2023, jian he wrote: > > > Why does the 2nd query fail? What am I missing? > > The language specific implementation detail note on this page. https://www.postgresql.org/docs/current/xfunc-sql.html David J.

Re: procedure string constant is parsed at procedure create time.

2023-11-07 Thread Alvaro Herrera
On 2023-Nov-07, jian he wrote: > 2.this will have errors. > CREATE or replace PROCEDURE template_create() LANGUAGE SQL AS $proc$ > DROP TABLE if exists test cascade; > CREATE TABLE test(id int4range,valid_at tsrange,name text); > INSERT INTO test VALUES (NULL, tsrange('2018-01-01',

procedure string constant is parsed at procedure create time.

2023-11-07 Thread jian he
hi. table "test" does not exist. ---1.this will work. CREATE or replace PROCEDURE template_create() LANGUAGE SQL AS $proc$ DROP TABLE if exists test cascade; CREATE TABLE test(id int4range,valid_at tsrange,name text);$proc$; 2.this will have errors. CREATE or replace PROCEDURE template_create