Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
On 09.02.23 02:01, Peter Smith wrote: OTOH, if you are having to check for NULL doc anyway, maybe it's just as easy only doing that up-front. Then you could quick-exit the function without calling xmlDocDumpFormatMemory etc. in the first place. For example: doc = xml_parse(arg,

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
On 09.02.23 00:09, Peter Smith wrote: I noticed the xmlFreeDoc(doc) within the PG_CATCH is guarded but the other xmlFreeDoc(doc) is not. As the doc is assigned outside the PG_TRY shouldn't those both be the same? Hi Peter, My logic there was the following: if program reached that part of the

Re: [PATCH] Add pretty-printed XML output option

2023-02-08 Thread Jim Jones
while working on another item of the TODO list I realized that I should be using a PG_TRY() block in he xmlDocDumpFormatMemory call. Fixed in v5. Best regards, Jim From f503b25c7fd8d984d29536e78577741e5e7c5e9f Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Thu, 2 Feb 2023 21:27:16 +0100

Re: [PATCH] Add pretty-printed XML output option

2023-02-06 Thread Jim Jones
:00:00 2001 From: Jim Jones Date: Thu, 2 Feb 2023 21:27:16 +0100 Subject: [PATCH v4 1/4] Add pretty-printed XML output option This small patch introduces a XML pretty print function. It basically takes advantage of the indentation feature of xmlDocDumpFormatMemory from libxml2 to format XML strings

Re: [PATCH] Add pretty-printed XML output option

2023-02-06 Thread Jim Jones
bxml to run my regression tests? v3 adds a missing xmlFree call. Best, Jim From ced9fccddc033de98709a6e93dc6530ce68149db Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Thu, 2 Feb 2023 21:27:16 +0100 Subject: [PATCH v3 1/3] Add pretty-printed XML output option This small patch introduces a XML pretty

Re: [PATCH] Add pretty-printed XML output option

2023-02-02 Thread Jim Jones
. On 02.02.23 21:35, Jim Jones wrote: Hi, This small patch introduces a XML pretty print function. It basically takes advantage of the indentation feature of xmlDocDumpFormatMemory from libxml2 to format XML strings. postgres=# SELECT xmlpretty('id="z">42');

[PATCH] Add pretty-printed XML output option

2023-02-02 Thread Jim Jones
    xmlpretty -- +      + 42+        +    + (1 row) The patch also contains regression tests and documentation. Feedback is very welcome! Jim From ced9fccddc033de98709a6e93dc6530ce68149db Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Thu, 2 Feb 2023 21:27:16 +0100 Su

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-29 Thread Jim Jones
On 27.01.23 21:13, Cary Huang wrote: I agree that it is a more elegant approach to add "sslcertmode=disable" on the client side to prevent sending default certificate. But, if the server does request clientcert but client uses "sslcertmode=disable" to connect and not give a certificate, it

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-21 Thread Jim Jones
Hi Jacob, > I think the sslcertmode=disable option that I introduced in [1] solves this issue too; Well, I see there is indeed a significant overlap between our patches - but yours has a much more comprehensive approach! If I got it right, the new slcertmode=disable would indeed cancel the

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-20 Thread Jim Jones
Hello Israel, Thanks a lot for the suggestion! > I do not think it is worth it to change the current behavior of PostgreSQL > in that sense. Well, I am not suggesting to change the current behavior of PostgreSQL in that matter. Quite the contrary, I find this feature very convenient,

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-01-16 Thread Jim Jones
Hi Laurenz, I'm testing your patch and the GENERIC_PLAN parameter seems to work just OK .. db=# CREATE TABLE t (col numeric); CREATE TABLE db=# CREATE INDEX t_col_idx ON t (col); CREATE INDEX db=# INSERT INTO t SELECT random() FROM generate_series(1,10) ; INSERT 0 10 db=# EXPLAIN

Re: [PATCH] psql: Add tab-complete for optional view parameters

2023-01-09 Thread Jim Jones
Hi Christoph, Thanks for the patch! I just tested it and I could reproduce the expected behaviour in these cases: postgres=# CREATE VIEW w AS  WITH ( postgres=# CREATE OR REPLACE VIEW w AS  WITH ( postgres=# CREATE VIEW w WITH ( CHECK_OPTION  SECURITY_BARRIER  SECURITY_INVOKER

Re: Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2023-01-06 Thread Jim Jones
2023 at 09:15, Jim Jones wrote: Dear PostgreSQL Hackers, Some time ago we faced a small issue in libpq regarding connections configured in the pg_hba.conf as type *hostssl* and using *md5* as authentication method. One of our users placed the client certificates in ~/.

Authentication fails for md5 connections if ~/.postgresql/postgresql.{crt and key} exist

2022-12-09 Thread Jim Jones
e2187fce289054a846e17a5414801d Mon Sep 17 00:00:00 2001 From: Jim Jones Date: Mon, 21 Nov 2022 15:05:33 +0100 Subject: [PATCH v1] add sslmode no-clientcert --- doc/src/sgml/libpq.sgml | 11 + src/interfaces/libpq/fe-connect.c| 1 + src/interfaces/

<    1   2