pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ranieri Mazili <rmazili@wgsystems.com.br>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Using function like where clause
Date: Mon, 06 Aug 2007 16:44:29 -0300
Message-ID: <46B77A1D.4050908@wgsystems.com.br> (raw)

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



view thread (6+ messages)  latest in thread

Message-ID: <46B77A1D.4050908@wgsystems.com.br>
Permalink:  ../46B77A1D.4050908@wgsystems.com.br/
Also on:    postgresql.org/message-id/46B77A1D.4050908@wgsystems.com.br

 · 

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: rmazili@wgsystems.com.br, pgsql-general@postgresql.org
  Subject: Re: Using function like where clause
  In-Reply-To: <46B77A1D.4050908@wgsystems.com.br>

* 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