Re: PL/pgSQL 2

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: PL/pgSQL 2
Дата
Msg-id 54045010.9020205@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: PL/pgSQL 2  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: PL/pgSQL 2  (Steven Lembark <lembark@wrkhors.com>)
Список pgsql-hackers
On 09/01/2014 05:24 PM, Andres Freund wrote:
> Look at the *disaster* the few minor changes in python3 were. It's now,
> years after, only starting to get used again.

While that's valid, I'd like to point out that Python2 and Python3 don't
share a runtime and can't easily use each others' modules and functions.

The difference with any "plpgsql2" is that it'd live within the same
runtime - PostgreSQL - as plpgsql and the other languages, and would
share the same interfaces.

Python2 -> Python3 would've been a lot less painful if you could mark,
on a module-by-module basis, whether a module was python2 or python3
code. It wasn't very practical for Python because python code can reach
deep into the guts of unrelated objects discovered at runtime  - it can
add/replace member functions, even hot-patch bytecode. That's not
something we allow in PL/PgSQL, though; from the outside a PL/PgSQL
function is pretty opaque to callers.

That's not to say I'm keen on a "plpgsql2" unless there's no other way;
I'd be rather happier with language version pragmas or similar. But I
don't think it's analogous to Python2 vs Python3.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Joel Jacobson
Дата:
Сообщение: Re: PL/pgSQL 2
Следующее
От: Andres Freund
Дата:
Сообщение: Re: PL/pgSQL 2