Make PROCEDURAL optional in CREATE/DROP LANGUAGE.
authorBruce Momjian
Sat, 4 Nov 2000 21:04:56 +0000 (21:04 +0000)
committerBruce Momjian
Sat, 4 Nov 2000 21:04:56 +0000 (21:04 +0000)
doc/src/sgml/ref/create_language.sgml
doc/src/sgml/ref/drop_language.sgml
src/backend/parser/gram.y
src/tools/pgcvslog

index bab3aa4797e3a501d9639a353189195341f6d78e..934b6cbaf9e139b96a6e5edce44e0be34b2ef0e3 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ Postgres documentation
    1999-07-20
   
   
-CREATE [ TRUSTED ] PROCEDURAL LANGUAGE 'langname'
+CREATE [ TRUSTED ] [ PROCEDURAL ] LANGUAGE 'langname'
     HANDLER call_handler
     LANCOMPILER 'comment'
   
index a0764724d084df16774e9922d82389523876bf8d..eedbc25ef9d456401bdd4151ea6b31d8151cd196 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ Postgres documentation
    1999-07-20
   
   
-DROP PROCEDURAL LANGUAGE 'name'
+DROP [ PROCEDURAL ] LANGUAGE 'name'
   
   
   
index ece0493acf9ee4fff9ba78ce2cace0285b5ba753..f6859429f2ac5e9ec56b85c51a384aacc9ba411f 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.202 2000/10/31 10:22:10 petere Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.203 2000/11/04 21:04:55 momjian Exp $
  *
  * HISTORY
  *   AUTHOR            DATE            MAJOR EVENT
@@ -154,7 +154,7 @@ static void doNegateFloat(Value *v);
 %type         user_valid_clause
 %type    user_list, user_group_clause, users_in_new_group_clause
 
-%type     TriggerActionTime, TriggerForSpec, PLangTrusted
+%type     TriggerActionTime, TriggerForSpec, PLangTrusted, opt_procedural
 
 %type         OptConstrFromTable
 
@@ -1654,7 +1654,7 @@ IntegerOnly:  Iconst
  *
  *****************************************************************************/
 
-CreatePLangStmt:  CREATE PLangTrusted PROCEDURAL LANGUAGE Sconst 
+CreatePLangStmt:  CREATE PLangTrusted opt_procedural LANGUAGE Sconst 
            HANDLER def_name LANCOMPILER Sconst
            {
                CreatePLangStmt *n = makeNode(CreatePLangStmt);
@@ -1668,8 +1668,9 @@ CreatePLangStmt:  CREATE PLangTrusted PROCEDURAL LANGUAGE Sconst
 
 PLangTrusted:  TRUSTED         { $$ = TRUE; }
            | /*EMPTY*/         { $$ = FALSE; }
+       ;
 
-DropPLangStmt:  DROP PROCEDURAL LANGUAGE Sconst
+DropPLangStmt:  DROP opt_procedural LANGUAGE Sconst
            {
                DropPLangStmt *n = makeNode(DropPLangStmt);
                n->plname = $4;
@@ -1677,6 +1678,10 @@ DropPLangStmt:  DROP PROCEDURAL LANGUAGE Sconst
            }
        ;
 
+opt_procedural: PROCEDURAL     { $$ = TRUE; }
+           | /*EMPTY*/         { $$ = TRUE; }
+       ;
+       
 /*****************************************************************************
  *
  *     QUERIES :
index 12dd490f20aa43edd0e7257983ea2e6340c4cd2d..f40f2c6d645f0b6b43a5346afe1d41c239f24bc7 100755 (executable)
@@ -8,8 +8,10 @@
 # cvs log -d '>1999-06-14 00:00:00 GMT' . > log
 #
 # pre and post-branch logs:
+# find . -name CVS -type d -exec touch '{}/Entries.Static' \;
 # cvs log -d'2000-05-08 00:00:00 GMT<2000-05-29 00:00:00 GMT'
 # cvs log -d'>2000-05-29 00:00:00 GMT' -rREL7_0_PATCHES
+# find . -name CVS -type d -exec rm '{}/Entries.Static' \;
 #
 
 cat "$@" |
@@ -18,7 +20,7 @@ cat "$@" |
 # we don't print anything from the -- or == line and the date:
 
 awk '
-   $0 ~ /^Working file:/   {workingfile = $0}
+   $0 ~ /^Working file:/   {workingfile = "/" $3}
 
    ($0 ~ /^====*$/ || $0 ~ /^----*$/) && skip == "N" \
    {
@@ -27,7 +29,7 @@ awk '
        {
            printf ("%s| %10d|%s\n", datetime, NR, "");
            printf ("%s| %10d|%s\n", datetime, NR, "---");
-           printf ("%s| %10d|%s\n", datetime, NR+1, "");
+/*         printf ("%s| %10d|%s\n", datetime, NR+1, "");*/
        }
    }
 
@@ -46,6 +48,8 @@ awk '
        datetime=$2"-"$3
        if (workingfile != "" && skip == "N")
        {
+           gsub(";", "", $5);
+           printf ("%s| %10d|  %70s\n", datetime, NR-2, $5);
            printf ("%s| %10d|%s\n", datetime, NR-1, workingfile);
            printf ("%s| %10d|%s\n", datetime, NR, $0);
            printf ("%s| %10d|%s\n", datetime, NR+1, "");
@@ -59,7 +63,7 @@ sort | cut -d'|' -f3 | cat |
 # collect duplicate narratives
 awk '  BEGIN   { slot = 0;}
    {
-       if ($0 ~ /^Working file:/)
+       if ($0 ~ /^\//)
        {
            if (slot != oldslot)
                same = 0;