Using function like where clause

From: Ranieri Mazili <rmazili(at)wgsystems(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Using function like where clause
Date: 2007-08-06 19:44:29
Message-ID: 46B77A1D.4050908@wgsystems.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Hello,

I have 2 questions.
1) Can I use a function that will return a string in a where clause like
bellow?

select *
from table
where my_function_making_where()
and another_field = 'another_think'

2) Can I use a function that will return a string to return the list of
columns that I want to show like below?

select my_function_making_list_of_columns()
from table
where field_test = 'mydatum'

Thanks

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ranieri Mazili 2007-08-06 19:44:43 Using function like where clause
Previous Message Michael Glaesemann 2007-08-06 19:40:59 Re: pg_dump of only the structure from a client such as ruby

Browse pgsql-sql by date

  From Date Subject
Next Message Ranieri Mazili 2007-08-06 19:44:43 Using function like where clause
Previous Message Rodrigo De León 2007-08-06 15:15:12 Re: Best Fit SQL query statement