From: | Gabriel Dinis <gabriel(dot)dinis(at)vigiesolutions(dot)com> |
---|---|
To: | Bill Moran <wmoran(at)potentialtech(dot)com> |
Cc: | "Massa, Harald Armin" <chef(at)ghum(dot)de>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: PHP Web Auditing and Authorization |
Date: | 2010-11-03 17:54:57 |
Message-ID: | AANLkTi=FxSzpQzVDzhXJuCZj7kTuW5_aSwYKJcpV4bV9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks to all.
You are great!
On Wed, Nov 3, 2010 at 3:16 PM, Bill Moran <wmoran(at)potentialtech(dot)com> wrote:
> In response to "Massa, Harald Armin" <chef(at)ghum(dot)de>:
>
> > Bill,
> >
> > >
> > >
> > > We got this same kind of thing working by using PostgreSQL env
> variables.
> > > First, set custom_variable_classes in your postgresql.conf. You can
> then
> > > use the SET command to set variables of that class, and use them in
> your
> > > functions:
> > >
> > > that is an interesting hack. Just googled up
> >
> >
> http://developer.postgresql.org/pgdocs/postgres/runtime-config-custom.html
> >
> > and now I am wondering, where did you get your confidence that those
> > variables are bound to sessions and NOT bound to server instances? My
> > reading of that documentation let me stay in the assumption, those
> variables
> > are the same across server instances....
>
> huh?
>
> Those variables are bound to database session. Which means each PHP
> process needs to set that variable shortly after establishing the
> database connection, and before running any queries that require it.
> Otherwise, PHP persistent connections my have values from previous
> scripts, and non-persistent connections will have the values unset.
>
> We set all the values we use in our session startup code, which always
> runs at the beginning of script execution, and is guaranteed to know
> the values because it's reading them from the session.
>
> --
> Bill Moran
> http://www.potentialtech.com
> http://people.collaborativefusion.com/~wmoran/<http://people.collaborativefusion.com/%7Ewmoran/>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Rob Richardson | 2010-11-03 19:28:48 | Autovacuum not started because of misconfiguration |
Previous Message | Szymon Guz | 2010-11-03 17:33:12 | Re: Return key from query |