BUG #3037: strange behave of CHECK constraint

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема BUG #3037: strange behave of CHECK constraint
Дата
Msg-id 200702201631.l1KGVU48054533@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #3037: strange behave of CHECK constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      3037
Logged by:          Pavel Stehule
Email address:      pavel.stehule@hotmail.com
PostgreSQL version: 8.3
Operating system:   Linux
Description:        strange behave of CHECK constraint
Details:

check constraint is incorect for operator SIMILAR

root=# create table products(
  barcode char(13) NOT NULL
  check (barcode NOT similar to '%[^0-9]%')
);

root=# insert into products values('22');
ERROR:  new row for relation "products" violates check constraint
"products_barcode_check"
root=# insert into products values('aa');
ERROR:  new row for relation "products" violates check constraint
"products_barcode_check"

root=# select '22'  NOT similar to '%[^0-9]%';
 ?column?
----------
 t
(1 řádka)

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

Предыдущее
От: "Dreas Nielsen"
Дата:
Сообщение: BUG #3040: Domain type handling change in 8.2.2 breaks declarations
Следующее
От: "Eli Green"
Дата:
Сообщение: BUG #3038: information_schema.constraint_column_usage has wrong information for foreign keys