Re: Convert to upper - Mailing list pgsql-general

From Tomek Zielonka
Subject Re: Convert to upper
Date
Msg-id 20010303134116.A16825@mult.i.pl
Whole thread Raw
In response to Re: Re: Convert to upper  ("Rod Taylor" <rod.taylor@inquent.com>)
List pgsql-general
On Fri, Mar 02, 2001 at 11:05:42AM -0500, Rod Taylor wrote:
> check
>
> create table uppercase (
>   name char(15) check (name ~ '[A-Z]')
> );

If don't want lowercase letters, but allow digits, !@#$%^&*( etc.:

create table uppercase (
  name char(15) check (name !~ '[[:lower:]]')
);

If you want only uppercase letters:

create table uppercase (
  name char(15) check (name ~ '^[[:upper:]]*$');
);

Tomek

--
.signature: Too many levels of symbolic links

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: how to vacuum from cron?
Next
From: Jan Wieck
Date:
Subject: Re: Trigger Blunder