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



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to