Re: First SVG graphic

2019-03-28 Thread Jürgen Purtz

On 28.03.19 00:41, Tatsuo Ishii wrote:

Is it possible to generate figure indexes?


This is an additional topic and there was a brief discussion on 7 
February (and in older conversations) regarding this. It concerns list 
of figures, tables, and examples. I intend to make a proposal around May 
2019.


Kind regards

Jürgen Purtz






Re: First SVG graphic

2019-03-28 Thread Peter Eisentraut
On 2019-03-28 01:50, Tom Lane wrote:
> Peter Eisentraut  writes:
>> This has been committed.  The SVG images are committed as well, so no
>> new tools are required.
> 
> Buildfarm member alabio seems less than pleased.

See

for how to fix that build issue.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: First SVG graphic

2019-03-28 Thread Tatsuo Ishii
> This has been committed.  The SVG images are committed as well, so no
> new tools are required.

What is the policy of adding graphics to PostgreSQL 12? Is it
encouraged to add more graphics to 12 docs? Or do we want to prohibit
it?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp




Re: First SVG graphic

2019-03-28 Thread Peter Eisentraut
On 2019-03-28 09:03, Tatsuo Ishii wrote:
>> This has been committed.  The SVG images are committed as well, so no
>> new tools are required.
> 
> What is the policy of adding graphics to PostgreSQL 12? Is it
> encouraged to add more graphics to 12 docs? Or do we want to prohibit
> it?

I have nothing against a few more, especially if they stay within the
provided tooling.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: First SVG graphic

2019-03-28 Thread Magnus Hagander
On Thu, Mar 28, 2019 at 8:50 AM Peter Eisentraut <
peter.eisentr...@2ndquadrant.com> wrote:

> On 2019-03-28 01:50, Tom Lane wrote:
> > Peter Eisentraut  writes:
> >> This has been committed.  The SVG images are committed as well, so no
> >> new tools are required.
> >
> > Buildfarm member alabio seems less than pleased.
>
> See
> <
> https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror
> >
> for how to fix that build issue.
>

Ugh. If I understand it right, that's something that will happen to anybody
who tries to build the docs on a headless server, which is not exactly
uncommon :/

Can we find a way to override it in the command? Or if not, we should
probably at least document it in our docs?

I have done this on alabio now, let's see if it recovers.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ 
 Work: https://www.redpill-linpro.com/ 


Re: First SVG graphic

2019-03-28 Thread Magnus Hagander
On Thu, Mar 28, 2019 at 9:59 AM Magnus Hagander  wrote:

>
>
> On Thu, Mar 28, 2019 at 8:50 AM Peter Eisentraut <
> peter.eisentr...@2ndquadrant.com> wrote:
>
>> On 2019-03-28 01:50, Tom Lane wrote:
>> > Peter Eisentraut  writes:
>> >> This has been committed.  The SVG images are committed as well, so no
>> >> new tools are required.
>> >
>> > Buildfarm member alabio seems less than pleased.
>>
>> See
>> <
>> https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror
>> >
>> for how to fix that build issue.
>>
>
> Ugh. If I understand it right, that's something that will happen to
> anybody who tries to build the docs on a headless server, which is not
> exactly uncommon :/
>
> Can we find a way to override it in the command? Or if not, we should
> probably at least document it in our docs?
>
> I have done this on alabio now, let's see if it recovers.
>
>
FYI, it did recover. Per above, I think this is something we should
document.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ 
 Work: https://www.redpill-linpro.com/ 


Re: First SVG graphic

2019-03-28 Thread Jürgen Purtz

On 28.03.19 09:52, Peter Eisentraut wrote:

On 2019-03-28 09:03, Tatsuo Ishii wrote:

This has been committed.  The SVG images are committed as well, so no
new tools are required.

What is the policy of adding graphics to PostgreSQL 12? Is it
encouraged to add more graphics to 12 docs? Or do we want to prohibit
it?

I have nothing against a few more, especially if they stay within the
provided tooling.

Because many of the prospective authors voted for Inkscape in the course 
of this discussion, there shall be at least one example in Inkscape format.


There were reservations against the published Inkscape files because 
they didn't made use of any 'higher-level-concept'. Please find a new 
Inkscape version of the pg_dump which uses such concepts. It groups 
texts and paths together to logical units (disc with explanation). You 
can rearrange such units as a whole or align a set of them to left, top, 
... with Inkscape (iconized) commands. Additionally those objects are 
linked together with connectors to rearrange their position by 
drag-and-drop. The resulting file in 'Optimized' version is also attached.


Kind regards, Jürgen




Please add one more ALTER SYSTEM command example

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

Page: https://www.postgresql.org/docs/11/sql-altersystem.html
Description:

Hi,

ALTER SYSTEM can be used to set shared_preload_libraries with multiple
values in the following way.
postgres=# ALTER SYSTEM SET shared_preload_libraries = "pg_stat_statements",
"$libdir/plugin_debugger" ;
ALTER SYSTEM
postgres=# 

But this useful information is not mentioned in the documentation page.

Is it possible to include one more example about this usage?

Thanks.


improve examples for JSON functions

2019-03-28 Thread Liudmila Mantrova

Hi,

