Re: [GENERAL] Passing dynamic parameters to a table-returning function

2014-04-29 Thread Moshe Jacobson
This should be the example used in the docs for LATERAL JOIN rather than the contrived, rather useless example that is there today. Moshe Jacobson Manager of Systems Engineering, Nead Werx Inc. 2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339 "Quality is not an a

Re: [GENERAL] Passing dynamic parameters to a table-returning function

2013-02-06 Thread Moshe Jacobson
Perfect, that is exactly what I needed. Thanks David! On Mon, Feb 4, 2013 at 6:49 PM, David Johnston wrote: > Moshe Jacobson wrote > > I'm > > unsure of the syntax for passing in values from columns in the database > as > > the parameters of a set-returning function from which I want to select

Re: [GENERAL] Passing dynamic parameters to a table-returning function

2013-02-05 Thread David Johnston
Moshe Jacobson wrote > I'm > unsure of the syntax for passing in values from columns in the database as > the parameters of a set-returning function from which I want to select *. General form for this in version <= 9.2: WITH func_call_cte AS ( SELECT func_call(col1, col2, col3) AS func_result F

Re: [GENERAL] Passing dynamic parameters to a table-returning function

2013-02-05 Thread Moshe Jacobson
On Tue, Feb 5, 2013 at 9:09 AM, Amit Kapila wrote: > > Can you try with RETURN NEXT syntax. For example, refer below link: > > http://www.postgresql.org/docs/9.2/static/plpgsql-control-structures.html#PL > PGSQL-STATEMENTS-RETURNING > Thanks for your response, but I'm looking for simple SQL synt

Re: [GENERAL] Passing dynamic parameters to a table-returning function

2013-02-05 Thread Amit Kapila
On Tuesday, February 05, 2013 2:22 AM Moshe Jacobson wrote: Hi all, > I'm having trouble because I can't figure out how to select the primary key from that table, as well as all the columns > from the function's output. I'm unsure of the syntax for passing in values from columns in the database a

[GENERAL] Passing dynamic parameters to a table-returning function

2013-02-04 Thread Moshe Jacobson
Hi all, I know I'm probably missing something obvious here, but I have been unable to figure this out or find any docs on it. I have a function that takes in a postal address and normalizes it through text manipulation etc.: *fn_normalize_address*(*in_line_one* character varying, *in_line_two *c