pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@trust.ee>
To: Vadim Mikheev <vadim@krs.ru>
Cc: pgsql-interfaces@postgreSQL.org
Cc: hackers@postgreSQL.org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Date: Thu, 16 Jul 1998 13:56:40 +0300
Message-ID: <35ADDC68.F13FACB0@trust.ee> (raw)
References: <199807141537.LAA24391@candle.pha.pa.us>
	<35AD0879.2EA15E8B@trust.ee>
	<35AD1048.97441728@krs.ru>
	<35ADBA13.753CDE3E@trust.ee>
	<35ADBF17.8FA3ABE0@krs.ru>

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



view thread (29+ messages)  latest in thread

Message-ID: <35ADDC68.F13FACB0@trust.ee>
Permalink:  ../35ADDC68.F13FACB0@trust.ee/
Also on:    postgresql.org/message-id/35ADDC68.F13FACB0@trust.ee

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: hannu@trust.ee, vadim@krs.ru, hackers@postgreSQL.org
  Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
  In-Reply-To: <35ADDC68.F13FACB0@trust.ee>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox