pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
AutoCommit statements do no work with postgresql 11.
4+ messages / 3 participants
[nested] [flat]

* AutoCommit statements do no work with postgresql 11.
@ 2019-02-08 19:09 PG Doc comments form <noreply@postgresql.org>
  2019-02-09 02:08 ` Re: AutoCommit statements do no work with postgresql 11. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Doc comments form @ 2019-02-08 19:09 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: appleorange2@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/ecpg-commands.html
Description:

I have a c++ library built with libpq.so, and I am trying to run the
statements "SET AUTOCOMMIT TO ON" and "SET AUTOCOMMIT TO OFF".  According to
the docs, it looks like those statements are valid.  But, I get errors for
them... 

ERROR:  unrecognized configuration parameter "autocommit"
return code = PGRES_FATAL_ERROR

Looking online, it seems like these autocommit statements are no longer
supported past version 10.  So, I'm guessing this documentation is off.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: AutoCommit statements do no work with postgresql 11.
  2019-02-08 19:09 AutoCommit statements do no work with postgresql 11. PG Doc comments form <noreply@postgresql.org>
@ 2019-02-09 02:08 ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-02-09 06:28   ` Re: AutoCommit statements do no work with postgresql 11. Jae Adams <appleorange2@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2019-02-09 02:08 UTC (permalink / raw)
  To: appleorange2@gmail.com; +Cc: pgsql-docs@lists.postgresql.org

PG Doc comments form <noreply@postgresql.org> writes:
> I have a c++ library built with libpq.so, and I am trying to run the
> statements "SET AUTOCOMMIT TO ON" and "SET AUTOCOMMIT TO OFF".  According to
> the docs, it looks like those statements are valid.

Uh ... exactly what documentation are you looking at?

PG hasn't supported server-side autocommit since 7.3.x.  There is
an autocommit variable in psql, but we concluded the server-side
feature broke far more client code than it helped.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: AutoCommit statements do no work with postgresql 11.
  2019-02-08 19:09 AutoCommit statements do no work with postgresql 11. PG Doc comments form <noreply@postgresql.org>
  2019-02-09 02:08 ` Re: AutoCommit statements do no work with postgresql 11. Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-02-09 06:28   ` Jae Adams <appleorange2@gmail.com>
  2019-02-09 06:45     ` Re: AutoCommit statements do no work with postgresql 11. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Jae Adams @ 2019-02-09 06:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-docs@lists.postgresql.org

Hello Tom,

Thank you for your reply.

The document that I'm looking at this here.  I apologize for not sending
the link.  I had thought that the URL would be included automatically
through the link on the documentation website.
-- https://www.postgresql.org/docs/11/ecpg-sql-set-autocommit.html  (shows
the command syntax)

Regarding the info on the error message, there were posts mainly like these
(nothing authoritative, just googling).
-- https://github.com/sequelize/sequelize/issues/4631
-- 
https://www.postgresql.org/message-id/CAAY=A78Hd3L+sDj7PHbWYTAfiUMZRXndZtz8cJRhVmo1=yfRvA@mail.gmail...

I am confused on the meaning of some of these things.  I built a c++
program that connects to a database, and then issues SQL statements through
the native c++ drivers.  It should be acting as a client, rather than the
server.  Is the library "libpq.so" really a server library?  Is there a
different one I should use for the client?  It was running the command "SET
AUTOCOMMIT TO ON" when it reported the error "unrecognized configuration
parameter autocommit".

Can the client still specify to have autocommit either turned on or off?
If so, how is that done?

I appreciate any guidance you have.

-Jae


On Fri, Feb 8, 2019 at 7:08 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> PG Doc comments form <noreply@postgresql.org> writes:
> > I have a c++ library built with libpq.so, and I am trying to run the
> > statements "SET AUTOCOMMIT TO ON" and "SET AUTOCOMMIT TO OFF".
> According to
> > the docs, it looks like those statements are valid.
>
> Uh ... exactly what documentation are you looking at?
>
> PG hasn't supported server-side autocommit since 7.3.x.  There is
> an autocommit variable in psql, but we concluded the server-side
> feature broke far more client code than it helped.
>
>                         regards, tom lane
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: AutoCommit statements do no work with postgresql 11.
  2019-02-08 19:09 AutoCommit statements do no work with postgresql 11. PG Doc comments form <noreply@postgresql.org>
  2019-02-09 02:08 ` Re: AutoCommit statements do no work with postgresql 11. Tom Lane <tgl@sss.pgh.pa.us>
  2019-02-09 06:28   ` Re: AutoCommit statements do no work with postgresql 11. Jae Adams <appleorange2@gmail.com>
@ 2019-02-09 06:45     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-02-09 06:45 UTC (permalink / raw)
  To: Jae Adams <appleorange2@gmail.com>; +Cc: pgsql-docs@lists.postgresql.org

Jae Adams <appleorange2@gmail.com> writes:
> The document that I'm looking at this here.  I apologize for not sending
> the link.  I had thought that the URL would be included automatically
> through the link on the documentation website.
> -- https://www.postgresql.org/docs/11/ecpg-sql-set-autocommit.html  (shows
> the command syntax)

That is talking about an ecpg ("embedded SQL") command, which like the
psql case is a facility provided by client-side code.  There is no
autocommit-off feature on the server side, and you are not using any
client library that would offer one.

(It's a bit unfortunate that ecpg's command looks exactly like
a server command, but there you have it.)

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-02-09 06:45 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 19:09 AutoCommit statements do no work with postgresql 11. PG Doc comments form <noreply@postgresql.org>
2019-02-09 02:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-02-09 06:28   ` Jae Adams <appleorange2@gmail.com>
2019-02-09 06:45     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox