Converting a function in C

Поиск
Список
Период
Сортировка
От Mr OCP
Тема Converting a function in C
Дата
Msg-id 20011123081420.12866.qmail@web20604.mail.yahoo.com
обсуждение исходный текст
Список pgsql-admin
Hi

Can any one please help me write the following triger
in C, your help would be much appreciated

/* Archive function */
  DROP FUNCTION fn_archive();
  CREATE FUNCTION fn_archive() RETURNS OPAQUE AS '
    BEGIN
      /* TG_OP is the function (UPDATE, DELETE,
SELECT) */
      INSERT INTO adres_archive
          VALUES
(OLD.name,OLD.adres,OLD.tel,current_user,now(),TG_OP);

      IF TG_OP = ''UPDATE''
      THEN
        NEW.modtime := ''now'';
        RETURN NEW;
      END IF;

      RETURN OLD;
    END;
  ' LANGUAGE 'plpgsql';



Tks
Mike

http://shopping.yahoo.com.au - Yahoo! Shopping
- Get organised for Christmas early this year!

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

Предыдущее
От: Andre Schubert
Дата:
Сообщение: [Fwd: [Zope-dev] Authentication Problem with Postgres]
Следующее
От: MG
Дата:
Сообщение: table permissions