Re: easy function or trigger to UPPER() all alpha data

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: easy function or trigger to UPPER() all alpha data
Date: 2012-02-08 16:51:09
Message-ID: 20120208165109.GA5925@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

mgould(at)isstrucksoftware(dot)net <mgould(at)isstrucksoftware(dot)net> wrote:

> We need to ensure that our data is in upper case only in the db. Is there a
> easy way to do this via a function without having to name each column
> separately?

You can define a TRIGGER for such tasks (befor insert or update), but
you have to name each column (maybe not within triggers written in
pl/perl, i'm not sure ...)

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-02-08 16:56:16 Re: Defining Role Privileges
Previous Message Carlos Mennens 2012-02-08 16:19:54 Defining Role Privileges