Table 9-40. json and jsonb Operators - Data could be more informative

2019-10-16 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.4/functions-json.html
Description:

In https://www.postgresql.org/docs/9.4/functions-json.html,

the table 9.40, json and jsonb operators 
lists '->>' and '#>>' operators and the difference written is the second one
go to the specific location.

I am not an expert in postgres!
But from my experience,
'#>>'  can also parse the data when it is a stringified JSON, having escape
charterers in it! 

for ex :
for a scalar value in jsonb : "{\"attr\":\"value\"}", from which we cannot
read keys or values as such,

Query : select (column #>> '{}') from table;
will give parsed json : {"attr" : "value"} from which keys and values can be
extracted.

please mention is there if it is right, as i struggled a lot to figure it
out!

PS: pardon my language, and my concern if it is not right!

Thank you!


Update documentation - include supported windows version for release 12

2019-10-16 Thread Emil Iggland
PostgreSQL 12 has been released and is available for download from the
EnterpriseDB website.
The documentation should be updated to reflect the supported versions.
Attached patch does that.

-- 
Emil Iggland
Westmansgatan 37, SE-582 16 Linköping
Direkt: +46(0)70 - 964 27 87
Växel: +46(0)13 - 36 46 00
Mail: emil.iggl...@metrima.com
diff --git a/templates/pages/download/windows.html 
b/templates/pages/download/windows.html
index 651efac..dbbd675 100644
--- a/templates/pages/download/windows.html
+++ b/templates/pages/download/windows.html
@@ -47,7 +47,12 @@ This download is intended for users who wish to include 
PostgreSQL as part of an
 
   
   
-
+   
+  12
+  2019, 2016, 2012 R2
+   
+
+   
   11
   2019, 2016, 2012 R2
    
-- 
2.23.0



PostgreSQL 12 release notes missing breaking change in libpq

2019-10-16 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/release-12.html
Description:

Hi!

In PostgreSQL 12, libpq's parsing of connection string integer parameters
was made more strict, such that invalid values now result in an error rather
than being silently ignored:
https://github.com/postgres/postgres/commit/e7a2217978d9cbb2149bfcb4ef1e45716cfcbefb

This change resulted in runtime errors/crashes for some of our customers
after we upgraded the Heroku stack images to use v12 of the PostgreSQL
client libs.

We had checked the release notes, but it's not currently mentioned:
https://www.postgresql.org/docs/12/release-12.html

Please could it be added?

Many thanks,

Ed


Re: Update documentation - include supported windows version for release 12

2019-10-16 Thread Michael Paquier
On Tue, Oct 15, 2019 at 11:56:38AM +0200, Emil Iggland wrote:
> PostgreSQL 12 has been released and is available for download from the
> EnterpriseDB website.
> The documentation should be updated to reflect the supported versions.
> Attached patch does that.

> @@ -47,7 +47,12 @@ This download is intended for users who wish to include 
> PostgreSQL as part of an
>  
>
>
> -
> +   
> +  12
> +  2019, 2016, 2012 R2
> +   
> +
> +   
>11
>2019, 2016, 2012 R2
> 

This is not part of the core Postgres documentation.  Magnus,
Jonathan, isn't that the website code that is out-of-date?  The
reference is here:
https://www.postgresql.org/download/windows/
--
Michael


signature.asc
Description: PGP signature


Re: PostgreSQL 12 release notes missing breaking change in libpq

2019-10-16 Thread Michael Paquier
On Wed, Oct 16, 2019 at 01:12:36PM +, PG Doc comments form wrote:
> In PostgreSQL 12, libpq's parsing of connection string integer parameters
> was made more strict, such that invalid values now result in an error rather
> than being silently ignored:
> https://github.com/postgres/postgres/commit/e7a2217978d9cbb2149bfcb4ef1e45716cfcbefb
> 
> This change resulted in runtime errors/crashes for some of our customers
> after we upgraded the Heroku stack images to use v12 of the PostgreSQL
> client libs.
> 
> We had checked the release notes, but it's not currently mentioned:
> https://www.postgresql.org/docs/12/release-12.html
> 
> Please could it be added?

I think it makes sense to mention that.  Bruce, why not adding an item
about that in the "Migration to Version 12" section?  Was that
intentionally left out?
--
Michael


signature.asc
Description: PGP signature


Re: Table 9-40. json and jsonb Operators - Data could be more informative

2019-10-16 Thread Michael Paquier
On Tue, Oct 15, 2019 at 03:53:07AM +, PG Doc comments form wrote:
> the table 9.40, json and jsonb operators 
> lists '->>' and '#>>' operators and the difference written is the second one
> go to the specific location.
> 
> I am not an expert in postgres!
> But from my experience,
> '#>>'  can also parse the data when it is a stringified JSON, having escape
> charterers in it!

Input is always welcome, thanks!

> for ex :
> for a scalar value in jsonb : "{\"attr\":\"value\"}", from which we cannot
> read keys or values as such,
> 
> Query : select (column #>> '{}') from table;
> will give parsed json : {"attr" : "value"} from which keys and values can be
> extracted.
> 
> please mention is there if it is right, as i struggled a lot to figure it
> out!
> 
> PS: pardon my language, and my concern if it is not right!

Perhaps this could be improved.  How would you shape that as a patch?
From the source tree you would need to change the table around the
section "Processing and Creating JSON Data" in src/sgml/func.sgml.
--
Michael


signature.asc
Description: PGP signature