Tatsuo Ishii wrote: > Does your SRF function allow to return a setof composite data type > using C function? If so, how can I write such that C function? I
Just to follow-up, here's a quick look at what works and what doesn't, at least using my test script. SELECT * FROM myfunc(); Language RetSet RetType Status --------------- ------- ------- --------------------- C t b OK C t c Not tested C f b OK C f c Not tested SQL t b OK SQL t c OK SQL f b OK SQL f c OK PL/pgSQL t b No retset support PL/pgSQL t c No retset support PL/pgSQL f b OK PL/pgSQL f c OK ----------------------------------------------------- RetSet: t = function declared to return setof something RetType: b = base type; c = composite type Same cases work when a view is defined as SELECT * FROM myfunc(). Joe ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html