[DOCS] tip to workaround trailing spaces removal on char to varchar conversion

2017-09-20 Thread vodevsh
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/datatype-character.html
Description:

removing trailing spaces on (implicit) cast from char to text can be
painful, and always surprising as shown in example with 
SELECT 'a '::CHAR(2) collate "C" < E'a\n'::CHAR(2)

would it be worth mentioning a tip, that this behaviour can be monkey hacked
by concat(str "any" function that accepts char and returns text, thus
respecting the spaces, eg SELECT concat('a '::CHAR(2) collate 
"C") <
E'a\n'::CHAR(2) will return false as expected...

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] Docbook 5.x

2017-09-20 Thread Alexander Lakhin

Hello Peter,
19.09.2017 23:05, Peter Eisentraut wrote:

I would choose some standard way to have separate content in the same
file, but if the overhead is not acceptable, and we're not going to
extend the profiling usage, then we need to invent something that will
complicate XML-related processing (I think about translation but the
other issues are possible too).

It's only for the INSTALL file and won't get used anywhere else, so I
think it's OK to have a bit of an ad-hoc system.
Well, then I would suggest to place all the extra content in the 
installation-single.xsl file and to add all the alternate text to 
installation.xml.
I would like to place such alternate text in an attribute 
"standalonetext" or alike, but DocBook 4.x doesn't allow for extra 
attributes, so we need to choose from: 
http://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes
So I decided to make alternative use of xreflabel attribute. (I believe 
that we could find something more appropriate after migrating from 
Docbook 4.2 to 5.x).)


Please see patches/xml/installation.patch in the attachment (or 
installation.xml in doc/src/xml after ) for an example.

Makefile (in patches/xml/) is adjusted for the new approach too.
(Main output is slightly changed after switching from 
"profile-chunk.xsl" to "chunk.xsl", I'll fix it later if we choose this 
way.)
(Archive in the attachment is packed twice to avoid the automatic patch 
checking...)


Best regards,
Alexander


pg-doc.check+.tar.bz2
Description: application/bzip

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] CREATE GROUP: REPLICATION, NOREPLICATION, BYPASSRLS, NOBYPASSRLS, CONNECTION LIMIT connlimit

2017-09-20 Thread zszmigiero
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/sql-creategroup.html
Description:

Options from subject are still available according to CREATE ROLE
definition

Please update syntax description
At this moment no difference between:
CREATE USER
CREATE GROUP
CREATE ROLE
I suggest create one syntax description instead setup 3 different

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] ALTER GROUP

2017-09-20 Thread zszmigiero
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/sql-alterrole.html
Description:

 [ GROUP ] role_name

How to read this role specification?
According to notation the erroneous:

"ALTER ROLE GROUP role_name"

should be supported


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] max_replication_slots in subscriber for subscription?

2017-09-20 Thread jonny . battiato
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/logical-replication-config.html
Description:

Hi!

In this section:
https://www.postgresql.org/docs/10/static/logical-replication-config.html

the following sentences make no sense in the way replication slots are
designed:

"The subscriber also requires the max_replication_slots to be set. In this
case it should be set to at least the number of subscriptions that will be
added to the subscriber."

I can understand if the subscriber would be used as a publisher as well, so
the second sentence could make more sense as follows:

"In this case it should be set to at least the number of publications that
will be added to the subscriber."

Could you please check?
And if I'm wrong, I would appreciate a little more clear explanation.


Many thanks,
Jonathan

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] How to prompt for a value if a variable is not set

2017-09-20 Thread randy
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.2/static/app-psql.html
Description:

I want to make a small script to show the primary key for a table and put
the name into a variable.

Called from another script, the tablename is set in a variable called
tablename.  But if the variable is not set, I want the script to prompt for
it.

Is there a way to do this?
thx,
-r

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] ALTER GROUP

2017-09-20 Thread Tom Lane
zszmigi...@gmail.com writes:
> The following documentation comment has been logged on the website:
> Page: https://www.postgresql.org/docs/9.5/static/sql-alterrole.html
> Description:

>  [ GROUP ] role_name

> How to read this role specification?
> According to notation the erroneous:

> "ALTER ROLE GROUP role_name"

> should be supported

Hmm, seems to be a documentation bug.  Possibly this was copied-and-pasted
from the docs for GRANT, which does allow the noise word GROUP here.

Thanks for reporting it!

regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] How to prompt for a value if a variable is not set

2017-09-20 Thread David G. Johnston
On Monday, September 18, 2017,  wrote:
>
> But if the variable is not set, I want the script to prompt for
> it.


In version 10 this should be doable, we introduced \if conditionals.  You
might be able to hack up something via "\!" in 9.6 and earlier (haven't
tried it myself).

David J.


Re: [DOCS] Creating variable argument user defined functions in C

2017-09-20 Thread athinivas
Thanks a lot tom lane.



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-docs-f2165602.html


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] Dcoumentation error.

2017-09-20 Thread neutrino_sunset
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/runtime-config.html
Description:

"Chapter 19.2 File Locations" starts by stating "In addition to 
the
postgresql.conf file already mentioned..."

That's not at all helpful when I've come to the part of the document 
titled
"File Locations" to try and find out where the blasted 
postgresql.conf file
is in the first place!

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] CREATE GROUP: REPLICATION, NOREPLICATION, BYPASSRLS, NOBYPASSRLS, CONNECTION LIMIT connlimit

2017-09-20 Thread Michael Paquier
On Sat, Sep 16, 2017 at 9:31 PM,   wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.5/static/sql-creategroup.html
> Description:
>
> Options from subject are still available according to CREATE ROLE
> definition
>
> Please update syntax description
> At this moment no difference between:
> CREATE USER
> CREATE GROUP
> CREATE ROLE
> I suggest create one syntax description instead setup 3 different

I would suggest to still keep the pages as long as the commands are
not completely removed. It makes easy for users to still refer to it,
and the maintenance cost is minimum: only new options need to be
refreshed for each page.
-- 
Michael


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs