Re: Patch for 8.5, transformationHook

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Patch for 8.5, transformationHook
Дата
Msg-id 162867790904200953s5bd641f1x74ee87f94a58261b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch for 8.5, transformationHook  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Patch for 8.5, transformationHook  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
2009/4/20 Peter Eisentraut <peter_e@gmx.net>:
> On Monday 20 April 2009 09:52:05 Pavel Stehule wrote:
>> I don't believe so is possible to find other general solution. (or
>> better I didn't find any other solution). Tom has true,
>> transformationHook on expression is expensive. I thing, so hook on
>> function should be simple and fast - not all transformation's should
>> be simple defined via property - classic sample is "decode" like
>> functions, it needs procedural code.
>
> I find this all a bit premature, given that you haven't clearly defined what
> sort of user-visible functionality you hope to end up implementing.  Which
> makes it hard to argue why this or that approach might be better.
>

a) it allows procedural setting for parameter's transformation and checking

like fce(int, varchar, int, varchar, ....), fce(int, int, int,
varchar, varchar, varchar) ... there should be hundred patterns

b) it allows constructors for data types (ANSI SQL)

datatype(typefield1[, typefiedl2[, typefiedl3[, ...]]]) returns type

c) it allows named parameters with different syntax

like Oracle fcecall(a => 10, b => 30), like Informix fcecall(a = 10, b = 30)

d) with patch that allows named parameters with PostgreSQL syntax
(value AS name) it allows "smart parameters" - name isn't name of
variable, but label like SQL/XML

xmlforest(user_name, user_name AS "user name")

I hope so this is enough :)

Regards
Pavel


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [PATCH] unalias of ACL_SELECT_FOR_UPDATE
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Patch for 8.5, transformationHook