Received: from sid.trust.ee (sid.trust.ee [194.204.23.180]) by hub.org (8.8.8/8.7.5) with ESMTP id GAA15300; Thu, 16 Jul 1998 06:52:45 -0400 (EDT) Received: from trust.ee (wink.trust.ee [194.204.23.184]) by sid.trust.ee (8.8.7/8.8.7) with ESMTP id NAA00626; Thu, 16 Jul 1998 13:53:06 +0300 Message-ID: <35ADDC68.F13FACB0@trust.ee> Date: Thu, 16 Jul 1998 13:56:40 +0300 From: Hannu Krosing X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: Vadim Mikheev CC: pgsql-interfaces@postgreSQL.org, hackers@postgreSQL.org Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4 References: <199807141537.LAA24391@candle.pha.pa.us> <35AD0879.2EA15E8B@trust.ee> <35AD1048.97441728@krs.ru> <35ADBA13.753CDE3E@trust.ee> <35ADBF17.8FA3ABE0@krs.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Vadim Mikheev wrote: > > Hannu Krosing wrote: > > > > but functions still dont work: > > > > hannu=> create table test1 (a text, b text, > > hannu-> check (trim(a) <> '' or trim(b) <> '')); > > ERROR: parser: parse error at or near "trim" > > TRIM is keyword, not a function... > We have to copy some lines in gram.y Wow! is this standard ? I found the function trim by doing 'select oprname from pg_oper' and tested it as follows: hannu=> select trim(' x '); btrim ----- x (1 row) why is the column called btrim ? some rewrite magic in parser ? If it must stay a keyword, then perhaps we should remove the proc ? > Real functions are working... yep! Thanks: create table test2(a text,b text, check (btrim(a) <> '' or btrim(b) <> '')); does work ;) Hannu