Strange interaction of union and expressions

Поиск
Список
Период
Сортировка
От Aaron Bingham
Тема Strange interaction of union and expressions
Дата
Msg-id l8d5spjr9j.fsf@lynx.cenix-bioscience.com
обсуждение исходный текст
Ответы Re: Strange interaction of union and expressions  (Oleg Bartunov <oleg@sai.msu.su>)
Re: Strange interaction of union and expressions  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Strange interaction of union and expressions  (Kevin Murphy <murphy2@speakeasy.net>)
Список pgsql-general
Hello all,

We noticed some very odd behavior today with Postgres 7.4.5

Running the following SQL:

create table a (foo varchar);
insert into a (foo) values ('baz');
create table b (foo varchar);
insert into b (foo) values ('woof');
select '"' || foo || '"' as foo
    from (select foo from a) as bar
        union select foo from b;

Produces this output:

  foo
-------
 "baz"
 woof
(2 rows)

I would expect the following instead:

  foo
-------
 "baz"
 "woof"
(2 rows)

Is this a known issue?  Has it been fixed?

Thanks,

--
--------------------------------------------------------------------
Aaron Bingham
Software Engineer
Cenix BioScience GmbH
--------------------------------------------------------------------


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Regular expression. How to disable ALL meta-character in a regular expression
Следующее
От: Aaron Bingham
Дата:
Сообщение: Re: Strange interaction of union and expressions