Remove encoding lookups from grammar stage, push them back to places

where it's safe to do database access.  Along the way, fix core dump
for 'DEFAULT' parameters to CREATE DATABASE.  initdb forced due to
change in pg_proc entry.
This commit is contained in:
Tom Lane 2002-11-02 18:41:22 +00:00
parent f6e0130b5b
commit 5123139210
11 changed files with 363 additions and 367 deletions

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/keywords.sgml,v 2.6 2002/06/20 16:00:43 momjian Exp $ --> <!-- $Header: /cvsroot/pgsql/doc/src/sgml/keywords.sgml,v 2.7 2002/11/02 18:41:21 tgl Exp $ -->
<appendix id="sql-keywords-appendix"> <appendix id="sql-keywords-appendix">
<title><acronym>SQL</acronym> Key Words</title> <title><acronym>SQL</acronym> Key Words</title>
@ -682,7 +682,7 @@
</row> </row>
<row> <row>
<entry><token>CONVERT</token></entry> <entry><token>CONVERT</token></entry>
<entry></entry> <entry>non-reserved (cannot be function or type)</entry>
<entry>non-reserved</entry> <entry>non-reserved</entry>
<entry>reserved</entry> <entry>reserved</entry>
</row> </row>

View File

@ -13,7 +13,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.37 2002/11/02 02:33:03 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.38 2002/11/02 18:41:21 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1186,7 +1186,9 @@ makeRangeVarFromNameList(List *names)
/* /*
* NameListToString * NameListToString
* Utility routine to convert a qualified-name list into a string. * Utility routine to convert a qualified-name list into a string.
* Used primarily to form error messages. *
* This is used primarily to form error messages, and so we do not quote
* the list elements, for the sake of legibility.
*/ */
char * char *
NameListToString(List *names) NameListToString(List *names)
@ -1206,6 +1208,31 @@ NameListToString(List *names)
return string.data; return string.data;
} }
/*
* NameListToQuotedString
* Utility routine to convert a qualified-name list into a string.
*
* Same as above except that names will be double-quoted where necessary,
* so the string could be re-parsed (eg, by textToQualifiedNameList).
*/
char *
NameListToQuotedString(List *names)
{
StringInfoData string;
List *l;
initStringInfo(&string);
foreach(l, names)
{
if (l != names)
appendStringInfoChar(&string, '.');
appendStringInfo(&string, "%s", quote_identifier(strVal(lfirst(l))));
}
return string.data;
}
/* /*
* isTempNamespace - is the given namespace my temporary-table namespace? * isTempNamespace - is the given namespace my temporary-table namespace?
*/ */

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_conversion.c,v 1.7 2002/11/02 02:33:03 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_conversion.c,v 1.8 2002/11/02 18:41:21 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -273,38 +273,44 @@ FindConversion(const char *conname, Oid connamespace)
* CONVERT <left paren> <character value expression> * CONVERT <left paren> <character value expression>
* USING <form-of-use conversion name> <right paren> * USING <form-of-use conversion name> <right paren>
* *
* TEXT convert3(TEXT string, OID conversion_oid); * TEXT convert_using(TEXT string, TEXT conversion_name)
*/ */
Datum Datum
pg_convert3(PG_FUNCTION_ARGS) pg_convert_using(PG_FUNCTION_ARGS)
{ {
text *string = PG_GETARG_TEXT_P(0); text *string = PG_GETARG_TEXT_P(0);
Oid convoid = PG_GETARG_OID(1); text *conv_name = PG_GETARG_TEXT_P(1);
text *retval;
List *parsed_name;
Oid convoid;
HeapTuple tuple; HeapTuple tuple;
Form_pg_conversion body; Form_pg_conversion body;
text *retval;
unsigned char *str; unsigned char *str;
unsigned char *result; unsigned char *result;
int len; int len;
if (!OidIsValid(convoid)) /* Convert input string to null-terminated form */
elog(ERROR, "Conversion does not exist");
/* make sure that source string is null terminated */
len = VARSIZE(string) - VARHDRSZ; len = VARSIZE(string) - VARHDRSZ;
str = palloc(len + 1); str = palloc(len + 1);
memcpy(str, VARDATA(string), len); memcpy(str, VARDATA(string), len);
*(str + len) = '\0'; *(str + len) = '\0';
/* Look up the conversion name */
parsed_name = textToQualifiedNameList(conv_name, "convert_using");
convoid = FindConversionByName(parsed_name);
if (!OidIsValid(convoid))
elog(ERROR, "conversion %s not found", NameListToString(parsed_name));
tuple = SearchSysCache(CONOID, tuple = SearchSysCache(CONOID,
ObjectIdGetDatum(convoid), ObjectIdGetDatum(convoid),
0, 0, 0); 0, 0, 0);
if (!HeapTupleIsValid(tuple)) if (!HeapTupleIsValid(tuple))
elog(ERROR, "Conversion %u search from syscache failed", convoid); elog(ERROR, "Conversion %u search from syscache failed", convoid);
body = (Form_pg_conversion) GETSTRUCT(tuple);
/* Temporary result area should be more than big enough */
result = palloc(len * 4 + 1); result = palloc(len * 4 + 1);
body = (Form_pg_conversion) GETSTRUCT(tuple);
OidFunctionCall5(body->conproc, OidFunctionCall5(body->conproc,
Int32GetDatum(body->conforencoding), Int32GetDatum(body->conforencoding),
Int32GetDatum(body->contoencoding), Int32GetDatum(body->contoencoding),
@ -315,7 +321,7 @@ pg_convert3(PG_FUNCTION_ARGS)
ReleaseSysCache(tuple); ReleaseSysCache(tuple);
/* /*
* build text data type structre. we cannot use textin() here, since * build text result structure. we cannot use textin() here, since
* textin assumes that input string encoding is same as database * textin assumes that input string encoding is same as database
* encoding. * encoding.
*/ */
@ -327,8 +333,5 @@ pg_convert3(PG_FUNCTION_ARGS)
pfree(result); pfree(result);
pfree(str); pfree(str);
/* free memory if allocated by the toaster */
PG_FREE_IF_COPY(string, 0);
PG_RETURN_TEXT_P(retval); PG_RETURN_TEXT_P(retval);
} }

View File

@ -9,7 +9,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.106 2002/10/21 22:06:19 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.107 2002/11/02 18:41:21 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -122,14 +122,34 @@ createdb(const CreatedbStmt *stmt)
defel->defname); defel->defname);
} }
if (downer) if (downer && downer->arg)
dbowner = strVal(downer->arg); dbowner = strVal(downer->arg);
if (dpath) if (dpath && dpath->arg)
dbpath = strVal(dpath->arg); dbpath = strVal(dpath->arg);
if (dtemplate) if (dtemplate && dtemplate->arg)
dbtemplate = strVal(dtemplate->arg); dbtemplate = strVal(dtemplate->arg);
if (dencoding) if (dencoding && dencoding->arg)
encoding = intVal(dencoding->arg); {
const char *encoding_name;
if (IsA(dencoding->arg, Integer))
{
encoding = intVal(dencoding->arg);
encoding_name = pg_encoding_to_char(encoding);
if (strcmp(encoding_name, "") == 0 ||
pg_valid_server_encoding(encoding_name) < 0)
elog(ERROR, "%d is not a valid encoding code", encoding);
}
else if (IsA(dencoding->arg, String))
{
encoding_name = strVal(dencoding->arg);
if (pg_valid_server_encoding(encoding_name) < 0)
elog(ERROR, "%s is not a valid encoding name", encoding_name);
encoding = pg_char_to_encoding(encoding_name);
}
else
elog(ERROR, "CREATE DATABASE: bogus encoding parameter");
}
/* obtain sysid of proposed owner */ /* obtain sysid of proposed owner */
if (dbowner) if (dbowner)

