Re: Punctuation error

2018-09-19 Thread Neil


> On Sep 19, 2018, at 9:43 AM, Tom Lane  wrote:
> 
> =?utf-8?q?PG_Doc_comments_form?=  writes:
>> This sentence should not use a semicolon: "Both the ADD TABLE and DROP TABLE
>> operations are transactional; so the table will start or stop replicating at
>> the correct snapshot once the transaction has committed."
> 
> That looks perfectly fine to me.  Moreover, there are a *lot* of places
> in the PG docs that we'd have to change if we got persnickety about this
> sort of thing.
> 
>> You can either
>> change it to a comma, or else leave out the "so" that follows the semicolon.
>> The text that follows a semicolon must be a complete sentence that stands on
>> its own.
> 
> I am unfamiliar with this grammar "rule", and vigorously dispute that
> anyone follows it in the real world.
> 
>   regards, tom lane
> 

Seems Tom is correct for at least the last 100 years or so.  From Strunk & 
White, Elements of Style 1918, Rule 5 (available on-line). Not saying this is 
the definitive PG writing guide, but most of us in the US used it for college 
writing.

“Note that if the second clause is preceded by an adverb, such as accordingly, 
besides, so, then, therefore, or thus, and not by a conjunction, the semicolon 
is still required.”

“I had never been in the place before; so I had difficulty in finding my way 
about.”

Neil


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 
<https://github.com/dsward2/macSVG> and it seems to work, but have not used it 
much.

Neil



Re: The example for creating a check constraint is missing a comma

2018-02-15 Thread Neil Anderson

On 2018-02-15 1:47 PM, Tom Lane wrote:

=?utf-8?q?PG_Doc_comments_form?=  writes:

See the example from the documentation for CREATE TABLE below. There should
be a comma before the CONSTRAINT keyword.



CREATE TABLE distributors (
 did integer,
 namevarchar(40)
 CONSTRAINT con1 CHECK (did > 100 AND name <> '')
);


Hmm ... that example is legal syntax as-is, but considering that the
explanation for it says specifically that it's table-constraint syntax
not column-constraint syntax, I think you're right.

regards, tom lane




Oh yeah! You're right, strictly speaking it does work. I guess I read it 
as a table constraint because it's on the next line.



--
Neil Anderson
n...@postgrescompare.com
http://www.postgrescompare.com
<>

Re: SQL Commands COPY

2021-06-11 Thread Neil Bower
It was a picnic. I was confusing the 9+ version syntax with the pre-9
version syntax at the bottom of the page. Most of the options between the
two versions are the same and the pre-9 version still works with the newer
versions of PostgreSQL.

I was connecting to a version 13 server at the time. I've been using this
same syntax for several years and never noticed the one key difference
between the older and newer versions of the syntax of having to enclose the
options within round brackets until Laurenz's example.

Thanks!

On Wed, 9 Jun 2021 at 15:47, Tom Lane  wrote:

> Laurenz Albe  writes:
> > On Wed, 2021-06-09 at 19:54 +, PG Doc comments form wrote:
> >> When using psql (version 13.3) against a version 13 cluster, the method
> >> shown in the compatibility section works whereas the methods shown in
> the
> >> synopsis and parameters sections do not work and will throw a syntax
> >> error.
>
> > You must be misreading something, the new syntax works:
> > COPY (SELECT 42 AS x) TO STDOUT (FORMAT 'csv', FORCE_QUOTE (x));
>
> The most probable explanation seems to be that the OP is actually
> connecting to an 8.4 (or older) PG server.
>
> regards, tom lane
>