Re: Unexpected results from CALL and AUTOCOMMIT=off

2024-06-03 Thread Pierre Forstmann
You declared function f_get_x as stable which means: https://www.postgresql.org/docs/15/sql-createfunction.html STABLE indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its

Re: how to trace a backend session

2024-01-23 Thread Pierre Forstmann
Hello, I have coded an extension to trace SQL statements for specific backends: https://github.com/pierreforstmann/pg_log_statements (only SQL statements are traced - no wait events data is collected). Pierre Le lun. 22 janv. 2024 à 08:29, James Pang a écrit : > experts, > We migrated our

how to use query_tree_walker to get all relations used in a query

2023-08-19 Thread Pierre Forstmann
Hello, I am trying to get the list of all relations used in a SELECT query using the post parse analyze hook. I can get all relations from top level FROM clause but I cannot get them for a simple subquery like: select * from t1 where x1=(select max(x2) from t2); My current code is: static bool

Re: system variable can be edited by all user?

2022-11-26 Thread Pierre Forstmann
Hello, You ccan try to use my extension pg_set_acl: https://github.com/pierreforstmann/pg_set_acl Le mar. 22 nov. 2022 à 09:07, chris navarroza a écrit : > Hi, > > Ive created a read only user (SELECT PRIVILEGE) but it turns out that this > user can do this queries: SHOW work_mem; SET work_mem

Re: Copy Statistics Tables During Upgrade

2021-04-02 Thread Pierre Forstmann
. The real reason is that nobody has bothered to write the conversion logic yet, for pg_upgrade could certainly copy the pg_statistics information: the table has not changed for many years. Regards Pierre Forstmann Le 31/03/2021 à 20:15, Virendra Kumar a écrit : Hello Team, I was doing an