Re: Checking for string data that makes sense Re: postgresql vs mysql - Mailing list pgsql-general

From brian
Subject Re: Checking for string data that makes sense Re: postgresql vs mysql
Date
Msg-id 45DDAAC2.8070903@zijn-digital.com
Whole thread Raw
In response to postgresql vs mysql  (gustavo halperin <ggh.develop@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: tsearch2: word position
Next
From: Markus Schiltknecht
Date:
Subject: Re: tsearch2: word position