From 26ce4e85a1605326f29e3cb0cc715ddf522a753a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 31 Dec 2008 02:25:06 +0000 Subject: 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. --- src/backend/utils/adt/ruleutils.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/backend/utils/adt/ruleutils.c') diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 4a44b733cf3..f48ee4ae96d 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.292 2008/12/31 00:08:37 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.293 2008/12/31 02:25:04 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1466,6 +1466,8 @@ pg_get_functiondef(PG_FUNCTION_ARGS) /* Emit some miscellaneous options on one line */ oldlen = buf.len; + if (proc->proiswindow) + appendStringInfoString(&buf, " WINDOW"); switch (proc->provolatile) { case PROVOLATILE_IMMUTABLE: -- cgit v1.2.3