Please consider a small documentation patch that adds custom type 
definition to a couple of JSON function examples, so that they match the 
provided results. Previously, having "myrowtype" without a definition 
here could cause confusion as this type does not exist by default, and 
actually differs between these examples.


--
Liudmila Mantrova
Technical writer at Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company

diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 1a01473..c5ab59e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -12614,7 +12614,10 @@ table2-mapping
  whose columns match the record type defined by base
  (see note below).

-   select * from json_populate_record(null::myrowtype, '{"a": 1, "b": ["2", "a b"], "c": {"d": 4, "e": "a  b c"}}')
+   
+create type myrowtype as (a int, b json, c json);
+select * from json_populate_record(null::myrowtype, '{"a": 1, "b": ["2", "a b"], "c": {"d": 4, "e": "a  b c"}}')
+   

 
  a |   b   |  c
@@ -12634,7 +12637,10 @@ table2-mapping
  columns match the record type defined by base (see
  note below).

-   select * from json_populate_recordset(null::myrowtype, '[{"a":1,"b":2},{"a":3,"b":4}]')
+   
+create type myrowtype as (a int, b int);
+select * from json_populate_recordset(null::myrowtype, '[{"a":1,"b":2},{"a":3,"b":4}]') as (a int, b int)
+   

 
  a | b
@@ -12708,7 +12714,10 @@ table2-mapping
  explicitly define the structure of the record with an AS
  clause.

-   select * from json_to_record('{"a":1,"b":[1,2,3],"c":[1,2,3],"e":"bar","r": {"a": 123, "b": "a b c"}}') as x(a int, b text, c int[], d text, r myrowtype) 
+   
+create type myrowtype as (a int, b text);
+select * from json_to_record('{"a":1,"b":[1,2,3],"c":[1,2,3],"e":"bar","r": {"a": 123, "b": "a b c"}}') as x(a int, b text, c int[], d text, r myrowtype)
+   

 
  a |b|c| d |   r


Re: First SVG graphic

2019-03-28 Thread Peter Eisentraut
On 2019-03-28 11:04, Magnus Hagander wrote:
> See
> 
> 
> for how to fix that build issue.
> 
> 
> Ugh. If I understand it right, that's something that will happen to
> anybody who tries to build the docs on a headless server, which is
> not exactly uncommon :/
> 
> Can we find a way to override it in the command? Or if not, we
> should probably at least document it in our docs?
> 
> I have done this on alabio now, let's see if it recovers.
> 
> 
> FYI, it did recover. Per above, I think this is something we should
> document. 

It seems like this is a Debian/Ubuntu-specific packaging issue.  We
could document it, but I wonder if it's just a transient thing.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: First SVG graphic

2019-03-28 Thread Peter Eisentraut
On 2019-03-28 12:24, Jürgen Purtz wrote:
> Because many of the prospective authors voted for Inkscape in the course 
> of this discussion, there shall be at least one example in Inkscape format.

Well, my vote is against doing anything with Inkscape, at least until
other possibilities are exhausted.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




Re: First SVG graphic

2019-03-28 Thread Neil

> On Mar 28, 2019, at 1:08 PM, Peter Eisentraut 
>  wrote:
> 
> On 2019-03-28 12:24, Jürgen Purtz wrote:
>> Because many of the prospective authors voted for Inkscape in the course 
>> of this discussion, there shall be at least one example in Inkscape format.
> 
> Well, my vote is against doing anything with Inkscape, at least until
> other possibilities are exhausted.
> 

Has anyone found an svg editor that works good on a Mac.  I tried the MacPorts 
version of inkscape as recommended by the inkscape website and it won’t open a 
file so I’m not sure it works at all.

I did find another editor https://github.com/dsward2/macSVG 
 and it seems to work, but have not used it 
much.

Neil



Re: First SVG graphic

2019-03-28 Thread Alvaro Herrera
I think we should first exhaust all options to use the currently
supported formats, before adding a new controversial one.  You can use
the {s} qualifier for a box in ditaa and it'll show a disk; this ascii
diagram produces a "similar enough" image to your diagram, for example:

+++-+
| Original   | pg_dump, other archive formats | Binary  |
|  Database  |--->| File(s) |
| {s}|| {s} |
+++-+
 | |
 | pg_dump, script format  | pg_restore
 | |
 v v
++   +--+
| SQL INSERT |psql   | Restored |
| commands   |-->| Database |
|{s} |   |   {s}|
++   +--+

It takes more time to write this email than to get the diagram done.

(I say "controversial" about inkscape because it was initially claimed
that the output was going to be clean/readable/diffable, and that's what
got so many upvotes.  After the admission that that's not so, I suspect
votes for inkscape have decreased somewhat.)

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


error

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

Page: https://www.postgresql.org/docs/9.6/xfunc-sql.html
Description:

> hello
> 
> i've descovered a small error - instead of integer should be numeric
> 
> https://www.postgresql.org/docs/9.6/xfunc-sql.html 
> 
> CREATE FUNCTION tf1 (accountno integer, debit numeric) RETURNS integer AS
$$
> UPDATE bank
> SET balance = balance - debit
> WHERE accountno = tf1.accountno;
> SELECT balance FROM bank WHERE accountno = tf1.accountno;
> $$ LANGUAGE SQL;