libpq example doesn't work - Mailing list pgsql-hackers

From Ideriha, Takeshi
Subject libpq example doesn't work
Date
Msg-id 4E72940DA2BF16479384A86D54D0988A567BA1B0@G01JPEXMBKW04
Whole thread Raw
Responses Re: libpq example doesn't work
List pgsql-hackers
Hi, 

When I tried to use libpq, I found that libpq example[1] does not work.
That's because SELECT pg_catlog.set_config() never returns PGRES_COMMAND_OK which is expected,
but actually returns PGRES_TUPLES_OK.

Patch attached. 
I changed both src/test/example and document.

[1] https://www.postgresql.org/docs/devel/static/libpq-example.html 

(By the way, I'm wondering why these examples are placed under src/test.
 They are just examples and not regression tests.)

Best regards,
Takeshi Ideriha


Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: postgresql_fdw doesn't handle defaults correctly
Next
From: Pavel Stehule
Date:
Subject: Re: postgresql_fdw doesn't handle defaults correctly