BUG #8198: ROW() literals not supported in an IN clause

Поиск
Список
Период
Сортировка
От divided.mind@gmail.com
Тема BUG #8198: ROW() literals not supported in an IN clause
Дата
Msg-id E1UioKD-0007wM-Ta@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #8198: ROW() literals not supported in an IN clause  (Amit Kapila <amit.kapila@huawei.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8198
Logged by:          Rafal Rzepecki
Email address:      divided.mind@gmail.com
PostgreSQL version: 9.2.4
Operating system:   Ubuntu 13.04
Description:        =


Row type literals constructed with ROW() cause an error when used in an IN
clause (string literals casted appropriately are allowed). This is
especially problematic since many client libraries use these literals to
pass values of row-type arguments, hence making it impossible to use them in
IN-clause queries.

To wit:
divide=3D# create type the_row as (mfg text, id text);
CREATE TYPE
divide=3D# create table the_table (widget the_row);                        =
   =

                                                                            =

                          =

CREATE TABLE                                                                =

                                                                            =

                            =

divide=3D# insert into the_table values(row('foo', 'bar')::the_row);       =
   =

                                                                            =

                            =

INSERT 0 1                                                                  =

                                                                            =

                            =

divide=3D# insert into the_table values('(bar,baz)'::the_row);             =
   =

                                                                            =

                     =

INSERT 0 1
divide=3D# select * from the_table;
  widget   =

-----------
 (foo,bar)
 (bar,baz)
(2 rows)

divide=3D# select * from the_table where widget in ('(foo,bar)'::the_row);
  widget   =

-----------
 (foo,bar)
(1 row)

divide=3D# select * from the_table where widget in
(row('foo','bar')::the_row);
ERROR:  arguments of row IN must all be row expressions
LINE 1: select * from the_table where widget in (row('foo','bar')::t...
                                             ^

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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: BUG #8192: On very large tables the concurrent update with vacuum lag the hot_standby replica
Следующее
От: Veres Lajos
Дата:
Сообщение: Re: BUG #8193: A few cosmetic misspell fixes.