Jules Alberts wrote:
Hello everyone,
Several columns in sereval tables in my DB should always be lowercase.
I now have a simple function:
create or replace function code_lower() returns trigger as '
begin
NEW.code := lower(NEW.code);
return NEW;
end'
language 'plpgsql';
which I c
"Jules Alberts" <[EMAIL PROTECTED]> writes:
> Code like this
> NEW.$1 := lower(NEW.$1)
> won't work, all I get is error messages :-(
Can't do that in plpgsql; it does not like run-time specification of
table or field names. You could try using EXECUTE but I doubt that
will work either for an assi
Hello everyone,
Several columns in sereval tables in my DB should always be lowercase.
I now have a simple function:
create or replace function code_lower() returns trigger as '
begin
NEW.code := lower(NEW.code);
return NEW;
end'
language 'plpgsql';
which I call with a trigger l