Search Postgresql Archives

Re: Setting global vars for use with triggers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CSN <cool_screen_name90001@xxxxxxxxx> writes:

> I'd like to create a trigger which deletes associated
> files whenever their corresponding row is deleted.
> Problem is, I don't want to hard-code directory
> locations in the trigger function. Is there a way to
> set a DOCUMENT_ROOT-like variable in Postgresql which
> triggers could access and use? I'm using PHP for the
> trigger (and PG 8.x).

It's probably best to keep it in a one-row table--that way it'll be
saved when you back up the database, and you can change it with
standard SQL.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux