Re: Convert to upper

From: Tomek Zielonka <tomek-lists(at)mult(dot)i(dot)pl>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Convert to upper
Date: 2001-03-03 12:41:16
Message-ID: 20010303134116.A16825@mult.i.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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, !(at)#$%^&*( 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Richardson 2001-03-03 14:08:18 Re: can a trigger on insert -> update other tables?
Previous Message Peter Eisentraut 2001-03-03 10:44:41 Re: how to vacuum from cron?