| From: | "Jerry Richards" <jerry(dot)richards(at)teotech(dot)com> | 
|---|---|
| To: | <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Want FUNCTION to return argv[0] thru argv[6] | 
| Date: | 2010-07-28 16:06:39 | 
| Message-ID: | 36ABCB24F11049FD933DBD21F1732067@greyhawk.tonecommander.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hello,
I am using postgres-odbc and I created the following function which is
called from a C-application.  This function returns a single argv[0] of the
form "(a,b,c,d,e,f,g)".
CREATE OR REPLACE FUNCTION PresRoute(int, int) RETURNS
TABLE(d1 text, d2 text, d3 text, d4 text, r1 bigint, r2 bigint, r3 bigint)
AS $$
SELECT PresDest1(PresNode($1,$2)), PresDest2(PresNode($1,$2)),
PresDest3(PresNode($1,$2)),
PresDest4(PresNode($1,$2)), PresRing1(PresNode($1,$2)),
PresRing2(PresNode($1,$2)),
PresRing3(PresNode($1,$2)) $$ LANGUAGE SQL;
But I would like it to return data as argv[0] thru argv[6] as shown:
d1 | d2 | d3| d4 | r1 | r2 | r3
-------------------------------
a    b    c   d    e    f    g
How should I change my function definition to achieve this?
Thanks,
Jerry
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ranjeeth Nagarajan | 2010-07-28 16:46:45 | order in which rules are executed | 
| Previous Message | Joshua D. Drake | 2010-07-28 15:10:36 | Re: Comparison of Oracle and PostgreSQL full text search |