Re: trouble with triggers - Mailing list pgsql-general

From Mitch Vincent
Subject Re: trouble with triggers
Date
Msg-id 006101c10ecf$356fc0e0$1251000a@Mitch
Whole thread Raw
In response to trouble with triggers  ("Robert Treat" <robertt@auctionsolutions.com>)
List 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@auctionsolutions.com>
To: <pgsql-general@postgresql.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
>


pgsql-general by date:

Previous
From: Ryan Mahoney
Date:
Subject: Re: How to find out the weekday from a date???
Next
From: Justin Clift
Date:
Subject: Re: MS Access 97 SR-1, psqlodbc 7.01.00.06, slowperfomance