]> granicus.if.org Git - postgresql/commitdiff
- Synced preproc.y with gram.y.
authorMichael Meskes <meskes@postgresql.org>
Tue, 25 Sep 2001 18:37:17 +0000 (18:37 +0000)
committerMichael Meskes <meskes@postgresql.org>
Tue, 25 Sep 2001 18:37:17 +0000 (18:37 +0000)
- Changed locale handling.

src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/preproc/preproc.y

index f6055beb289f334afeacde88ab53ade9dc2248d8..18708efae166d32cbba96febb61af4ede1bec74f 100644 (file)
@@ -1096,5 +1096,10 @@ Wed Sep 19 15:57:49 CEST 2001
        - Synced pgc.l with scan.l.
         - Synced keyword.c.
        - Include the remaining patches by Christof Petig <christof.petig@wtal.de>.
+
+Tue Sep 25 20:10:03 CEST 2001
+
+       - Synced preproc.y with gram.y.
+       - Changed locale handling.
        - Set ecpg version to 2.9.0.
         - Set library version to 3.3.0.
index 30d6645c51f6df4f68e7db08fff435e93ec30f00..40bcfc0c549c77b856fbd77d9a971964d0132e78 100644 (file)
@@ -1,4 +1,4 @@
-/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.23 2001/09/19 14:09:32 meskes Exp $ */
+/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.24 2001/09/25 18:37:17 meskes Exp $ */
 
 /*
  * The aim is to get a simpler inteface to the database routines.
@@ -1007,11 +1007,11 @@ ECPGdo(int lineno, const char *connection_name, char *query,...)
        struct statement *stmt;
        struct connection *con = get_connection(connection_name);
        bool            status = true;
-       char       *locale = setlocale(LC_NUMERIC, NULL);
+       char            *locale;
 
        /* Make sure we do NOT honor the locale for numeric input/output */
-       /* since the database wants teh standard decimal point */
-       setlocale(LC_NUMERIC, "C");
+       /* since the database wants the standard decimal point */
+       locale = setlocale(LC_NUMERIC, "C");
 
        if (!ecpg_init(con, connection_name, lineno))
        {
index b4939adabf2a4df1cfd8437db78367c85e1cfbf3..31a1cb42d4de9625ede555d262bbe6b2cb06c08f 100644 (file)
@@ -2333,6 +2333,10 @@ ExplainStmt:  EXPLAIN opt_verbose OptimizableStmt
                                {
                                        $$ = cat_str(3, make_str("explain"), $2, $3);
                                }
+               | EXPLAIN analyze_keyword opt_verbose OptimizableStmt
+                               {
+                                       $$ = cat_str(4, make_str("explain"), $2, $3, $4);
+                               }
                ;
 
 
@@ -2664,7 +2668,7 @@ OptUseOp:  USING all_Op                           { $$ = cat2_str(make_str("using"), $2); }
                | /*EMPTY*/                     { $$ = EMPTY; }
                ;
 
-select_limit:      LIMIT select_limit_value ',' select_offset_value
+select_limit:      LIMIT select_offset_value ',' select_limit_value
                        { $$ = cat_str(4, make_str("limit"), $2, make_str(","), $4); }
                | LIMIT select_limit_value OFFSET select_offset_value
                        { $$ = cat_str(4, make_str("limit"), $2, make_str("offset"), $4); }