Обсуждение: know the schema name in a trigger

Поиск
Список
Период
Сортировка

know the schema name in a trigger

От
"danilo.juvinao"
Дата:
Hello,

i want know how can i get the schema name that execute a trigger.

for example, if a have a schema "myschema" and a table "mytable" and
it have a trigger procedure, i want know inside the trigger procedure,
with plpgsql, the shcema name "myschema"..

thanks,

pd. sorry for my english, i'm from Colombia.

Re: know the schema name in a trigger

От
"Albe Laurenz"
Дата:
danilo.juvinao wrote:
> i want know how can i get the schema name that execute a trigger.
>
> for example, if a have a schema "myschema" and a table "mytable" and
> it have a trigger procedure, i want know inside the trigger procedure,
> with plpgsql, the shcema name "myschema"..

http://www.postgresql.org/docs/current/static/plpgsql-trigger.html

See TG_TABLE_SCHEMA.

Yours,
Laurenz Albe