Re: [SQL] sql function: using set as argument

2005-09-05 Thread Akshay Mathur
Found a solution   Second function can be written as     Get_count(anyarray, int)     Select count(b_column) from some_table where some_field_1 any ($1) and some_field_2 = $2;   Calling this function:     Select Get_count(array(functio

Re: [SQL] sql function: using set as argument

2005-08-18 Thread Akshay Mathur
st 16, 2005 3:39 AM To: Akshay Mathur Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] sql function: using set as argument   Is there a reason not to build it in as a sub-query?   E.g., if you have a function get_count( int ):   SELECT count(b_column) FROM some_table

Re: [SQL] sql function: using set as argument

2005-08-15 Thread Thomas F. O'Connell
Is there a reason not to build it in as a sub-query?E.g., if you have a function get_count( int ): SELECT count(b_column)FROM some_tableWHERE some_field_1 in (    SELECT a_column    FROM a_table    WHERE some_condition)AND some_field_2 = $2; --Thomas F. O'ConnellCo-Founder, Information ArchitectSit

[SQL] sql function: using set as argument

2005-08-14 Thread Akshay Mathur
Hi,   I have a function that returns a set. Looks like:     Select a_column from a_table where some_condition;   I want to use output of this function as an argument of another function     Second looks like:     Get_count(result_set_of_function_