RE: PGAdmin4 debugger - unable to call ltree functions

From: "Ian Bell" <ib(at)ianbellsoftware(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: PGAdmin4 debugger - unable to call ltree functions
Date: 2018-04-26 22:47:31
Message-ID: !&!AAAAAAAAAAAYAAAAAAAAADldbAmb6+pIq6nH7MxZl07CgAAAEAAAANj67zmOkLtAtg7m25qXunYBAAAAAA==@ianbellsoftware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My function TestLtree() is being executed in the PGAdmin debugger. The
debugger requires I define the argument being passed, I set this to 'a.b.c'
and I have confirmed in the debugger that this is indeed what is passed into
the function.

I do not understand what you mean by "You haven't shown us what you are
doing on that end". I am only using the debugger to test a simple function
- nothing more.

As mentioned before, the code runs without problems in both PSQL and in
PGAdmin4 - it only fails when executed in the debugger.

BTW, I'm running PostgreSQL 10.3, compiled by Visual C++ build 1800, 64-bit
under Windows 10.

Thank,

Ian

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 26 April, 2018 18:18
To: ib(at)ianbellsoftware(dot)com
Cc: 'Adrian Klaver' <adrian(dot)klaver(at)aklaver(dot)com>;
pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: PGAdmin4 debugger - unable to call ltree functions

"Ian Bell" <ib(at)ianbellsoftware(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-04-26 23:04:49 Re: PGAdmin4 debugger - unable to call ltree functions
Previous Message Tom Lane 2018-04-26 22:18:14 Re: PGAdmin4 debugger - unable to call ltree functions