pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Glaesemann <grzm@seespotcode.net>
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: Mon, 6 Aug 2007 14:57:27 -0500
Message-ID: <C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net> (raw)
In-Reply-To: <46B77A2B.4090804@terra.com.br>
References: <46B77A2B.4090804@terra.com.br>


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





view thread (6+ messages)  latest in thread

Message-ID: <C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net>
Permalink:  ../C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net/
Also on:    postgresql.org/message-id/C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net

 · 

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: grzm@seespotcode.net, ranieri.oliveira@terra.com.br, pgsql-general@postgresql.org
  Subject: Re: [SQL] Using function like where clause
  In-Reply-To: <C7D5863E-42A0-4D38-972E-04EDF8ADD726@seespotcode.net>

* 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