Re: Checking for string data that makes sense Re: postgresql vs mysql

From: brian <brian(at)zijn-digital(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Checking for string data that makes sense Re: postgresql vs mysql
Date: 2007-02-22 14:37:54
Message-ID: 45DDAAC2.8070903@zijn-digital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Zoltan Boszormenyi wrote:
>>>
>>> I would do a CHECK (trim(a) <> '')
>>>
>>>
>>
>> If you were ok with a string consisting soley of whitespace.
>
>
> I meant NOT NULL CHECK(trim(a) <> ''), keeping the context of the
> above example.

Right. I plead that it was late when i replied. I honestly don't know
what i was thinking.

> trim() trims whitespace only from the beginning and the end of the
> strings but not from the middle:
>
> # select trim(' a b c ');

I realise that. I was thinking of this case:

select trim(' ');

Though, i'm not sure what my point was. Again, it was late. Carry on!

brian

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Markus Schiltknecht 2007-02-22 14:48:17 Re: tsearch2: word position
Previous Message Teodor Sigaev 2007-02-22 14:28:59 Re: tsearch2: word position