From: Ragnar <gnari@hive.is>
To: Ranieri Mazili <ranieri.oliveira@terra.com.br>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Using function like where clause
Date: Tue, 07 Aug 2007 18:20:37 +0000
Message-ID: <1186510837.5778.403.camel@localhost.localdomain> (raw)
In-Reply-To: <46B77A2B.4090804@terra.com.br>
References: <46B77A2B.4090804@terra.com.br>
On mán, 2007-08-06 at 16:44 -0300, 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'
you could have your function return a boolean instead of a string
> 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'
no
gnari
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: gnari@hive.is, ranieri.oliveira@terra.com.br, pgsql-general@postgresql.org
Subject: Re: [SQL] Using function like where clause
In-Reply-To: <1186510837.5778.403.camel@localhost.localdomain>
* 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