dbTalk Databases Forums  

[BUGS] pg_dump handling of trim()

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] pg_dump handling of trim() in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Troels Arvin
 
Posts: n/a

Default [BUGS] pg_dump handling of trim() - 07-19-2003 , 10:56 PM






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 majordomo (AT) postgresql (DOT) org)

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.