Re: updatable cursors and ORDER BY

2018-05-28 Thread Bruce Momjian
On Thu, May 10, 2018 at 12:55:23PM -0400, Tom Lane wrote:
> Peter Eisentraut  writes:
> > I think that last part isn't actually written down anywhere.  (It only
> > states the converse.)  How about a clarification like this:
> 
> > @@ -271,7 +271,10 @@ Notes
> >   and not use grouping or ORDER BY).  Cursors
> >   that are not simply updatable might work, or might not, depending on 
> > plan
> >   choice details; so in the worst case, an application might work in 
> > testing
> > - and then fail in production.
> > + and then fail in production.  If FOR UPDATE is
> > + specified, then the cursor is guaranteed to be updatable, or the
> > + DECLARE command will error if an updatable cursor
> > + cannot be created for the supplied query.
> >  
> 
> OK by me, except we don't usually use "error" as a verb.  Either "fail"
> or "throw an error" would read better IMO.  Or you could just stop with
> "guaranteed to be updatable"; I don't think the rest adds much.

I have done as you suggested and just used the first part;  patch
attached and backpatched.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +
diff --git a/doc/src/sgml/ref/declare.sgml b/doc/src/sgml/ref/declare.sgml
new file mode 100644
index 648c295..34ca9df
*** a/doc/src/sgml/ref/declare.sgml
--- b/doc/src/sgml/ref/declare.sgml
*** DECLARE n
*** 271,277 
   and not use grouping or ORDER BY).  Cursors
   that are not simply updatable might work, or might not, depending on plan
   choice details; so in the worst case, an application might work in testing
!  and then fail in production.
  
  
  
--- 271,278 
   and not use grouping or ORDER BY).  Cursors
   that are not simply updatable might work, or might not, depending on plan
   choice details; so in the worst case, an application might work in testing
!  and then fail in production.  If FOR UPDATE is
!  specified, the cursor is guaranteed to be updatable.
  
  
  


Re: missing replaceable tags in backup.sgml

2018-05-28 Thread Bruce Momjian
On Mon, May 14, 2018 at 11:11:36AM +0300, Liudmila Mantrova wrote:
> Hi,
> 
> One of the new examples in backup.sgml seems to be missing a couple of
>  tags. A trivial patch is attached.

> diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
> index 349834c..982776c 100644
> --- a/doc/src/sgml/backup.sgml
> +++ b/doc/src/sgml/backup.sgml
> @@ -141,7 +141,7 @@ psql dbname 
> <   behavior and have psql exit with an
>  exit status of 3 if an SQL error occurs:
>  
> -psql --set ON_ERROR_STOP=on dbname < dumpfile
> +psql --set ON_ERROR_STOP=on dbname < 
> dumpfile
>  
>  Either way, you will only have a partially restored database.
>  Alternatively, you can specify that the whole dump should be

Actually, the missing 'replaceable' problem goes back to at least 9.3,
so backpatched through that release.  Thanks.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +



Re: Postgres upgrade trouble

2018-05-28 Thread Bruce Momjian
On Fri, May 11, 2018 at 07:15:41AM +, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/10/static/pgupgrade.html
> Description:
> 
> This is a non IT specialist question / comments. I like postgres, except the
> current automatic upgrade mechanism working on my server...
> On my Ubuntu 16.04 machine, when a postgres upgrade comes and installs
> automatically, this creates a real nightmare:  neither pgAdminIII not my
> application can access the DB. (connection refused. Is the server running...
> ...on port 5432?)
> Trying to understand in the documentation what to do is very difficult
> because there is no clear example on how to retreive the 'old' or 'new'
> parameters. So, I wonder why there is no automatic mechanism coming with the
> upgrade to change the settings automatically, or alternatively to keep the
> 'old' version up and running correctly (and in this case the end user should
> have an easy way to know that he has to launch an upgrade when he wants to,
> and an utility -for instance in pgAdmin- should guide him along this upgrade
> mechanism, ensuring I do not loose time nor any data).
> Thanks for your efforts to offer Postgres to the IT community!

This is really something for you to address with Ubuntu.  The Postgres
community provides the tools, but the user interface is often up to the
packagers.  I agree the interface is complex.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+  Ancient Roman grave inscription +