Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fugLn-0007Yd-Pg for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 15:56:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fugLl-0003dS-Cm for pgsql-docs@arkaria.postgresql.org; Tue, 28 Aug 2018 15:56:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fugLl-0003dH-1B for pgsql-docs@lists.postgresql.org; Tue, 28 Aug 2018 15:56:13 +0000 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fugLi-0001Z8-F1 for pgsql-docs@lists.postgresql.org; Tue, 28 Aug 2018 15:56:11 +0000 Received: by mail-qt0-x233.google.com with SMTP id o15-v6so2262027qtk.6 for ; Tue, 28 Aug 2018 08:56:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7ZuT9pva2l+73YAV9ZVScjIRm7uQTOTh6uJ3ugK8LB4=; b=Ye2tBcykom7Sp8p03USN5veUCACv46LIUsvl4Nilrml16c6mK9BO+saCSaI+ujdQC3 jtX6tf6489xasIEPprETKrNXsDliIB9ehPfuHJ3TSsK9Bk8cDu2PKi+409OpVSry5kEd qeHZEM7qdl7SYvUfOJS07Y6leI1YhbcsYt9qPaYUkQua48MNIn5WT31lXDa5hItRKNMu /mk111pyLHaZ0fs9ETwBds4RMpoaCGBLxVmi1FVZvu07eCpznoWl5Si7AucL4SRCugfp jxyZcgEXD3+jldgRZB/hitw59x4JknN0x2nOQyVETJeoCDvmuRotMV1JIU00+Q2akbzv 01GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7ZuT9pva2l+73YAV9ZVScjIRm7uQTOTh6uJ3ugK8LB4=; b=BtD59OaVNN0VSweIagmCHGgY1Tk0cNCF5JClFLZyR4zCUbSTwbkp/fk73twJgbEVji WcD4WbRxl/efHIXiWeAkZRykdI1wL6WI58GxBqd8jGoiIipsMiGms0PqVaFEqGzw94M3 KwbUw1fyhkAOIAGSukfBzcLQH+ZM6AT6azxsz2F30AotymRvRkcrwKOXqBnWy1wizeBk 0E/h5gg6XkRyDjzTuBvn0vj19EfrToaLrYVcvcIjbY2lX+Mk7kCjbzoaWuedIh6ENGYX xn8fc8Y/dIA97a3RFjXULbtRjz2gyXYEjKn4ILsjlS66uBBj08IpB9PK2gmv3i/G9wDr 1tFQ== X-Gm-Message-State: APzg51CJOB8f9+Kv+cZHY9NVnzdHXc87Gh/aj2pDudyv/wRzGtU3LyPL KLhNwSVlZgiwQL9MdQ0gLxzDfwOWfsIqqNeC9OOzug== X-Google-Smtp-Source: ANB0Vda1Jp+1UEtXdNkwmRbQT0O3YJTOn7oOibeeIC++0B+Q5gt7QI3f+6hku4BeRssBXHzRq5jffpMmiX5A2NV2neA= X-Received: by 2002:a0c:cd82:: with SMTP id v2-v6mr2246337qvm.84.1535471769510; Tue, 28 Aug 2018 08:56:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:c60c:0:0:0:0:0 with HTTP; Tue, 28 Aug 2018 08:56:08 -0700 (PDT) In-Reply-To: <153546923124.1483.6767374163616255141@wrigleys.postgresql.org> References: <153546923124.1483.6767374163616255141@wrigleys.postgresql.org> From: "David G. Johnston" Date: Tue, 28 Aug 2018 08:56:08 -0700 Message-ID: Subject: Re: Error when following a documentation To: "sachin084.1@gmail.com" , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000062663d057480e13e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000062663d057480e13e Content-Type: text/plain; charset="UTF-8" On Tuesday, August 28, 2018, PG Doc comments form 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. --00000000000062663d057480e13e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, August 28, 2018, PG Doc comments form <noreply@postgresql.org> wrote:

postgres=3D# DECLARE
postgres-#=C2=A0 =C2=A0 =C2=A0key integer;
ERROR:=C2=A0 syntax error at or near "integer"
LINE 2:=C2=A0 =C2=A0 =C2=A0key integer;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^

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

David J.=
=C2=A0
--00000000000062663d057480e13e--