PL/Ruby timestamp problem

Поиск
Список
Период
Сортировка
От Anton Nikiforov
Тема PL/Ruby timestamp problem
Дата
Msg-id 40FCD5AB.5040609@nikiforov.ru
обсуждение исходный текст
Список pgsql-general
Dear All!
I have the following problem programming PL/Ruby trigger function
The function looks like:
CREATE OR REPLACE FUNCTION control.function_log() RETURNS TRIGGER
SECURITY INVOKER AS '
    data = "<LOGOPERATION>\n"
      ccurrent_time = PLruby.exec("select now()",1,"value")
        data += "\t<TIME>#{ccurrent_time}</TIME>\n"
    data += "\t<USER>\n"
..........
    PL::OK
' LANGUAGE 'plruby';

This is a strange thing but i expect to get current time but got:
<LOGOPERATION>
<TIME>Sun Jul 21 10:46:10 MSK 1974</TIME>
<USER>
..........

Is this PostgreSQL/Ruby or "device my_hands" problem? And in case the
answer is not the last from the list - could someone please help with
the solution?

--
Best regards,
Anton Nikiforov

Вложения

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

Предыдущее
От: mmc@maruska.dyndns.org (Michal Maruška)
Дата:
Сообщение: Re: PQftable insufficient for primary key determination
Следующее
От: "Joost Kraaijeveld"
Дата:
Сообщение: How to find records with the same field?