Re: mixed, named notation support

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: mixed, named notation support
Дата
Msg-id 162867790907310546y46d61af5q7aef138b10d774f5@mail.gmail.com
обсуждение исходный текст
Ответ на Re: mixed, named notation support  (Bernd Helmle <mailings@oopsware.de>)
Ответы Re: mixed, named notation support  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
2009/7/31 Bernd Helmle <mailings@oopsware.de>:
> --On Montag, Juli 27, 2009 15:24:12 +0200 Bernd Helmle
> <mailings@oopsware.de> wrote:
>
>>> Hi,
>>>
>>> I sending a little bit modified version - I removed my forgotten
>>> comment in gram.y
>>
>> Thanks, i'll look on it asap.
>
> Looks good now.
>
> Here is a slightly edited reviewed patch version. I've edited the docs and
> fixed some spelling errors in a few error messages. It seems the patch
> mangled some source comments in namespace.c, i've rearranged them and tried
> to explain the purpose of VerifyCandidateNamedNotation(). I'm continuing
> reviewing this but can't get on it again until sunday.
>
> Pavel, can you have a look at the docs part of this patch and watch out for
> any gotchas?
>

I looked there and I thing it's very good. I have only one idea about
samples in docs. Mathematical function isn't too much readable. Maybe
some string concation or returning record should be more readable.

create or replace function foo(a varchar, b varchar, uppercase boolean = false)
returns varchar as $$ select when uppercase then 'a=' || a ', b=' || b                                      else
upper('a='|| a ', b=' || b) end; 
$$ language sql immutable strict;

select foo('Hello','World');
select foo('Hello', World', true);
select foo('Hello' as a, 'World' as b);
select foo('Hello', 'World', true as uppercase);
select foo(true as uppercase, 'World' as b, 'Hello' as b);

or some similar

Thank You very much
Pavel

> --
>  Thanks
>
>                   Bernd


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

Предыдущее
От: PFC
Дата:
Сообщение: More thoughts on sorting
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: 8.4 win32 shared memory patch