Re: MacPorts xsltproc is very slow?

2018-03-22 Thread Robert Haas
On Fri, Mar 2, 2018 at 3:34 PM, Thomas Munro
 wrote:
> I think we should complain to the MacPorts packager about the
> namespace vs non-namespace stuff being possibly confused in the
> packages.

Any ideas about a workaround for the meantime?  Having to wait half an
hour for the documentation to build is pretty annoying.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: MacPorts xsltproc is very slow?

2018-03-22 Thread Thomas Munro
On Fri, Mar 23, 2018 at 3:27 AM, Robert Haas  wrote:
> On Fri, Mar 2, 2018 at 3:34 PM, Thomas Munro
>  wrote:
>> I think we should complain to the MacPorts packager about the
>> namespace vs non-namespace stuff being possibly confused in the
>> packages.
>
> Any ideas about a workaround for the meantime?  Having to wait half an
> hour for the documentation to build is pretty annoying.

This worked for me:

1.  Steal a working installation of docbook-xsl from some other
system.  Or clone the repo from github.com/docbook and figure out how
to build it so that there is an xhtml directory (that was beyond my
attention span).  I just did this on a Debian system:

tar czvf docbook-xsl.tgz -C /usr/share/xml/docbook/stylesheet/ docbook-xsl

I could give you that file off-list if you want, but it's 2.2MB so I
won't post it here.  You could also grab the Debian (or other) package
file and unpack that.

I created a directory ~/docbook-stuff/ and then unpacked that tarball there.

2.  Tell xsltproc to rewrite any references to sourceforge.net to use
this local stuff instead.  Either you can create/edit the system-wide
/etc/xml/catalog file (or equivalent under /opt if you're using
MacPorts tools), or you can create a new file somewhere and point to
it with the environment variable XML_CATALOG_FILES.

I went with the env variable approach because I didn't want to mess
with system-wide configuration.  So I created a file
~/docbook-stuff/catalog.xml with this in it:



  
  http://docbook.sourceforge.net/release/xsl/current/";
rewritePrefix="file:///Users/munro/docbook-stuff/docbook-xsl/"/>
  http://docbook.sourceforge.net/release/xsl/current/";
rewritePrefix="file:///Users/munro/docbook-stuff/docbook-xsl/"/>


Obviously that needs to be adjusted to point to wherever you unpacked
that tarball.

I did wonder about simply changing our documentation's sourceforge.net
references to point to docbook.org instead, apparently the new home
(?) of this stuff:

-http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
+https://cdn.docbook.org/release/xsl-nons/current/xhtml/chunk.xsl"/>

(plus similar changes elsewhere).

But it didn't seem to be able to fetch stylesheets that way.  Perhaps
my tools don't like speaking HTTPS.  I didn't try to dig any further
because I'd rather go and hack on C code today.

-- 
Thomas Munro
http://www.enterprisedb.com



json_populate_* functions have extra undocumented parameter

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

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

The json_populate_record and json_populate_recordset functions have an extra
optional undocumented boolean parameter. According to
https://w3resource.com/PostgreSQL/postgresql-json-functions-and-operators.php
the extra parameter is called "use_json_as_text".




postgresql account

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

Page: https://www.postgresql.org/docs/10/static/tutorial-start.html
Description:

postgresql account