pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Glenn MacGregor <gtm@oracom.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: limiting access to (through) views
Date: Wed, 16 Jan 2002 07:44:48 -0800 (PST)
Message-ID: <20020116074331.G44027-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <01a001c19ea3$db6dab60$4d00a8c0@catamount>


On Wed, 16 Jan 2002, Glenn MacGregor wrote:

> Thanks,
>
> Now is it possible to do the following:
>
> select table1.* from
> table1, table2 where
> table1.col3=table2.key and
> table2.username like 'CURRENT_USER%'
>
> This is returning nothing when I know it should be returning something, so I
> think that since the CURRENT_USER is in the ' it is not executing the
> function.  Is there a way to make that execute using the like with the regex
> matching (%)?

Do you really want a like search or are you trying to get around it not
matching something?
table2.username like CURRENT_USER || '%' would probably work.




view thread (6+ messages)  latest in thread

Message-ID: <20020116074331.G44027-100000@megazone23.bigpanda.com>
Permalink:  ../20020116074331.G44027-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020116074331.G44027-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, gtm@oracom.com
  Subject: Re: limiting access to (through) views
  In-Reply-To: <20020116074331.G44027-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox