triggers using the correct schema ..

From: "Paul Newman" <pnewman(at)tripoint(dot)co(dot)uk>
To: <pgsql-general(at)postgresql(dot)org>
Subject: triggers using the correct schema ..
Date: 2005-05-20 11:04:16
Message-ID: D5F7521105A39145BEA6A6F47AEFFA88290784@sbserver.tripoint.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

We have lots of schemas .. one of which is public. They all have the
same set of tables and some of these have triggers. However when a
trigger is fired in a schema it works on tables in the public schema
instead of the "current" schema. We can put a statement similar to set
search_path = "schema_x"; in the front of each trigger ... but we use a
script to generate these schemas so means doing a search and replace for
each creation that we do. Is there a CURRENT SCHEMA type of command such
that we could do .... Set search_path = CURRENT SCHEMA ?????

Thanks

Paul Newman

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2005-05-20 11:11:43 Re: [HACKERS] Inherited constraints and search paths (was Re:
Previous Message Paul Newman 2005-05-20 10:58:04 guids / bytea and index use ?