Re: converting Oracle to postgres

Поиск
Список
Период
Сортировка
От Berend Tober
Тема Re: converting Oracle to postgres
Дата
Msg-id 65271.216.238.112.88.1044647379.squirrel@$HOSTNAME
обсуждение исходный текст
Ответ на converting Oracle to postgres  (RobertD.Stewart@mail.state.ky.us)
Список pgsql-general
> Here is the error I get when trying to create the trigger
> ERROR:  CreateTrigger: function set_username1() does not exist
> How do I create a function that can be seen by a trigger command.
> When I create my function I get no errors and I'm able to see the
> function.
>
>
> Here is my sql command to create my trigger
>
> CREATE TRIGGER trg_setuser1
> BEFORE INSERT
> ON eventlogs
> FOR EACH ROW
> EXECUTE PROCEDURE set_username1 ("
>   if (username is NULL) then
>     select (eventtype, message) into username from dual;
>   end if;
> END;");
>

It looks to me like your call to set_username1 in the trigger has only a
single argument, whereas the definition of the stored procedure
set_username1 has two arguments. I think PostgreSQL considers them
different functions if the argument list does not match.

>
>
>> Here is a copy of my function in oracle. ...
>
> Have you RT(Fine)M? (In particular section 19.11. "Porting from Oracle
> PL/SQL"). After you have read that, then what specifically is the
> difficulty you are having?

I apologize for being a bit of a smart-ass, but it wasn't readily
apparent to me from your original post that you had tried or read
anything to solve the problem yourself.

Regards,
Berend




В списке pgsql-general по дате отправления:

Предыдущее
От: Mikhail Terekhov
Дата:
Сообщение: Re: How to make a dictoinary list of a query result
Следующее
От: Jonathan Ellis
Дата:
Сообщение: corruption bug in 7.2.3-RH