refreshed table function support

Started by Pavel Stehuleabout 19 years ago2 messagespatches
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

Hello

This patch contains implementation of table functions defined in ANSI
SQL 2003 (Conformance with SQL2003: T326 Table functions). Patch adds
new proargmode PROARGMODE_TABLE (based on PROARGMODE_OUT). Columns of
output table are similar OUT arguments, but don't generate any
variables.

Proposal: http://archives.postgresql.org/pgsql-hackers/2007-02/msg00318.php
Description: SIGMOD Record, Vol. 33, No. 1, March 2004

Patch contains three diffs:
* pgdumpclean .. small readability fix for pg_dump.c
* tabfce .. implementation of table functions
* plpgsql-tabfce .. table expression support for plpgsql's return stmt

This patch can broke applications which scan argmodes. Plpgsql support
is separated because plpgsql implementation isn't standardised. But
current plpgsql hasn't any method for one statement table output from
function, and table expression is clean and simple tool for it.

Older version was broken by enum patch and scrollable cursor patch.
Older version didn't dump table functions correctly. It's fixed now.

Regards
Pavel Stehule

Attachments:

plpgsql-tabfce.difftext/x-patch; charset=ANSI_X3.4-1968; name=plpgsql-tabfce.diffDownload+249-27
pgdumpclean.difftext/x-patch; charset=ANSI_X3.4-1968; name=pgdumpclean.diffDownload+6-6
tabfce.difftext/x-patch; charset=ANSI_X3.4-1968; name=tabfce.diffDownload+499-53
#2Bruce Momjian
bruce@momjian.us
In reply to: Pavel Stehule (#1)
Re: refreshed table function support

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Pavel Stehule wrote:

Hello

This patch contains implementation of table functions defined in ANSI
SQL 2003 (Conformance with SQL2003: T326 Table functions). Patch adds
new proargmode PROARGMODE_TABLE (based on PROARGMODE_OUT). Columns of
output table are similar OUT arguments, but don't generate any
variables.

Proposal: http://archives.postgresql.org/pgsql-hackers/2007-02/msg00318.php
Description: SIGMOD Record, Vol. 33, No. 1, March 2004

Patch contains three diffs:
* pgdumpclean .. small readability fix for pg_dump.c
* tabfce .. implementation of table functions
* plpgsql-tabfce .. table expression support for plpgsql's return stmt

This patch can broke applications which scan argmodes. Plpgsql support
is separated because plpgsql implementation isn't standardised. But
current plpgsql hasn't any method for one statement table output from
function, and table expression is clean and simple tool for it.

Older version was broken by enum patch and scrollable cursor patch.
Older version didn't dump table functions correctly. It's fixed now.

Regards
Pavel Stehule

[ Attachment, skipping... ]

[ Attachment, skipping... ]

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +