Re: [GENERAL] Validating User Login Within Postgres

2014-07-01 Thread Sim Zacks
On 07/01/2014 06:03 PM, Rich Shepard wrote: On Tue, 1 Jul 2014, hubert depesz lubaczewski wrote: That depends. For example - for system that will have 5 users, and requires strict security policies - it would make sense. On the

Re: [GENERAL] Validating User Login Within Postgres

2014-07-01 Thread Rich Shepard
On Tue, 1 Jul 2014, hubert depesz lubaczewski wrote: That depends. For example - for system that will have 5 users, and requires strict security policies - it would make sense. On the other hand, for website, with thousands of users, putting them all as actual roles in Pg doesn't make much sense

Re: [GENERAL] Validating User Login Within Postgres

2014-07-01 Thread hubert depesz lubaczewski
On Tue, Jul 1, 2014 at 3:58 PM, Rich Shepard wrote: > I'm developing a new application and want to take advantage of postgres > features such as triggers and stored procedures and put as much of the > middleware 'business logic' into the database engine as is practical. > Is it possible, or p

[GENERAL] Validating User Login Within Postgres

2014-07-01 Thread Rich Shepard
I'm developing a new application and want to take advantage of postgres features such as triggers and stored procedures and put as much of the middleware 'business logic' into the database engine as is practical. Is it possible, or practical, to validate a potential user login within the data

Re: [GENERAL] Validating User

2005-12-28 Thread Michael Fuhr
On Thu, Dec 29, 2005 at 08:10:52AM +0100, ShepherdHill DB Subscriptions wrote: > Please as a superuser how would I obtain an equivalent of this query: > > SELECT * FROM pg_shadow WHERE usename='userid' AND md5(passwd)='passwd' SELECT * FROM pg_shadow WHERE usename = 'userid' AND passwd = 'md5' ||

[GENERAL] Validating User

2005-12-28 Thread ShepherdHill DB Subscriptions
Hi, Please as a superuser how would I obtain an equivalent of this query: SELECT * FROM pg_shadow WHERE usename='userid' AND md5(passwd)='passwd' I browse the content of the pg_shadow and the passwd field shows something like md5... All I am after is to validate a user against pg_shadow table i

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Michael Fuhr
On Tue, Jan 25, 2005 at 04:28:06PM +0100, Vincenzo Ciancia wrote: > Thank you for your answer. Unfortunately quote_literal is not what I am > looking for, in fact it quotes special characters in the sense of strings, > not in the sense of regular expressions. It sounds like you're looking for the

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Sean Davis wrote: > Yes, this is a fine place to ask your question.ÂÂSometimesÂitÂdoesÂtake > a day or two to get an answer.ÂÂWillÂquote_literalÂdoÂwhatÂyouÂwant? > > http://www.postgresql.org/docs/8.0/interactive/functions-string.html > > Search on that page for quote_literal. > Thank you for

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Sean Davis
On Jan 25, 2005, at 8:48 AM, Vincenzo Ciancia wrote: Vincenzo Ciancia wrote: Should I find every possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate

Re: [GENERAL] Validating user-input to be inserted in regular expressions

2005-01-25 Thread Vincenzo Ciancia
Vincenzo Ciancia wrote: > Should I find every > possible character in the documentation for regular expressions? Is the answer trivial? I checked the manual and the FAQ, and googled for the answer, but I didn't find it. Is there a more appropriate place where I can ask my question? Thanks Vinc

[GENERAL] Validating user-input to be inserted in regular expressions

2005-01-24 Thread Vincenzo Ciancia
Hi all, I would like to take user input, which should be interpreted literally, and put it inside a regular expression, something like select * from files where path ~ (USER_INPUT || '.*') How should I escape the user input? I mean: I know that I must insert double backslashes before special cha