Thread: BUG #5795: 9.0.2 PDF needs editing

BUG #5795: 9.0.2 PDF needs editing

From
"Leslie Satenstein"
Date:
The following bug has been logged online:

Bug reference:      5795
Logged by:          Leslie Satenstein
Email address:      lsatenstein@yahoo.com
PostgreSQL version: 8.4+ incl 9.0
Operating system:   Fedora 14  / Debian Squeeze
Description:        9.0.2 PDF needs editing
Details:

Using pdf for 9.0.2 version,

The insert examples in section 2.4 do not function if a cut and paste from
pdf to psql is done

This is the problem
INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
’1994-11-27’);
The fields city and date should have ' as delimiter, not
’
Corrected is the following that works.  Error messages are not clear. It
would be great if psql indicated invalid character as error type.

INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');

In fact, there is a lot of touching up that needs to be done to this english
pdf document. (I can do it or I can prepare a list of pages and changes
needed to make a cleaner document)

Re: BUG #5795: 9.0.2 PDF needs editing

From
Alvaro Herrera
Date:
Excerpts from Leslie Satenstein's message of dom dic 19 23:39:38 -0300 2010:

> Using pdf for 9.0.2 version,
>
> The insert examples in section 2.4 do not function if a cut and paste from
> pdf to psql is done
>
> This is the problem
> INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
> ’1994-11-27’);
> The fields city and date should have ' as delimiter, not
> ’
> Corrected is the following that works.  Error messages are not clear. It
> would be great if psql indicated invalid character as error type.
>
> INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
>
> In fact, there is a lot of touching up that needs to be done to this english
> pdf document. (I can do it or I can prepare a list of pages and changes
> needed to make a cleaner document)

This is probably a problem in the toolchain used to produce the PDF
rather than a problem in the source.  Please have a look at the HTML
version and see if these examples are correct there, before spending
time on doing any of this.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: BUG #5795: 9.0.2 PDF needs editing

From
Alvaro Herrera
Date:
Excerpts from Leslie Satenstein's message of dom dic 19 23:39:38 -0300 2010:

> The insert examples in section 2.4 do not function if a cut and paste from
> pdf to psql is done
>
> This is the problem
> INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
> ’1994-11-27’);
> The fields city and date should have ' as delimiter, not
> ’
> Corrected is the following that works.  Error messages are not clear. It
> would be great if psql indicated invalid character as error type.

The problem is that ’ seems to be a valid character for identifiers:

alvherre=# create table ’oh’ (’ah’ int);
CREATE TABLE
alvherre=# \d ’oh’
       Tabla «alvherre.’oh’»
 Columna │  Tipo   │ Modificadores
─────────┼─────────┼───────────────
 ’ah’    │ integer │


--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: BUG #5795: 9.0.2 PDF needs editing

From
Tom Lane
Date:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Leslie Satenstein's message of dom dic 19 23:39:38 -0300 2010:
>> The insert examples in section 2.4 do not function if a cut and paste from
>> pdf to psql is done
>>
>> This is the problem
>> INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
>> ’1994-11-27’);
>> The fields city and date should have ' as delimiter, not
>> ’
>> Corrected is the following that works.  Error messages are not clear. It
>> would be great if psql indicated invalid character as error type.

> The problem is that ’ seems to be a valid character for identifiers:

Yeah, the parser will take most non-ASCII UTF-8 characters as being
identifier characters.  But the real question is why Leslie is getting
’ and not plain ' when he copies and pastes.

What I can see from here:
    * the character in the SGML source is definitely plain '
    * what is in the PDF file displays like a fancy curly quote
    * copying and pasting it, however, gives plain ' for me

The PDF file I used was built by me on Fedora 13; it may or may not
exactly match what Devrim distributes.  I used Preview on OS X to
display the PDF.

So what it looks like from here is that platform-specific differences in
the copy/paste process may be at issue.

Whatever the true story, I don't think there's a darn thing we can do
about it.  The characters are correct in the SGML source, and we are not
in a position to fix whatever subtle bugs may or may not be present in
the PDF generation process.

            regards, tom lane

Re: BUG #5795: 9.0.2 PDF needs editing

From
Alvaro Herrera
Date:
Excerpts from Leslie S Satenstein's message of lun dic 20 12:37:39 -0300 2010:

Hi,

> There are indications for where data and control files are located.
>
> Regarding document differences in the PDF and with Fedora/Debian.
>
> In Fedora, data is typically in different places from where the pdf document indicates.
> In Debian, likewise
>
> I will detail the differences between the PDF and what I find in my three environments (
> Centos, Fedora, Debian). I do not have UBUNTU setup but will do that later in next year.

Oh, I see your point.  The problem is that packagers can change the
location of files, and we don't try to match those alternative
locations.  We only document the canonical locations.  (Moreover, most
paths are user-configurable).

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: BUG #5795: 9.0.2 PDF needs editing

From
"Erik Rijkers"
Date:
On Mon, December 20, 2010 03:39, Leslie Satenstein wrote:
>
> The following bug has been logged online:
>
> Bug reference:      5795
> Logged by:          Leslie Satenstein
> Email address:      lsatenstein@yahoo.com
> PostgreSQL version: 8.4+ incl 9.0
> Operating system:   Fedora 14  / Debian Squeeze
> Description:        9.0.2 PDF needs editing
>
> Using pdf for 9.0.2 version,
>
> The insert examples in section 2.4 do not function if a cut and paste from
> pdf to psql is done
>
> This is the problem
> INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
> ’1994-11-27’);
> The fields city and date should have ' as delimiter, not
> ’
> Corrected is the following that works.  Error messages are not clear. It
> would be great if psql indicated invalid character as error type.
>
> INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
>

see also:

http://archives.postgresql.org/pgsql-docs/2007-12/msg00059.php

That ' to ' conversion (xslt or otherwise) never got implemented.

Re: BUG #5795: 9.0.2 PDF needs editing

From
Peter Eisentraut
Date:
On mån, 2010-12-20 at 02:39 +0000, Leslie Satenstein wrote:
> The insert examples in section 2.4 do not function if a cut and paste
> from
> pdf to psql is done
>
> This is the problem
> INSERT INTO weather VALUES (’San Francisco’, 46, 50, 0.25,
> ’1994-11-27’);
> The fields city and date should have ' as delimiter, not
> ’

I have encountered the same problem when using LaTeX Beamer.  The
solution there is to include the upquote module.  Perhaps this could
also work here.