Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBpF1-00053I-Ht for pgsql-general@arkaria.postgresql.org; Thu, 26 Apr 2018 22:19:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBpF0-0002Fj-Oq for pgsql-general@arkaria.postgresql.org; Thu, 26 Apr 2018 22:19:50 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBpDk-0004z9-Jl for pgsql-general@lists.postgresql.org; Thu, 26 Apr 2018 22:18:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBpDd-0008Gg-FQ for pgsql-general@lists.postgresql.org; Thu, 26 Apr 2018 22:18:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w3QMIEKj006462; Thu, 26 Apr 2018 18:18:14 -0400 From: Tom Lane To: ib@ianbellsoftware.com cc: "'Adrian Klaver'" , pgsql-general@lists.postgresql.org Subject: Re: PGAdmin4 debugger - unable to call ltree functions In-reply-to: References: <8f9e9bd6-3d99-924d-6e77-99402b9a4fb6@aklaver.com> Comments: In-reply-to "Ian Bell" message dated "Thu, 26 Apr 2018 17:54:28 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6460.1524781094.1@sss.pgh.pa.us> Date: Thu, 26 Apr 2018 18:18:14 -0400 Message-ID: <6461.1524781094@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Ian Bell" writes: > I just tried your suggestion and it generates the same error. For > verification, here is the function run in the debugger. I just realized that "syntax error at position N" is *not* the exact spelling you would get from a syntax error in PG's main parser, which I think is what we were all assuming this'd trace down to somehow. What it is is the (very poorly chosen) message you get if either ltree_in() or lquery_in() doesn't like what it's been handed. So basically, the problem here is that TestLtree() is being called with a string that isn't a valid ltree representation. You haven't shown us what you are doing on that end, but for example I can duplicate the error message with # select text2ltree(' '); ERROR: syntax error at position 0 regards, tom lane