diff options
| author | Tom Lane | 2003-04-27 20:09:44 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-04-27 20:09:44 +0000 |
| commit | 982430f8469dfc0fd9d9196862f34a2c3fc7dc13 (patch) | |
| tree | 5f672e30ddd44b4548ba3e18f534fd5008bf3fa8 /src/include | |
| parent | 351372e585746538ef080bfe1219de3f3074a025 (diff) | |
Put back encoding-conversion step in processing of incoming queries;
I had inadvertently omitted it while rearranging things to support
length-counted incoming messages. Also, change the parser's API back
to accepting a 'char *' query string instead of 'StringInfo', as the
latter wasn't buying us anything except overhead. (I think when I put
it in I had some notion of making the parser API 8-bit-clean, but
seeing that flex depends on null-terminated input, that's not really
ever gonna happen.)
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/parser/gramparse.h | 5 | ||||
| -rw-r--r-- | src/include/parser/parser.h | 5 | ||||
| -rw-r--r-- | src/include/pgstat.h | 4 | ||||
| -rw-r--r-- | src/include/tcop/tcopprot.h | 11 |
4 files changed, 11 insertions, 14 deletions
diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h index 97a91093e23..97108f2b1c9 100644 --- a/src/include/parser/gramparse.h +++ b/src/include/parser/gramparse.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: gramparse.h,v 1.25 2002/09/04 20:31:45 momjian Exp $ + * $Id: gramparse.h,v 1.26 2003/04/27 20:09:44 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,7 +15,6 @@ #ifndef GRAMPARSE_H #define GRAMPARSE_H -#include "lib/stringinfo.h" #include "nodes/parsenodes.h" /* from parser.c */ @@ -24,7 +23,7 @@ extern Oid param_type(int t); extern int yylex(void); /* from scan.l */ -extern void scanner_init(StringInfo str); +extern void scanner_init(const char *str); extern void scanner_finish(void); extern int base_yylex(void); extern void yyerror(const char *message); diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h index dfaf50c5cc8..42d82869f08 100644 --- a/src/include/parser/parser.h +++ b/src/include/parser/parser.h @@ -7,16 +7,15 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parser.h,v 1.13 2002/06/20 20:29:52 momjian Exp $ + * $Id: parser.h,v 1.14 2003/04/27 20:09:44 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef PARSER_H #define PARSER_H -#include "lib/stringinfo.h" #include "parser/parse_node.h" -extern List *parser(StringInfo str, Oid *typev, int nargs); +extern List *parser(const char *str, Oid *typev, int nargs); #endif /* PARSER_H */ diff --git a/src/include/pgstat.h b/src/include/pgstat.h index e85f6ec3e91..568cf878e47 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2003, PostgreSQL Global Development Group * - * $Id: pgstat.h,v 1.14 2003/04/26 02:57:14 tgl Exp $ + * $Id: pgstat.h,v 1.15 2003/04/27 20:09:44 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -359,7 +359,7 @@ extern void pgstat_beterm(int pid); extern void pgstat_bestart(void); extern void pgstat_ping(void); -extern void pgstat_report_activity(char *what); +extern void pgstat_report_activity(const char *what); extern void pgstat_report_tabstat(void); extern int pgstat_vacuum_tabstat(void); diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h index 3ac7dac96a9..4235d6d257f 100644 --- a/src/include/tcop/tcopprot.h +++ b/src/include/tcop/tcopprot.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: tcopprot.h,v 1.53 2002/11/15 01:57:28 momjian Exp $ + * $Id: tcopprot.h,v 1.54 2003/04/27 20:09:44 tgl Exp $ * * OLD COMMENTS * This file was created so that other c files could get the two @@ -22,7 +22,6 @@ #include <setjmp.h> #include "executor/execdesc.h" -#include "lib/stringinfo.h" #include "tcop/dest.h" @@ -32,16 +31,16 @@ extern bool InError; extern CommandDest whereToSendOutput; extern bool log_hostname; extern bool LogSourcePort; -extern DLLIMPORT char* debug_query_string; +extern DLLIMPORT const char *debug_query_string; #ifndef BOOTSTRAP_INCLUDE -extern List *pg_parse_query(StringInfo query_string, Oid *typev, int nargs); +extern List *pg_parse_query(const char *query_string, Oid *typev, int nargs); extern List *pg_analyze_and_rewrite(Node *parsetree); -extern List *pg_parse_and_rewrite(char *query_string, +extern List *pg_parse_and_rewrite(const char *query_string, Oid *typev, int nargs); extern Plan *pg_plan_query(Query *querytree); -extern void pg_exec_query_string(StringInfo query_string, +extern void pg_exec_query_string(const char *query_string, CommandDest dest, MemoryContext parse_context); |
