From: | "Andrey Y(dot) Mosienko" <feo(at)ttn(dot)ru> |
---|---|
To: | Postgres <pgsql-general(at)postgresql(dot)org> |
Subject: | How to get description of table field in trigger |
Date: | 2002-05-07 08:34:19 |
Message-ID: | 3CD7918B.9FD9A343@ttn.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)ttn(dot)ru, feo(at)feo(dot)org(dot)ru
ICQ: 28073807
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2002-05-07 13:17:35 | Re: postgresql 7.1.3 |
Previous Message | jon | 2002-05-07 08:09:38 | SQLData, PostgreSQL and typemap woes |