Search Postgresql Archives

Re: [SQL] Using function like where clause

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux