BUG #10785: error if using x>n AND x

Поиск
Список
Период
Сортировка
От lunda@bitmessage.ch
Тема BUG #10785: error if using x>n AND x
Дата
Msg-id 20140627135405.15694.38636@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #10785: error if using x>n AND x  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      10785
Logged by:          j.l.
Email address:      lunda@bitmessage.ch
PostgreSQL version: 9.3.4
Operating system:   Linux 64bit (ubuntu 12.04)
Description:

DOES WORK:
create index planet_osm_point_city_50k_index on planet_osm_point using
gist(way) where
(((capital IS NULL) OR (capital <> 'yes'::text)) AND
(place = ANY ('{city,town}'::text[])) AND
(population IS NOT NULL) AND (population <> ''::text) AND
(regexp_replace(population, '[., ]', '')::int > 50000));

DOES WORK:
create index planet_osm_point_city_50k_index on planet_osm_point using
gist(way) where
(((capital IS NULL) OR (capital <> 'yes'::text)) AND
(place = ANY ('{city,town}'::text[])) AND
(population IS NOT NULL) AND (population <> ''::text) AND
(regexp_replace(population, '[., ]', '')::int between 50000 and 99999));

DOES NOT WORK (ERROR:  invalid input syntax for integer: "tower"):
create index planet_osm_point_city_50k_index on planet_osm_point using
gist(way) where
(((capital IS NULL) OR (capital <> 'yes'::text)) AND
(place = ANY ('{city,town}'::text[])) AND
(population IS NOT NULL) AND (population <> ''::text) AND
(regexp_replace(population, '[., ]', '')::int >= 50000) AND
(regexp_replace(population, '[., ]', '')::int < 100000));

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Bogus pg_class.relminmxid value for pg_database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #10785: error if using x>n AND x