How to get description of table field in trigger

Поиск
Список
Период
Сортировка
От Andrey Y. Mosienko
Тема How to get description of table field in trigger
Дата
Msg-id 3CD7918B.9FD9A343@ttn.ru
обсуждение исходный текст
Список pgsql-general
Hello All!

There is a table:

CREATE TABLE "base" (
    "id" int4 DEFAULT nextval('base_id_seq'::text) NOT NULL,
    "field" text NOT NULL,
    "field_m" text NOT NULL,
    "field_n" text NOT NULL
);

COMMENT ON TABLE base IS 'base table';
COMMENT ON COLUMN base.field_m IS 'monitor';


CREATE FUNCTION archive() RETURNS opaque AS '
    END;
    ' LANGUAGE 'plpgsql';

CREATE TRIGGER "archive" AFTER UPDATE
    ON base FOR EACH ROW
    EXECUTE PROCEDURE archive();

Is there a method to get descriptions of the fields in TABLE base in my function archive?

I found col_description(tableOID, columnnumber) but I can't understand how to use it.
How to get tableOID in my function?

--
with respection Andrey Feofilactovich.
e-mail: feo@ttn.ru, feo@feo.org.ru
ICQ: 28073807

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

Предыдущее
От: jon@univits.se
Дата:
Сообщение: SQLData, PostgreSQL and typemap woes
Следующее
От: David Fee
Дата:
Сообщение: postgresql 7.1.3