Re: trouble with triggers

From: "Mitch Vincent" <mvincent(at)cablespeed(dot)com>
To: "Robert Treat" <robertt(at)auctionsolutions(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: trouble with triggers
Date: 2001-07-17 14:46:05
Message-ID: 006101c10ecf$356fc0e0$1251000a@Mitch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can't use aggregate function in triggers like that.... You need to
define a function that makes the name lower case

lower(name) will return the lower case of the name, but that's it, your
trigger doesn't actually do anything... I'm not quite sure how you would do
what you want to do with a trigger, or if it's possible (I think it is but
don't have time to look up the correct syntax)... Hopefully someone can give
you a definitive yes or no on the idea. I can give a definite no on the way
you're trying it now, though...

Check the manual, there are some examples of PLSQL functions that might
help you out.

Good luck!

-Mitch

----- Original Message -----
From: "Robert Treat" <robertt(at)auctionsolutions(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, July 17, 2001 9:56 AM
Subject: [GENERAL] trouble with triggers

> [hopefully this isnt a repost, I seem to be haveing an issue getting
message
> through]
>
> I am trying to use the following trigger:
>
> CREATE TRIGGER formatname BEFORE update OR insert ON mytable FOR EACH row
> EXECUTE PROCEDURE lower(name);
>
> however, it gives me the message:
>
> ERROR: CreateTrigger: function lower() does not exist
>
> obviously this does exist, since I can do inserts/updates/selects using
> lower(). I have also tried creating my own version of a lower function but
> it gives me the same message.
>
> Am I missing something? This seems like it should be pretty
straightforward.
> tia,
>
> robert
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-07-17 14:50:33 Re: How to find out the weekday from a date???
Previous Message ryan.a.roemmich 2001-07-17 14:40:54 RE: Postmaster won't start.