Skip site navigation (1) Skip section navigation (2)

"external" variables and triggers

From: Andrej Ricnik-Bay <andrej(dot)groups(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: "external" variables and triggers
Date: 2005-08-15 18:35:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi there,

I have a problem that I'm not even 100% certain of how to word:

I'm writing a little postgres-app with a web-frontend. I was 
going to map users to actual postgres users, but someone
on was adamant that that was
bad practice and posed a security risk.

So I changed my plan and put user-IDs and md5 password-
hashes into a table of their own.

My problem now is that I'm using a separate table to keep
track of changes to the status of another one, trying to keep
the name, the date and a field called status.  My problem is 
that I can't figure out how to pass the user name (that has 
been authenticated via a table and some php) to my trigger.

Can this be achieved at all? 

If it can't, I'd rather re-create the database again and use
native postgres users (unless of course it REALLY is a
horrible security risk) than implement a whole lot of logic
in a language I'm not that familiar with.

Thanks for your patience reading this :)



pgsql-novice by date

Next:From: Tom LaneDate: 2005-08-15 19:58:05
Subject: Re: "external" variables and triggers
Previous:From: Sean DavisDate: 2005-08-15 17:38:47
Subject: Re: Suspend Referential Integrity?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group