Re: Error when following a documentation - Mailing list pgsql-docs

From David G. Johnston
Subject Re: Error when following a documentation
Date
Msg-id CAKFQuwbmSz=FvxH3aCMkL0aPrtFXc9v_2WFNtdVmv96rMeY+WQ@mail.gmail.com
Whole thread Raw
In response to Error when following a documentation  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Tuesday, August 28, 2018, PG Doc comments form <noreply@postgresql.org> wrote:

postgres=# DECLARE
postgres-#     key integer;
ERROR:  syntax error at or near "integer"
LINE 2:     key integer;
                ^

You are writing pl/psql language code at the SQL input prompt.  That won't work.  You have to either use the SQL DO command or write a function.

David J.
 

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Error when following a documentation
Next
From: Tom Lane
Date:
Subject: Re: Limitation of prepared statement name