View File

@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.372 2002/11/01 22:52:33 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.373 2002/11/02 18:41:21 tgl Exp $
* *
* HISTORY * HISTORY
* AUTHOR DATE MAJOR EVENT * AUTHOR DATE MAJOR EVENT
@ -53,7 +53,6 @@
#include "access/htup.h" #include "access/htup.h"
#include "catalog/index.h" #include "catalog/index.h"
#include "catalog/namespace.h" #include "catalog/namespace.h"
#include "catalog/pg_conversion.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "nodes/makefuncs.h" #include "nodes/makefuncs.h"
#include "nodes/params.h" #include "nodes/params.h"
@ -63,7 +62,6 @@
#include "utils/numeric.h" #include "utils/numeric.h"
#include "utils/datetime.h" #include "utils/datetime.h"
#include "utils/date.h" #include "utils/date.h"
#include "mb/pg_wchar.h"
extern List *parsetree; /* final parse result is delivered here */ extern List *parsetree; /* final parse result is delivered here */
@ -217,8 +215,8 @@ static void doNegateFloat(Value *v);
group_clause TriggerFuncArgs select_limit group_clause TriggerFuncArgs select_limit
opt_select_limit opclass_item_list trans_options opt_select_limit opclass_item_list trans_options
TableFuncElementList TableFuncElementList
convert_args prep_type_clause prep_type_list prep_type_clause prep_type_list
execute_param_clause execute_param_list execute_param_clause
%type <range> into_clause OptTempTableName %type <range> into_clause OptTempTableName
@ -234,7 +232,7 @@ static void doNegateFloat(Value *v);
%type <jtype> join_type %type <jtype> join_type
%type <list> extract_list overlay_list position_list %type <list> extract_list overlay_list position_list
%type <list> substr_list trim_list convert_list %type <list> substr_list trim_list
%type <ival> opt_interval %type <ival> opt_interval
%type <node> overlay_placing substr_from substr_for %type <node> overlay_placing substr_from substr_for
@ -265,7 +263,7 @@ static void doNegateFloat(Value *v);
%type <node> def_arg columnElem where_clause insert_column_item %type <node> def_arg columnElem where_clause insert_column_item
a_expr b_expr c_expr r_expr AexprConst a_expr b_expr c_expr r_expr AexprConst
in_expr having_clause func_table in_expr having_clause func_table
%type <list> row row_descriptor row_list in_expr_nodes type_list %type <list> row row_descriptor type_list
%type <node> case_expr case_arg when_clause case_default %type <node> case_expr case_arg when_clause case_default
%type <list> when_clause_list %type <list> when_clause_list
%type <ival> sub_type %type <ival> sub_type
@ -325,8 +323,8 @@ static void doNegateFloat(Value *v);
AGGREGATE ALL ALTER ANALYSE ANALYZE AND ANY AS ASC AGGREGATE ALL ALTER ANALYSE ANALYZE AND ANY AS ASC
ASSERTION ASSIGNMENT AT AUTHORIZATION ASSERTION ASSIGNMENT AT AUTHORIZATION
BACKWARD BEFORE BEGIN_TRANS BETWEEN BIGINT BINARY BIT BOTH BACKWARD BEFORE BEGIN_TRANS BETWEEN BIGINT BINARY BIT
BOOLEAN BY BOOLEAN BOTH BY
CACHE CALLED CASCADE CASE CAST CHAIN CHAR_P CACHE CALLED CASCADE CASE CAST CHAIN CHAR_P
CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
@ -355,6 +353,7 @@ static void doNegateFloat(Value *v);
INTERVAL INTO INVOKER IS ISNULL ISOLATION INTERVAL INTO INVOKER IS ISNULL ISOLATION
JOIN JOIN
KEY KEY
LANCOMPILER LANGUAGE LEADING LEFT LEVEL LIKE LIMIT LANCOMPILER LANGUAGE LEADING LEFT LEVEL LIKE LIMIT
@ -371,8 +370,7 @@ static void doNegateFloat(Value *v);
ORDER OUT_P OUTER_P OVERLAPS OVERLAY OWNER ORDER OUT_P OUTER_P OVERLAPS OVERLAY OWNER
PARTIAL PASSWORD PATH_P PENDANT PLACING POSITION PARTIAL PASSWORD PATH_P PENDANT PLACING POSITION
PRECISION PREPARE PRIMARY PRIOR PRIVILEGES PROCEDURE PRECISION PREPARE PRIMARY PRIOR PRIVILEGES PROCEDURAL PROCEDURE
PROCEDURAL
READ REAL RECHECK REFERENCES REINDEX RELATIVE RENAME REPLACE READ REAL RECHECK REFERENCES REINDEX RELATIVE RENAME REPLACE
RESET RESTRICT RETURNS REVOKE RIGHT ROLLBACK ROW RESET RESTRICT RETURNS REVOKE RIGHT ROLLBACK ROW
@ -3618,27 +3616,15 @@ createdb_opt_item:
} }
| ENCODING opt_equal Sconst | ENCODING opt_equal Sconst
{ {
int encoding; $$ = makeDefElem("encoding", (Node *)makeString($3));
if (pg_valid_server_encoding($3) < 0)
elog(ERROR, "%s is not a valid encoding name", $3);
encoding = pg_char_to_encoding($3);
$$ = makeDefElem("encoding", (Node *)makeInteger(encoding));
} }
| ENCODING opt_equal Iconst | ENCODING opt_equal Iconst
{ {
const char *encoding_name;
encoding_name = pg_encoding_to_char($3);
if (!strcmp(encoding_name,"") ||
pg_valid_server_encoding(encoding_name) < 0)
elog(ERROR, "%d is not a valid encoding code", $3);
$$ = makeDefElem("encoding", (Node *)makeInteger($3)); $$ = makeDefElem("encoding", (Node *)makeInteger($3));
} }
| ENCODING opt_equal DEFAULT | ENCODING opt_equal DEFAULT
{ {
$$ = makeDefElem("encoding", (Node *)makeInteger(-1)); $$ = makeDefElem("encoding", NULL);
} }
| OWNER opt_equal name | OWNER opt_equal name
{ {
@ -3932,14 +3918,10 @@ ExecuteStmt: EXECUTE name execute_param_clause into_clause
} }
; ;
execute_param_clause: '(' execute_param_list ')' { $$ = $2; } execute_param_clause: '(' expr_list ')' { $$ = $2; }
| /* EMPTY */ { $$ = NIL; } | /* EMPTY */ { $$ = NIL; }
; ;
execute_param_list: a_expr { $$ = makeList1($1); }
| execute_param_list ',' a_expr { $$ = lappend($1, $3); }
;
/***************************************************************************** /*****************************************************************************
* *
* QUERY: * QUERY:
@ -5470,14 +5452,9 @@ row: ROW '(' row_descriptor ')' { $$ = $3; }
| ROW '(' a_expr ')' { $$ = makeList1($3); } | ROW '(' a_expr ')' { $$ = makeList1($3); }
| ROW '(' ')' { $$ = NULL; } | ROW '(' ')' { $$ = NULL; }
| '(' row_descriptor ')' { $$ = $2; } | '(' row_descriptor ')' { $$ = $2; }
;
row_descriptor:
row_list ',' a_expr { $$ = lappend($1, $3); }
; ;
row_list: a_expr { $$ = makeList1($1); } row_descriptor: expr_list ',' a_expr { $$ = lappend($1, $3); }
| row_list ',' a_expr { $$ = lappend($1, $3); }
; ;
sub_type: ANY { $$ = ANY_SUBLINK; } sub_type: ANY { $$ = ANY_SUBLINK; }
@ -6366,7 +6343,21 @@ c_expr: columnref { $$ = (Node *) $1; }
n->agg_distinct = FALSE; n->agg_distinct = FALSE;
$$ = (Node *)n; $$ = (Node *)n;
} }
| CONVERT '(' convert_list ')' | CONVERT '(' a_expr USING any_name ')'
{
FuncCall *n = makeNode(FuncCall);
A_Const *c = makeNode(A_Const);
c->val.type = T_String;
c->val.val.str = NameListToQuotedString($5);
n->funcname = SystemFuncName("convert_using");
n->args = makeList2($3, c);
n->agg_star = FALSE;
n->agg_distinct = FALSE;
$$ = (Node *)n;
}
| CONVERT '(' expr_list ')'
{ {
FuncCall *n = makeNode(FuncCall); FuncCall *n = makeNode(FuncCall);
n->funcname = SystemFuncName("convert"); n->funcname = SystemFuncName("convert");
@ -6422,7 +6413,6 @@ opt_indirection:
expr_list: a_expr { $$ = makeList1($1); } expr_list: a_expr { $$ = makeList1($1); }
| expr_list ',' a_expr { $$ = lappend($1, $3); } | expr_list ',' a_expr { $$ = lappend($1, $3); }
| expr_list USING a_expr { $$ = lappend($1, $3); }
; ;
extract_list: extract_list:
@ -6540,60 +6530,13 @@ trim_list: a_expr FROM expr_list { $$ = lappend($3, $1); }
| expr_list { $$ = $1; } | expr_list { $$ = $1; }
; ;
/* CONVERT() arguments. We accept followings:
* SQL99 syntax
* o CONVERT(TEXT string USING conversion_name)
*
* Function calls
* o CONVERT(TEXT string, NAME src_encoding_name, NAME dest_encoding_name)
* o CONVERT(TEXT string, NAME encoding_name)
*/
convert_list:
a_expr USING any_name
{
Oid oid = FindConversionByName($3);
Const *convoid = makeNode(Const);
if (!OidIsValid(oid))
{
elog(ERROR, "Conversion \"%s\" does not exist",
NameListToString($3));
}
convoid->consttype = OIDOID;
convoid->constlen = sizeof(Oid);
convoid->constvalue = oid;
convoid->constisnull = FALSE;
convoid->constbyval = TRUE;
convoid->constisset = FALSE;
convoid->constiscast = FALSE;
$$ = makeList2($1, convoid);
}
| convert_args
{
$$ = $1;
}
| /*EMPTY*/
{ $$ = NIL; }
;
convert_args: a_expr { $$ = makeList1($1); }
| convert_args ',' a_expr { $$ = lappend($1, $3); }
;
in_expr: select_with_parens in_expr: select_with_parens
{ {
SubLink *n = makeNode(SubLink); SubLink *n = makeNode(SubLink);
n->subselect = $1; n->subselect = $1;
$$ = (Node *)n; $$ = (Node *)n;
} }
| '(' in_expr_nodes ')' { $$ = (Node *)$2; } | '(' expr_list ')' { $$ = (Node *)$2; }
;
in_expr_nodes:
a_expr { $$ = makeList1($1); }
| in_expr_nodes ',' a_expr { $$ = lappend($1, $3); }
; ;
/* Case clause /* Case clause
@ -7215,6 +7158,7 @@ col_name_keyword:
| CHAR_P | CHAR_P
| CHARACTER | CHARACTER
| COALESCE | COALESCE
| CONVERT
| DEC | DEC
| DECIMAL | DECIMAL
| EXISTS | EXISTS

View File

@ -3,9 +3,11 @@
* client encoding and server internal encoding. * client encoding and server internal encoding.
* (currently mule internal code (mic) is used) * (currently mule internal code (mic) is used)
* Tatsuo Ishii * Tatsuo Ishii
* $Id: mbutils.c,v 1.35 2002/09/04 20:31:31 momjian Exp $ *
* $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.36 2002/11/02 18:41:22 tgl Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "access/xact.h" #include "access/xact.h"
#include "miscadmin.h" #include "miscadmin.h"
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
@ -23,19 +25,18 @@ static pg_enc2name *ClientEncoding = &pg_enc2name_tbl[PG_SQL_ASCII];
static pg_enc2name *DatabaseEncoding = &pg_enc2name_tbl[PG_SQL_ASCII]; static pg_enc2name *DatabaseEncoding = &pg_enc2name_tbl[PG_SQL_ASCII];
/* /*
* Caches for conversion function info. Note that Fcinfo.flinfo is * Caches for conversion function info. Note that these values are
* allocated in TopMemoryContext so that it survives outside * allocated in TopMemoryContext so that they survive across
* transactions. See SetClientEncoding() for more details. * transactions. See SetClientEncoding() for more details.
*/ */
static FmgrInfo *ToServerConvPorc = NULL; static FmgrInfo *ToServerConvProc = NULL;
static FmgrInfo *ToClientConvPorc = NULL; static FmgrInfo *ToClientConvProc = NULL;
/* Internal functions */ /* Internal functions */
static unsigned char * static unsigned char *perform_default_encoding_conversion(unsigned char *src,
perform_default_encoding_conversion(unsigned char *src, int len, bool is_client_to_server); int len, bool is_client_to_server);
static int cliplen(const unsigned char *str, int len, int limit);
static int
cliplen(const unsigned char *str, int len, int limit);
/* /*
* Set the client encoding and save fmgrinfo for the converion * Set the client encoding and save fmgrinfo for the converion
@ -95,21 +96,21 @@ SetClientEncoding(int encoding, bool doit)
{ {
ClientEncoding = &pg_enc2name_tbl[encoding]; ClientEncoding = &pg_enc2name_tbl[encoding];
if (ToServerConvPorc != NULL) if (ToServerConvProc != NULL)
{ {
if (ToServerConvPorc->fn_extra) if (ToServerConvProc->fn_extra)
pfree(ToServerConvPorc->fn_extra); pfree(ToServerConvProc->fn_extra);
pfree(ToServerConvPorc); pfree(ToServerConvProc);
} }
ToServerConvPorc = to_server; ToServerConvProc = to_server;
if (ToClientConvPorc != NULL) if (ToClientConvProc != NULL)
{ {
if (ToClientConvPorc->fn_extra) if (ToClientConvProc->fn_extra)
pfree(ToClientConvPorc->fn_extra); pfree(ToClientConvProc->fn_extra);
pfree(ToClientConvPorc); pfree(ToClientConvProc);
} }
ToClientConvPorc = to_client; ToClientConvProc = to_client;
} }
return 0; return 0;
} }
@ -323,13 +324,13 @@ perform_default_encoding_conversion(unsigned char *src, int len, bool is_client_
{ {
src_encoding = ClientEncoding->encoding; src_encoding = ClientEncoding->encoding;
dest_encoding = DatabaseEncoding->encoding; dest_encoding = DatabaseEncoding->encoding;
flinfo = ToServerConvPorc; flinfo = ToServerConvProc;
} }
else else
{ {
src_encoding = DatabaseEncoding->encoding; src_encoding = DatabaseEncoding->encoding;
dest_encoding = ClientEncoding->encoding; dest_encoding = ClientEncoding->encoding;
flinfo = ToClientConvPorc; flinfo = ToClientConvProc;
} }
if (flinfo == NULL) if (flinfo == NULL)

View File

@ -37,7 +37,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: catversion.h,v 1.162 2002/10/19 02:08:18 momjian Exp $ * $Id: catversion.h,v 1.163 2002/11/02 18:41:22 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -53,6 +53,6 @@
*/ */
/* yyyymmddN */ /* yyyymmddN */
#define CATALOG_VERSION_NO 200210181 #define CATALOG_VERSION_NO 200211021
#endif #endif

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: namespace.h,v 1.21 2002/09/23 20:43:41 tgl Exp $ * $Id: namespace.h,v 1.22 2002/11/02 18:41:22 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -74,6 +74,7 @@ extern Oid LookupExplicitNamespace(const char *nspname);
extern Oid QualifiedNameGetCreationNamespace(List *names, char **objname_p); extern Oid QualifiedNameGetCreationNamespace(List *names, char **objname_p);
extern RangeVar *makeRangeVarFromNameList(List *names); extern RangeVar *makeRangeVarFromNameList(List *names);
extern char *NameListToString(List *names); extern char *NameListToString(List *names);
extern char *NameListToQuotedString(List *names);
extern bool isTempNamespace(Oid namespaceId); extern bool isTempNamespace(Oid namespaceId);
extern bool isOtherTempNamespace(Oid namespaceId); extern bool isOtherTempNamespace(Oid namespaceId);

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_proc.h,v 1.274 2002/10/19 02:08:18 momjian Exp $ * $Id: pg_proc.h,v 1.275 2002/11/02 18:41:22 tgl Exp $
* *
* NOTES * NOTES
* The script catalog/genbki.sh reads this file and generates .bki * The script catalog/genbki.sh reads this file and generates .bki
@ -2166,8 +2166,8 @@ DESCR("convert string with specified destination encoding name");
DATA(insert OID = 1813 ( convert PGNSP PGUID 12 f f t f s 3 25 "25 19 19" pg_convert2 - _null_ )); DATA(insert OID = 1813 ( convert PGNSP PGUID 12 f f t f s 3 25 "25 19 19" pg_convert2 - _null_ ));
DESCR("convert string with specified encoding names"); DESCR("convert string with specified encoding names");
DATA(insert OID = 90 ( convert PGNSP PGUID 12 f f t f s 2 25 "25 26" pg_convert3 - _null_ )); DATA(insert OID = 1619 ( convert_using PGNSP PGUID 12 f f t f s 2 25 "25 25" pg_convert_using - _null_ ));
DESCR("convert string with specified conversion oid"); DESCR("convert string with specified conversion name");
DATA(insert OID = 1264 ( pg_char_to_encoding PGNSP PGUID 12 f f t f s 1 23 "19" PG_char_to_encoding - _null_ )); DATA(insert OID = 1264 ( pg_char_to_encoding PGNSP PGUID 12 f f t f s 1 23 "19" PG_char_to_encoding - _null_ ));
DESCR("convert encoding name to encoding id"); DESCR("convert encoding name to encoding id");

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: builtins.h,v 1.203 2002/10/19 02:08:18 momjian Exp $ * $Id: builtins.h,v 1.204 2002/11/02 18:41:22 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -696,6 +696,6 @@ extern Datum show_all_settings(PG_FUNCTION_ARGS);
extern Datum pg_lock_status(PG_FUNCTION_ARGS); extern Datum pg_lock_status(PG_FUNCTION_ARGS);
/* catalog/pg_conversion.c */ /* catalog/pg_conversion.c */
extern Datum pg_convert3(PG_FUNCTION_ARGS); extern Datum pg_convert_using(PG_FUNCTION_ARGS);
#endif /* BUILTINS_H */ #endif /* BUILTINS_H */

File diff suppressed because it is too large Load Diff