Re: Error when following a documentation

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "sachin084(dot)1(at)gmail(dot)com" <sachin084(dot)1(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Error when following a documentation
Date: 2018-08-28 15:56:08
Message-ID: CAKFQuwbmSz=FvxH3aCMkL0aPrtFXc9v_2WFNtdVmv96rMeY+WQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tuesday, August 28, 2018, PG Doc comments form <noreply(at)postgresql(dot)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.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2018-08-28 16:21:15 Re: Limitation of prepared statement name
Previous Message PG Doc comments form 2018-08-28 15:13:51 Error when following a documentation