Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1izvmY-0005up-4v for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2020 05:02:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1izvmW-0003vK-21 for pgsql-general@arkaria.postgresql.org; Fri, 07 Feb 2020 05:02:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1izvmV-0003v0-MB for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2020 05:02:19 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1izvmO-00011g-Rq for pgsql-general@lists.postgresql.org; Fri, 07 Feb 2020 05:02:19 +0000 Received: by mail-pg1-x52b.google.com with SMTP id j15so490170pgm.6 for ; Thu, 06 Feb 2020 21:02:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:user-agent:mime-version :content-transfer-encoding; bh=GDAtcb/A50f/q4vXEgbgtJz2GExjyDFdcTdAdkaSQ/I=; b=fdCSosWAVVSpf1ZMq9Ask+jtBbG6smv2hjvx5mTQRiWnVoPhr+j22EjSssyaLD+kty bSGp2Ox1kpUR2mKhVdFv0vfFqiEwCevRf0p5gKbyvPw9wWQkRtyUtvz475hzdUWT4X4H I1JF26OjITneL7XAJPePnXqIIXpd6ttyoVcpIQJw+Id3qhBVh+llvbmXZHu013nUErrm eu6j4NLpI+UhI+6qorHGdjsxktE6xf5ZSXKeFclngwLB9YsHpmyb0JfvnRUhQVG6ZrFw S5dpqvgqMRLgYPy21BeUngXOu0qePZOa4R4zpmd7fh8KiqtX27znF2hw3zHs0mzn8kYb bigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:user-agent :mime-version:content-transfer-encoding; bh=GDAtcb/A50f/q4vXEgbgtJz2GExjyDFdcTdAdkaSQ/I=; b=U+kBydkRV/MTP1fcPUGUH9dQbEKaFJvCEMq01oZuv2szTXGn8W92afMH43kZcLrCAo 8MeBd400OM+ozrPc0LQ9OaS9Nj86WEi1FxU3ic11lqdRu9vE6Q4x40ToII21RvMpnBn4 ZYdsc9qFjZuG16++ZGLeRRmpO7QXkYkUKmfkY7EkdI6CTC1I6WxZlO1hC34+/nSG+Guo Xpbbla7e56x3mH8FY3xaXZQyySxzKfnmV1o9JrP2A3pz1oE6TD9MjgTKp6cZaRslKruW QPhQr2hHybZO+mwueUxJ4Z4u75teVDMVyaHIIYVZuMK4Bbqng2CFqDGHCQc17Wl62TgD HddA== X-Gm-Message-State: APjAAAXuwbj9Wnc/h2ph1Ca3BPiphoTA59VroEh3BIFHOJvLAtamVB4L XcoTJ3VVuzqCCP4XBzdHZKOqOE2m X-Google-Smtp-Source: APXvYqySBEZ4JwsVU064IFKZ7HNB6AMs4irqfEYYFpyBAQG0wMZuL5IwiWmiRzuMpx0HYx9Z/yIRKA== X-Received: by 2002:a63:3d43:: with SMTP id k64mr7433255pga.342.1581051730247; Thu, 06 Feb 2020 21:02:10 -0800 (PST) Received: from roblaptop (59-102-97-127.tpgi.com.au. [59.102.97.127]) by smtp.gmail.com with ESMTPSA id i66sm1076796pfg.85.2020.02.06.21.02.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 21:02:09 -0800 (PST) Message-ID: Subject: deallocate statement failing From: rob stone To: pgsql-general@lists.postgresql.org Date: Fri, 07 Feb 2020 16:02:05 +1100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1-3 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, Version:- PostgreSQL 12.1 (Debian 12.1-2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 9.2.1-22) 9.2.1 20200104, 64-bit Log:- 2020-02-07 15:42:55 AEDT LOG: statement: SELECT COUNT(*) AS ps_count FROM pg_prepared_statements WHERE name = 'AIT1581050529' 2020-02-07 15:42:55 AEDT ERROR: syntax error at or near "'AIT1581050529'" at character 13 2020-02-07 15:42:55 AEDT STATEMENT: DEALLOCATE 'AIT1581050529' The deallocate statement fails. It doesn't matter if it is just "DEALLOCATE" or "DEALLOCATE PREPARE". We put in the count statement to make sure the prepared statement still existed and only issued the "DEALLOCATE" if ps_count is greater then zero. Does anybody know why it is giving this syntax error? TIA, Rob