1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Add a WINDOW attribute to CREATE FUNCTION, and teach pg_dump about it,

so that user-defined window functions are possible.  For the moment you'll
have to write them in C, for lack of any interface to the WindowObject API
in the available PLs, but it's better than no support at all.

There was some debate about the best syntax for this.  I ended up choosing
the "it's an attribute" position --- the other approach will inevitably be
more work, and the likely market for user-defined window functions is
probably too small to justify it.
This commit is contained in:
Tom Lane
2008-12-31 02:25:06 +00:00
parent 8e8854daa2
commit 26ce4e85a1
9 changed files with 70 additions and 18 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.82 2008/12/18 18:20:33 tgl Exp $
* $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.83 2008/12/31 02:25:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -140,6 +140,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
pltemplate->tmplhandler,
pltemplate->tmpllibrary,
false, /* isAgg */
false, /* isWindowFunc */
false, /* security_definer */
false, /* isStrict */
PROVOLATILE_VOLATILE,
@ -174,6 +175,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
pltemplate->tmplvalidator,
pltemplate->tmpllibrary,
false, /* isAgg */
false, /* isWindowFunc */
false, /* security_definer */
false, /* isStrict */
PROVOLATILE_VOLATILE,