Re: [SQL] Using function like where clause - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: [SQL] Using function like where clause
Date
Msg-id C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net
Whole thread Raw
In response to Using function like where clause  (Ranieri Mazili <ranieri.oliveira@terra.com.br>)
List pgsql-general
On Aug 6, 2007, at 14:44 , Ranieri Mazili wrote:

> 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'

Probably. What have you tried? What does the documentation say? If
you're having trouble with a specific function, please provide the
code and hopefully we can work it out.

> 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'

Probably not. What have you tried? What does the documentation say?

A couple of minutes in psql would probably be faster than sending an
email to the list.

Michael Glaesemann
grzm seespotcode net



pgsql-general by date:

Previous
From: "Keaton Adams"
Date:
Subject: Re: Template zero xid issue
Next
From: Tom Lane
Date:
Subject: Re: 8.1.2 select for update issue