pg_dump handling of trim()

Поиск
Список
Период
Сортировка
От Troels Arvin
Тема pg_dump handling of trim()
Дата
Msg-id pan.2003.07.16.21.36.18.406573@arvin.dk
обсуждение исходный текст
Список pgsql-bugs
Hello,

In a table, I have:

create table foo(
  ...,
  id_alpha3 character(3) NOT NULL
    CHECK (character_length(trim(both ' ' from id_alpha3)) = 3),
  ...
);

When I do a pg_dump, pg_dump translates it to:

CREATE TABLE foo (
    ...
    id_alpha3 character(3) NOT NULL,
    ...
    CONSTRAINT country_id_alpha3 CHECK ((character_length(btrim((id_alpha3)::text, ' '::text)) = 3)),
);

I.e., use of SQL:1999 standard "TRIM(BOTH somechar FROM ...)" is changed
into use of PostgreSQL-specific BTRIM().

As PostgreSQL seems to strive to be standard compliant, I consider the
above a (minor) bug.

--
Greetings from Troels Arvin, Copenhagen, Denmark

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

Предыдущее
От: cookfire@softhome.net
Дата:
Сообщение: PL/PGSQL stat failed on file '$libdir/plpgsql'
Следующее
От: "Thomas Behr"
Дата:
Сообщение: Small problem in contrib/dbase/dbf2pg.c