Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0GFilV24816 for ; Wed, 16 Jan 2002 10:44:47 -0500 (EST) (envelope-from sszabo@megazone23.bigpanda.com) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 16F28D5F3; Wed, 16 Jan 2002 07:44:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 0CA465BF4; Wed, 16 Jan 2002 07:44:48 -0800 (PST) Date: Wed, 16 Jan 2002 07:44:48 -0800 (PST) From: Stephan Szabo To: Glenn MacGregor Cc: Subject: Re: limiting access to (through) views In-Reply-To: <01a001c19ea3$db6dab60$4d00a8c0@catamount> Message-ID: <20020116074331.G44027-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200201/186 X-Sequence-Number: 6272 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.