Re: Ltree syntax improvement

Поиск
Список
Период
Сортировка
От Dmitry Belyavsky
Тема Re: Ltree syntax improvement
Дата
Msg-id CADqLbzKCh2e-nOyAtCX4GqW+HbwD4yX=wuOMMRFGtRYWgcnMeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Ltree syntax improvement  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: Ltree syntax improvement  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
Dear Thomas,

On Thu, Jul 11, 2019 at 11:20 AM Thomas Munro <thomas.munro@gmail.com> wrote:
On Wed, Jul 10, 2019 at 7:40 AM Dmitry Belyavsky <beldmit@gmail.com> wrote:
> [ltree_20190709.diff]

Hi Dmitry,

You need to update contrib/ltree_plpython/expected/ltree_plpython.out,
otherwise check-world fails when built with Python support.  The good
news is that it looks like it fails because you fixed something!
(Though I didn't check the details).

 CREATE FUNCTION test2() RETURNS ltree
 LANGUAGE plpythonu
 TRANSFORM FOR TYPE ltree
 AS $$
 return ['foo', 'bar', 'baz']
 $$;
 -- plpython to ltree is not yet implemented, so this will fail,
 -- because it will try to parse the Python list as an ltree input
 -- string.
 SELECT test2();
-ERROR:  syntax error at position 0
-CONTEXT:  while creating return value
-PL/Python function "test2"
+          test2
+-------------------------
+ "['foo', 'bar', 'baz']"
+(1 row)
+


See attached. I'm not familiar enough with python so I just removed the failing tests.
If the main patch is accepted, the ltree_python extension should be redesigned, I think...

--
SY, Dmitry Belyavsky
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.