Pg client certificate auth

2025-04-30 Thread Duygu Hasan
Hello, I am trying to deploy a PG db with client certificate auth. I have read the documentation, but I have a few questions. One of my goals is to be able to use two different CAs and as far as I see there is only one ssl_ca_file, I have tried to concatenate my certs as cert chain and use them, it

Re: SQL ERROR subquery uses ungrouped column in PostgreSQL

2025-04-30 Thread David Rowley
On Thu, 1 May 2025 at 00:29, PALAYRET Jacques wrote: > => In the subquery, the semantic analysis of the query considers the column " > dat " instead of the expression " to_char(dat,'mm') ", which is actually > a grouped column. > Is this normal? How can I simply resolve the problem? Calcula

Index not used in certain nested views but not in others

2025-04-30 Thread Markus Demleitner
Dear List, I know how tedious mails with a subject of the type "I don't understand what the planner does" are, but on this one I'm really stumped. Regrettably, the situation is also a bit complex. Hopefully, someone will bear with me. So, in a PostgreSQL 15.12 I have a view over a single table w

Re: Index not used in certain nested views but not in others

2025-04-30 Thread Ron Johnson
On Wed, Apr 30, 2025 at 3:51 PM Markus Demleitner < msdem...@ari.uni-heidelberg.de> wrote: > Dear List, > > I know how tedious mails with a subject of the type "I don't understand > what the planner does" are, but on this one I'm really stumped. > Regrettably, the situation is also a bit complex.

Re: alter system appending to a value

2025-04-30 Thread Greg Sabino Mullane
On Wed, Apr 30, 2025 at 7:15 AM Luca Ferrari wrote: > Rationale: I'm using ansible to configure, thru different steps, > PostgreSQL instances and I would like to have every part to append its > configuration on the previous one. > Ansible is good for bringing your systems to a known consistent s

alter system appending to a value

2025-04-30 Thread Luca Ferrari
Hi all, as trivial as it sounds, is there a smart way to use ALTER SYSTEM to append to a value? Something like: ALTER SYSTEM shared_preloaded_libraries = current_setting( 'shared_preloaded_libraries' ) || ',foo'; Rationale: I'm using ansible to configure, thru different steps, PostgreSQL instances

Re: alter system appending to a value

2025-04-30 Thread Victor Yegorov
ср, 30 апр. 2025 г. в 14:15, Luca Ferrari : > as trivial as it sounds, is there a smart way to use ALTER SYSTEM to > append to a value? > Something like: ALTER SYSTEM shared_preloaded_libraries = > current_setting( 'shared_preloaded_libraries' ) || ',foo'; > I would do smth like: SELECT format( '

SQL ERROR subquery uses ungrouped column in PostgreSQL

2025-04-30 Thread PALAYRET Jacques
Hello, I have an unexpected error in my following query (of course, the query has been simplified here to request help): SELECT num_poste, to_char(dat, 'MM')::integer dat, CASE FLOOR((TO_NUMBER(TO_CHAR(dat,'DD'),'99')-1)/10) WHEN 0 THEN 1 WHEN 1 THEN 2 ELSE 3 END::smallint AS num_decade

Re: Index not used in certain nested views but not in others

2025-04-30 Thread Laurenz Albe
On Wed, 2025-04-30 at 17:02 -0400, Tom Lane wrote: > Markus Demleitner writes: > > So, when the SELECT statement on dfbsspec.ssa stands along in the view > > definition, Postgres does the right thing; when the exact same query > > stands in a UNION ALL with other tables, Postgres doesn't use the >

Re: Index not used in certain nested views but not in others

2025-04-30 Thread Tom Lane
Markus Demleitner writes: > So, when the SELECT statement on dfbsspec.ssa stands along in the view > definition, Postgres does the right thing; when the exact same query > stands in a UNION ALL with other tables, Postgres doesn't use the > index. Hu? It's hard to be sure when you've shown us no