Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] Re: [HACKERS] changes in 6.4

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Vadim Mikheev <vadim(at)krs(dot)ru>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Date: 1998-07-16 10:56:40
Message-ID: 35ADDC68.F13FACB0@trust.ee (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-interfaces
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

In response to

Responses

pgsql-hackers by date

Next:From: Thomas G. LockhartDate: 1998-07-16 13:36:01
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Aleksey DashevskyDate: 1998-07-16 10:35:30
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

pgsql-interfaces by date

Next:From: Telephone VdB Foods LtdDate: 1998-07-16 12:14:51
Subject: A working combination ....
Previous:From: Aleksey DashevskyDate: 1998-07-16 10:35:30
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

pgsql-general by date

Next:From: Thomas G. LockhartDate: 1998-07-16 13:36:01
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Aleksey DashevskyDate: 1998-07-16 10:35:30
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group