*** postgresql-7.0.2/src/backend/parser/parse_type.c.orig Wed Jan 26 14:56:42 2000 --- postgresql-7.0.2/src/backend/parser/parse_type.c Wed Oct 25 23:02:11 2000 *************** *** 48,54 **** return NULL; } typetuple = (Form_pg_type) GETSTRUCT(tup); ! return NameStr(typetuple->typname); } /* return a Type structure, given a type id */ --- 48,55 ---- return NULL; } typetuple = (Form_pg_type) GETSTRUCT(tup); ! /* pstrdup here because result may need to outlive the syscache entry */ ! return pstrdup(NameStr(typetuple->typname)); } /* return a Type structure, given a type id */ *************** *** 119,125 **** Form_pg_type typ; typ = (Form_pg_type) GETSTRUCT(t); ! return NameStr(typ->typname); } /* given a type, return its typetype ('c' for 'c'atalog types) */ --- 120,127 ---- Form_pg_type typ; typ = (Form_pg_type) GETSTRUCT(t); ! /* pstrdup here because result may need to outlive the syscache entry */ ! return pstrdup(NameStr(typ->typname)); } /* given a type, return its typetype ('c' for 'c'atalog types) */ *** postgresql-7.0.2/src/backend/parser/analyze.c.orig Thu Apr 13 02:15:26 2000 --- postgresql-7.0.2/src/backend/parser/analyze.c Wed Oct 25 23:02:11 2000 *************** *** 28,33 **** --- 28,37 ---- #include "utils/builtins.h" #include "utils/numeric.h" + #ifdef MULTIBYTE + #include "mb/pg_wchar.h" + #endif + void CheckSelectForUpdate(Query *qry); /* no points for style... */ static Query *transformStmt(ParseState *pstate, Node *stmt); *************** *** 533,538 **** --- 537,549 ---- else name2chars--; } + + #ifdef MULTIBYTE + if (name1) + name1chars = pg_mbcliplen(name1, name1chars, name1chars); + if (name2) + name2chars = pg_mbcliplen(name2, name2chars, name2chars); + #endif /* Now construct the string using the chosen lengths */ name = palloc(name1chars + name2chars + overhead + 1); *** postgresql-7.0.2/src/backend/parser/scan.l.orig Fri Jun 2 10:19:18 2000 --- postgresql-7.0.2/src/backend/parser/scan.l Wed Oct 25 23:02:11 2000 *************** *** 31,36 **** --- 31,40 ---- #include "parser/scansup.h" #include "utils/builtins.h" + #ifdef MULTIBYTE + #include "mb/pg_wchar.h" + #endif + extern char *parseString; static char *parseCh; *************** *** 328,336 **** --- 332,348 ---- BEGIN(INITIAL); if (strlen(literalbuf) >= NAMEDATALEN) { + #ifdef MULTIBYTE + int len; + len = pg_mbcliplen(literalbuf,strlen(literalbuf),NAMEDATALEN-1); + elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", + literalbuf, len, literalbuf); + literalbuf[len] = '\0'; + #else elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", literalbuf, NAMEDATALEN-1, literalbuf); literalbuf[NAMEDATALEN-1] = '\0'; + #endif } yylval.str = pstrdup(literalbuf); return IDENT; *************** *** 451,459 **** --- 463,479 ---- yytext[i] = tolower(yytext[i]); if (i >= NAMEDATALEN) { + #ifdef MULTIBYTE + int len; + len = pg_mbcliplen(yytext,i,NAMEDATALEN-1); + elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", + yytext, len, yytext); + yytext[len] = '\0'; + #else elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", yytext, NAMEDATALEN-1, yytext); yytext[NAMEDATALEN-1] = '\0'; + #endif } keyword = ScanKeywordLookup((char*)yytext); if (keyword != NULL) { *** postgresql-7.0.2/src/backend/parser/scan.c.orig Tue Jun 6 03:16:18 2000 --- postgresql-7.0.2/src/backend/parser/scan.c Wed Oct 25 23:02:11 2000 *************** *** 2,8 **** /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ */ #define FLEX_SCANNER --- 2,7 ---- *************** *** 568,573 **** --- 567,576 ---- #include "parser/scansup.h" #include "utils/builtins.h" + #ifdef MULTIBYTE + #include "mb/pg_wchar.h" + #endif + extern char *parseString; static char *parseCh; *************** *** 719,725 **** * Note that xcstart must appear before operator, as explained above! * Also whitespace (comment) must appear before operator. */ ! #line 723 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. --- 722,728 ---- * Note that xcstart must appear before operator, as explained above! * Also whitespace (comment) must appear before operator. */ ! #line 726 "lex.yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. *************** *** 870,878 **** register char *yy_cp, *yy_bp; register int yy_act; ! #line 246 "scan.l" ! #line 876 "lex.yy.c" if ( yy_init ) { --- 873,881 ---- register char *yy_cp, *yy_bp; register int yy_act; ! #line 250 "scan.l" ! #line 879 "lex.yy.c" if ( yy_init ) { *************** *** 957,968 **** case 1: YY_RULE_SETUP ! #line 247 "scan.l" { /* ignore */ } YY_BREAK case 2: YY_RULE_SETUP ! #line 249 "scan.l" { BEGIN(xc); /* Put back any characters past slash-star; see above */ --- 960,971 ---- case 1: YY_RULE_SETUP ! #line 251 "scan.l" { /* ignore */ } YY_BREAK case 2: YY_RULE_SETUP ! #line 253 "scan.l" { BEGIN(xc); /* Put back any characters past slash-star; see above */ *************** *** 971,991 **** YY_BREAK case 3: YY_RULE_SETUP ! #line 255 "scan.l" { BEGIN(INITIAL); } YY_BREAK case 4: YY_RULE_SETUP ! #line 257 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xc): ! #line 259 "scan.l" { elog(ERROR, "Unterminated /* comment"); } YY_BREAK case 5: YY_RULE_SETUP ! #line 261 "scan.l" { BEGIN(xb); startlit(); --- 974,994 ---- YY_BREAK case 3: YY_RULE_SETUP ! #line 259 "scan.l" { BEGIN(INITIAL); } YY_BREAK case 4: YY_RULE_SETUP ! #line 261 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xc): ! #line 263 "scan.l" { elog(ERROR, "Unterminated /* comment"); } YY_BREAK case 5: YY_RULE_SETUP ! #line 265 "scan.l" { BEGIN(xb); startlit(); *************** *** 993,999 **** YY_BREAK case 6: YY_RULE_SETUP ! #line 265 "scan.l" { char* endptr; --- 996,1002 ---- YY_BREAK case 6: YY_RULE_SETUP ! #line 269 "scan.l" { char* endptr; *************** *** 1007,1036 **** } YY_BREAK case 7: ! #line 277 "scan.l" case 8: YY_RULE_SETUP ! #line 277 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case 9: ! #line 281 "scan.l" case 10: YY_RULE_SETUP ! #line 281 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xb): ! #line 284 "scan.l" { elog(ERROR, "Unterminated binary integer"); } YY_BREAK case 11: YY_RULE_SETUP ! #line 286 "scan.l" { BEGIN(xh); startlit(); --- 1010,1039 ---- } YY_BREAK case 7: ! #line 281 "scan.l" case 8: YY_RULE_SETUP ! #line 281 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case 9: ! #line 285 "scan.l" case 10: YY_RULE_SETUP ! #line 285 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xb): ! #line 288 "scan.l" { elog(ERROR, "Unterminated binary integer"); } YY_BREAK case 11: YY_RULE_SETUP ! #line 290 "scan.l" { BEGIN(xh); startlit(); *************** *** 1038,1044 **** YY_BREAK case 12: YY_RULE_SETUP ! #line 290 "scan.l" { char* endptr; --- 1041,1047 ---- YY_BREAK case 12: YY_RULE_SETUP ! #line 294 "scan.l" { char* endptr; *************** *** 1052,1063 **** } YY_BREAK case YY_STATE_EOF(xh): ! #line 301 "scan.l" { elog(ERROR, "Unterminated hexadecimal integer"); } YY_BREAK case 13: YY_RULE_SETUP ! #line 303 "scan.l" { BEGIN(xq); startlit(); --- 1055,1066 ---- } YY_BREAK case YY_STATE_EOF(xh): ! #line 305 "scan.l" { elog(ERROR, "Unterminated hexadecimal integer"); } YY_BREAK case 13: YY_RULE_SETUP ! #line 307 "scan.l" { BEGIN(xq); startlit(); *************** *** 1065,1071 **** YY_BREAK case 14: YY_RULE_SETUP ! #line 307 "scan.l" { BEGIN(INITIAL); yylval.str = scanstr(literalbuf); --- 1068,1074 ---- YY_BREAK case 14: YY_RULE_SETUP ! #line 311 "scan.l" { BEGIN(INITIAL); yylval.str = scanstr(literalbuf); *************** *** 1073,1102 **** } YY_BREAK case 15: ! #line 313 "scan.l" case 16: ! #line 314 "scan.l" case 17: YY_RULE_SETUP ! #line 314 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case 18: YY_RULE_SETUP ! #line 317 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xq): ! #line 320 "scan.l" { elog(ERROR, "Unterminated quoted string"); } YY_BREAK case 19: YY_RULE_SETUP ! #line 323 "scan.l" { BEGIN(xd); startlit(); --- 1076,1105 ---- } YY_BREAK case 15: ! #line 317 "scan.l" case 16: ! #line 318 "scan.l" case 17: YY_RULE_SETUP ! #line 318 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case 18: YY_RULE_SETUP ! #line 321 "scan.l" { /* ignore */ } YY_BREAK case YY_STATE_EOF(xq): ! #line 324 "scan.l" { elog(ERROR, "Unterminated quoted string"); } YY_BREAK case 19: YY_RULE_SETUP ! #line 327 "scan.l" { BEGIN(xd); startlit(); *************** *** 1104,1117 **** YY_BREAK case 20: YY_RULE_SETUP ! #line 327 "scan.l" { BEGIN(INITIAL); if (strlen(literalbuf) >= NAMEDATALEN) { elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", literalbuf, NAMEDATALEN-1, literalbuf); literalbuf[NAMEDATALEN-1] = '\0'; } yylval.str = pstrdup(literalbuf); return IDENT; --- 1107,1128 ---- YY_BREAK case 20: YY_RULE_SETUP ! #line 331 "scan.l" { BEGIN(INITIAL); if (strlen(literalbuf) >= NAMEDATALEN) { + #ifdef MULTIBYTE + int len; + len = pg_mbcliplen(literalbuf,strlen(literalbuf),NAMEDATALEN-1); + elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", + literalbuf, len, literalbuf); + literalbuf[len] = '\0'; + #else elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", literalbuf, NAMEDATALEN-1, literalbuf); literalbuf[NAMEDATALEN-1] = '\0'; + #endif } yylval.str = pstrdup(literalbuf); return IDENT; *************** *** 1119,1146 **** YY_BREAK case 21: YY_RULE_SETUP ! #line 338 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case YY_STATE_EOF(xd): ! #line 341 "scan.l" { elog(ERROR, "Unterminated quoted identifier"); } YY_BREAK case 22: YY_RULE_SETUP ! #line 343 "scan.l" { return TYPECAST; } YY_BREAK case 23: YY_RULE_SETUP ! #line 345 "scan.l" { return yytext[0]; } YY_BREAK case 24: YY_RULE_SETUP ! #line 347 "scan.l" { /* * Check for embedded slash-star or dash-dash; those --- 1130,1157 ---- YY_BREAK case 21: YY_RULE_SETUP ! #line 350 "scan.l" { addlit(yytext, yyleng); } YY_BREAK case YY_STATE_EOF(xd): ! #line 353 "scan.l" { elog(ERROR, "Unterminated quoted identifier"); } YY_BREAK case 22: YY_RULE_SETUP ! #line 355 "scan.l" { return TYPECAST; } YY_BREAK case 23: YY_RULE_SETUP ! #line 357 "scan.l" { return yytext[0]; } YY_BREAK case 24: YY_RULE_SETUP ! #line 359 "scan.l" { /* * Check for embedded slash-star or dash-dash; those *************** *** 1212,1218 **** YY_BREAK case 25: YY_RULE_SETUP ! #line 416 "scan.l" { yylval.ival = atol((char*)&yytext[1]); return PARAM; --- 1223,1229 ---- YY_BREAK case 25: YY_RULE_SETUP ! #line 428 "scan.l" { yylval.ival = atol((char*)&yytext[1]); return PARAM; *************** *** 1220,1226 **** YY_BREAK case 26: YY_RULE_SETUP ! #line 421 "scan.l" { char* endptr; --- 1231,1237 ---- YY_BREAK case 26: YY_RULE_SETUP ! #line 433 "scan.l" { char* endptr; *************** *** 1237,1243 **** YY_BREAK case 27: YY_RULE_SETUP ! #line 434 "scan.l" { yylval.str = pstrdup((char*)yytext); return FCONST; --- 1248,1254 ---- YY_BREAK case 27: YY_RULE_SETUP ! #line 446 "scan.l" { yylval.str = pstrdup((char*)yytext); return FCONST; *************** *** 1245,1251 **** YY_BREAK case 28: YY_RULE_SETUP ! #line 438 "scan.l" { yylval.str = pstrdup((char*)yytext); return FCONST; --- 1256,1262 ---- YY_BREAK case 28: YY_RULE_SETUP ! #line 450 "scan.l" { yylval.str = pstrdup((char*)yytext); return FCONST; *************** *** 1253,1259 **** YY_BREAK case 29: YY_RULE_SETUP ! #line 444 "scan.l" { int i; ScanKeyword *keyword; --- 1264,1270 ---- YY_BREAK case 29: YY_RULE_SETUP ! #line 456 "scan.l" { int i; ScanKeyword *keyword; *************** *** 1264,1272 **** --- 1275,1291 ---- yytext[i] = tolower(yytext[i]); if (i >= NAMEDATALEN) { + #ifdef MULTIBYTE + int len; + len = pg_mbcliplen(yytext,i,NAMEDATALEN-1); + elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", + yytext, len, yytext); + yytext[len] = '\0'; + #else elog(NOTICE, "identifier \"%s\" will be truncated to \"%.*s\"", yytext, NAMEDATALEN-1, yytext); yytext[NAMEDATALEN-1] = '\0'; + #endif } keyword = ScanKeywordLookup((char*)yytext); if (keyword != NULL) { *************** *** 1281,1295 **** YY_BREAK case 30: YY_RULE_SETUP ! #line 469 "scan.l" { return yytext[0]; } YY_BREAK case 31: YY_RULE_SETUP ! #line 471 "scan.l" ECHO; YY_BREAK ! #line 1293 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); --- 1300,1314 ---- YY_BREAK case 30: YY_RULE_SETUP ! #line 489 "scan.l" { return yytext[0]; } YY_BREAK case 31: YY_RULE_SETUP ! #line 491 "scan.l" ECHO; YY_BREAK ! #line 1312 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); *************** *** 2175,2181 **** return 0; } #endif ! #line 471 "scan.l" void yyerror(const char * message) --- 2194,2200 ---- return 0; } #endif ! #line 491 "scan.l" void yyerror(const char * message) *** postgresql-7.0.2/src/backend/storage/large_object/inv_api.c.orig Thu Apr 13 02:15:37 2000 --- postgresql-7.0.2/src/backend/storage/large_object/inv_api.c Wed Oct 25 23:02:11 2000 *************** *** 185,190 **** --- 185,191 ---- retval->idesc = RelationGetDescr(indr); retval->offset = retval->lowbyte = retval->highbyte = 0; ItemPointerSetInvalid(&(retval->htid)); + retval->flags = 0; if (flags & INV_WRITE) { *************** *** 233,238 **** --- 234,240 ---- retval->idesc = RelationGetDescr(indrel); retval->offset = retval->lowbyte = retval->highbyte = 0; ItemPointerSetInvalid(&(retval->htid)); + retval->flags = 0; if (flags & INV_WRITE) { *************** *** 371,384 **** if (whence == SEEK_CUR) { offset += obj_desc->offset; /* calculate absolute position */ - return inv_seek(obj_desc, offset, SEEK_SET); } ! ! /* ! * if you seek past the end (offset > 0) I have no clue what happens ! * :-( B.L. 9/1/93 ! */ ! if (whence == SEEK_END) { /* need read lock for getsize */ if (!(obj_desc->flags & IFS_RDLOCK)) --- 373,380 ---- if (whence == SEEK_CUR) { offset += obj_desc->offset; /* calculate absolute position */ } ! else if (whence == SEEK_END) { /* need read lock for getsize */ if (!(obj_desc->flags & IFS_RDLOCK)) *************** *** 389,396 **** offset += _inv_getsize(obj_desc->heap_r, obj_desc->hdesc, obj_desc->index_r); - return inv_seek(obj_desc, offset, SEEK_SET); } /* * Whenever we do a seek, we turn off the EOF flag bit to force --- 385,392 ---- offset += _inv_getsize(obj_desc->heap_r, obj_desc->hdesc, obj_desc->index_r); } + /* now we can assume that the operation is SEEK_SET */ /* * Whenever we do a seek, we turn off the EOF flag bit to force *************** *** 414,422 **** * stores the offset of the last byte that appears on it, and we have * an index on this. */ - - - /* right now, just assume that the operation is SEEK_SET */ if (obj_desc->iscan != (IndexScanDesc) NULL) { d = Int32GetDatum(offset); --- 410,415 ---- *************** *** 424,430 **** } else { - ScanKeyEntryInitialize(&skey, 0x0, 1, F_INT4GE, Int32GetDatum(offset)); --- 417,422 ---- *************** *** 487,495 **** /* copy the data from this block into the buffer */ d = heap_getattr(&tuple, 2, obj_desc->hdesc, &isNull); ReleaseBuffer(buffer); ! fsblock = (struct varlena *) DatumGetPointer(d); off = obj_desc->offset - obj_desc->lowbyte; ncopy = obj_desc->highbyte - obj_desc->offset + 1; --- 479,505 ---- /* copy the data from this block into the buffer */ d = heap_getattr(&tuple, 2, obj_desc->hdesc, &isNull); + fsblock = (struct varlena *) DatumGetPointer(d); ReleaseBuffer(buffer); ! /* ! * If block starts beyond current seek point, then we are looking ! * at a "hole" (unwritten area) in the object. Return zeroes for ! * the "hole". ! */ ! if (obj_desc->offset < obj_desc->lowbyte) ! { ! int nzeroes = obj_desc->lowbyte - obj_desc->offset; ! ! if (nzeroes > (nbytes - nread)) ! nzeroes = (nbytes - nread); ! MemSet(buf, 0, nzeroes); ! buf += nzeroes; ! nread += nzeroes; ! obj_desc->offset += nzeroes; ! if (nread >= nbytes) ! break; ! } off = obj_desc->offset - obj_desc->lowbyte; ncopy = obj_desc->highbyte - obj_desc->offset + 1; *************** *** 535,548 **** Buffer buffer; /* ! * Fetch the current inversion file system block. If the class ! * storing the inversion file is empty, we don't want to do an ! * index lookup, since index lookups choke on empty files (should ! * be fixed someday). */ ! if ((obj_desc->flags & IFS_ATEOF) ! || obj_desc->heap_r->rd_nblocks == 0) tuple.t_data = NULL; else inv_fetchtup(obj_desc, &tuple, &buffer); --- 545,555 ---- Buffer buffer; /* ! * Fetch the current inversion file system block. We can skip ! * the work if we already know we are at EOF. */ ! if (obj_desc->flags & IFS_ATEOF) tuple.t_data = NULL; else inv_fetchtup(obj_desc, &tuple, &buffer); *** postgresql-7.0.2/src/backend/tcop/postgres.c.orig Sun May 21 11:23:30 2000 --- postgresql-7.0.2/src/backend/tcop/postgres.c Wed Oct 25 23:02:12 2000 *************** *** 1459,1465 **** * Initialize the deferred trigger manager */ if (DeferredTriggerInit() != 0) ! proc_exit(0); SetProcessingMode(NormalProcessing); --- 1459,1465 ---- * Initialize the deferred trigger manager */ if (DeferredTriggerInit() != 0) ! goto normalexit; SetProcessingMode(NormalProcessing); *************** *** 1479,1490 **** TPRINTF(TRACE_VERBOSE, "AbortCurrentTransaction"); AbortCurrentTransaction(); ! InError = false; if (ExitAfterAbort) ! { ! ProcReleaseLocks(); /* Just to be sure... */ ! proc_exit(0); ! } } Warn_restart_ready = true; /* we can now handle elog(ERROR) */ --- 1479,1489 ---- TPRINTF(TRACE_VERBOSE, "AbortCurrentTransaction"); AbortCurrentTransaction(); ! if (ExitAfterAbort) ! goto errorexit; ! ! InError = false; } Warn_restart_ready = true; /* we can now handle elog(ERROR) */ *************** *** 1553,1560 **** if (HandleFunctionRequest() == EOF) { /* lost frontend connection during F message input */ ! pq_close(); ! proc_exit(0); } break; --- 1552,1558 ---- if (HandleFunctionRequest() == EOF) { /* lost frontend connection during F message input */ ! goto normalexit; } break; *************** *** 1608,1618 **** */ case 'X': case EOF: ! if (!IsUnderPostmaster) ! ShutdownXLOG(); ! pq_close(); ! proc_exit(0); ! break; default: elog(ERROR, "unknown frontend message was received"); --- 1606,1612 ---- */ case 'X': case EOF: ! goto normalexit; default: elog(ERROR, "unknown frontend message was received"); *************** *** 1642,1651 **** if (IsUnderPostmaster) NullCommand(Remote); } ! } /* infinite for-loop */ ! proc_exit(0); /* shouldn't get here... */ ! return 1; } #ifndef HAVE_GETRUSAGE --- 1636,1655 ---- if (IsUnderPostmaster) NullCommand(Remote); } ! } /* end of main loop */ ! ! normalexit: ! ExitAfterAbort = true; /* ensure we will exit if elog during abort */ ! AbortOutOfAnyTransaction(); ! if (!IsUnderPostmaster) ! ShutdownXLOG(); ! ! errorexit: ! pq_close(); ! ProcReleaseLocks(); /* Just to be sure... */ ! proc_exit(0); ! return 1; /* keep compiler quiet */ } #ifndef HAVE_GETRUSAGE *** postgresql-7.0.2/src/backend/utils/adt/formatting.c.orig Thu Apr 13 02:15:49 2000 --- postgresql-7.0.2/src/backend/utils/adt/formatting.c Wed Oct 25 23:02:12 2000 *************** *** 3948,3953 **** --- 3948,3956 ---- *p; Numeric x = NULL; + if (!value) + return textin(""); + NUM_TOCHAR_prepare; /* ---------- *************** *** 4031,4037 **** plen = 0, sign = 0; char *numstr, ! *orgnum; NUM_TOCHAR_prepare; --- 4034,4040 ---- plen = 0, sign = 0; char *numstr, ! *orgnum; NUM_TOCHAR_prepare; *************** *** 4112,4117 **** --- 4115,4123 ---- char *numstr, *orgnum; + if (!value) + return textin(""); + NUM_TOCHAR_prepare; /* ---------- *************** *** 4194,4199 **** --- 4200,4208 ---- *orgnum, *p; + if (!value) + return textin(""); + NUM_TOCHAR_prepare; if (IS_ROMAN(&Num)) *************** *** 4271,4276 **** --- 4280,4288 ---- char *numstr, *orgnum, *p; + + if (!value) + return textin(""); NUM_TOCHAR_prepare; *** postgresql-7.0.2/src/backend/utils/cache/fcache.c.orig Thu Apr 13 02:15:53 2000 --- postgresql-7.0.2/src/backend/utils/cache/fcache.c Wed Oct 25 23:02:11 2000 *************** *** 14,19 **** --- 14,20 ---- */ #include "postgres.h" + #include "access/heapam.h" #include "catalog/pg_language.h" #include "catalog/pg_proc.h" #include "catalog/pg_type.h" *************** *** 89,97 **** if (!use_syscache) elog(ERROR, "what the ????, init the fcache without the catalogs?"); ! procedureTuple = SearchSysCacheTuple(PROCOID, ! ObjectIdGetDatum(foid), ! 0, 0, 0); if (!HeapTupleIsValid(procedureTuple)) elog(ERROR, "init_fcache: Cache lookup failed for procedure %u", --- 90,98 ---- if (!use_syscache) elog(ERROR, "what the ????, init the fcache without the catalogs?"); ! procedureTuple = SearchSysCacheTupleCopy(PROCOID, ! ObjectIdGetDatum(foid), ! 0, 0, 0); if (!HeapTupleIsValid(procedureTuple)) elog(ERROR, "init_fcache: Cache lookup failed for procedure %u", *************** *** 258,263 **** --- 259,266 ---- } else retval->func.fn_addr = (func_ptr) NULL; + + heap_freetuple(procedureTuple); return retval; } *** postgresql-7.0.2/src/backend/utils/time/tqual.c.orig Wed Jan 26 14:57:36 2000 --- postgresql-7.0.2/src/backend/utils/time/tqual.c Wed Oct 25 23:02:11 2000 *************** *** 441,447 **** --- 441,451 ---- } if (TransactionIdIsCurrentTransactionId(tuple->t_xmax)) + { + if (tuple->t_infomask & HEAP_MARKED_FOR_UPDATE) + return true; return false; + } if (!TransactionIdDidCommit(tuple->t_xmax)) { *** postgresql-7.0.2/src/bin/pgaccess/lib/tables.tcl.orig Fri Mar 31 20:22:31 2000 --- postgresql-7.0.2/src/bin/pgaccess/lib/tables.tcl Wed Oct 25 23:02:12 2000 *************** *** 813,818 **** --- 813,820 ---- setScrollbar $wn if {$PgAcVar(mw,$wn,updatable)} then { $wn.c bind q "Tables::editText $wn %A %K" + $wn.c bind q "pgaccess_kinput_start %W"; + $wn.c bind q "pg_access_kinput_start %W"; } else { $wn.c bind q {} } *************** *** 2161,2163 **** --- 2163,2243 ---- grid $base.fb.btncancel \ -in .pgaw:Permissions.fb -column 1 -row 0 -columnspan 1 -rowspan 1 } + + # + # NOTE: following two procedures _kinput_trace_root and _kinput_trace_over + # were originaly part of kinput.tcl. + # -- Tatuso Ishii 2000/08/18 + + # kinput.tcl -- + # + # This file contains Tcl procedures used to input Japanese text. + # + # $Header: /mnt1/local/src/repository/pgaccess/pgaccess.tcl,v 1.1.1.1.2.1 1997/11/27 03:24:17 t-ishii Exp $ + # + # Copyright (c) 1993 Software Research Associates, Inc. + # + # Permission to use, copy, modify, and distribute this software and its + # documentation for any purpose and without fee is hereby granted, provided + # that the above copyright notice appear in all copies and that both that + # copyright notice and this permission notice appear in supporting + # documentation, and that the name of Software Research Associates not be + # used in advertising or publicity pertaining to distribution of the + # software without specific, written prior permission. Software Research + # Associates makes no representations about the suitability of this software + # for any purpose. It is provided "as is" without express or implied + # warranty. + # + + # The procedure below is invoked in order to start Japanese text input + # for the specified widget. It sends a request to the input server to + # start conversion on that widget. + # Second argument specifies input style. Valid values are "over" (for + # over-the-spot style) and "root" (for root window style). See X11R5 + # Xlib manual for the meaning of these styles). The default is root + # window style. + + proc pgaccess_kinput_start {w {style root}} { + global _kinput_priv + catch {unset _kinput_priv($w)} + if {$style=="over"} then { + set spot [_kinput_spot $w] + if {"$spot" != ""} then { + trace variable _kinput_priv($w) w _pgaccess_kinput_trace_$style + kanjiInput start $w \ + -variable _kinput_priv($w) \ + -inputStyle over \ + -foreground [_kinput_attr $w -foreground] \ + -background [_kinput_attr $w -background] \ + -fonts [list [_kinput_attr $w -font] \ + [_kinput_attr $w -kanjifont]] \ + -clientArea [_kinput_area $w] \ + -spot $spot + return + } + } + trace variable _kinput_priv($w) w _pgaccess_kinput_trace_root + kanjiInput start $w -variable _kinput_priv($w) -inputStyle root + } + + # for root style + proc _pgaccess_kinput_trace_root {name1 name2 op} { + global PgAcVar + set wn [string trimright $name2 ".c"] + upvar #0 $name1 trvar + $name2 insert $PgAcVar(mw,$wn,id_edited) insert $trvar($name2) + set $PgAcVar(mw,$wn,dirtyrec) 1 + unset $trvar($name2) + } + + # for over-the-spot style + proc _pgaccess_kinput_trace_over {name1 name2 op} { + global PgAcVar + set wn [string trimright $name2 ".c"] + upvar #0 $name1 trvar + $name2 insert $PgAcVar(mw,$wn,id_edited) insert $trvar($name2) + set $PgAcVar(mw,$wn,dirtyrec) 1 + kinput_send_spot $name2 + unset $trvar($name2) + } + *** postgresql-7.0.2/src/bin/psql/describe.c.orig Mon Apr 17 05:04:51 2000 --- postgresql-7.0.2/src/bin/psql/describe.c Wed Oct 25 23:02:12 2000 *************** *** 277,283 **** listAllDbs(bool desc) { PGresult *res; ! char buf[512]; printQueryOpt myopt = pset.popt; strcpy(buf, --- 277,283 ---- listAllDbs(bool desc) { PGresult *res; ! char buf[1024]; printQueryOpt myopt = pset.popt; strcpy(buf, *** postgresql-7.0.2/src/pl/plpgsql/src/scan.l.orig Thu May 27 05:55:06 1999 --- postgresql-7.0.2/src/pl/plpgsql/src/scan.l Wed Oct 25 23:02:12 2000 *************** *** 48,55 **** #define YY_INPUT(buf,res,max) plpgsql_input(buf, &res, max) %} ! WS [[:alpha:]_"] ! WC [[:alnum:]_"] %x IN_STRING IN_COMMENT --- 48,55 ---- #define YY_INPUT(buf,res,max) plpgsql_input(buf, &res, max) %} ! WS [\200-\377_A-Za-z"] ! WC [\200-\377_A-Za-z0-9"] %x IN_STRING IN_COMMENT *** postgresql-7.0.2/src/pl/plpgsql/src/pl_scan.c.orig Tue Jun 6 03:16:19 2000 --- postgresql-7.0.2/src/pl/plpgsql/src/pl_scan.c Wed Oct 25 23:02:12 2000 *************** *** 2,8 **** /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ */ #define FLEX_SCANNER --- 2,7 ---- *************** *** 373,393 **** 21, 22, 23, 24, 25, 4, 4, 26, 27, 28, 29, 30, 4, 31, 32, 33, 34, 35, 36, 37, ! 38, 4, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ! 1, 1, 1, 1, 1 } ; static plpgsql_yyconst int plpgsql_yy_meta[39] = --- 372,392 ---- 21, 22, 23, 24, 25, 4, 4, 26, 27, 28, 29, 30, 4, 31, 32, 33, 34, 35, 36, 37, ! 38, 4, 1, 1, 1, 1, 1, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 4 } ; static plpgsql_yyconst int plpgsql_yy_meta[39] = *************** *** 679,685 **** #define IN_STRING 1 #define IN_COMMENT 2 ! #line 683 "lex.plpgsql_yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. --- 678,684 ---- #define IN_STRING 1 #define IN_COMMENT 2 ! #line 682 "lex.plpgsql_yy.c" /* Macros after this point can all be overridden by user definitions in * section 1. *************** *** 830,836 **** PLPGSQL_YY_DECL { register plpgsql_yy_state_type plpgsql_yy_current_state; ! register char *plpgsql_yy_cp, *plpgsql_yy_bp; register int plpgsql_yy_act; #line 56 "scan.l" --- 829,835 ---- PLPGSQL_YY_DECL { register plpgsql_yy_state_type plpgsql_yy_current_state; ! register char *plpgsql_yy_cp = NULL, *plpgsql_yy_bp = NULL; register int plpgsql_yy_act; #line 56 "scan.l" *************** *** 863,869 **** * The keyword rules * ---------- */ ! #line 867 "lex.plpgsql_yy.c" if ( plpgsql_yy_init ) { --- 862,868 ---- * The keyword rules * ---------- */ ! #line 866 "lex.plpgsql_yy.c" if ( plpgsql_yy_init ) { *************** *** 1293,1299 **** #line 188 "scan.l" ECHO; PLPGSQL_YY_BREAK ! #line 1297 "lex.plpgsql_yy.c" case PLPGSQL_YY_STATE_EOF(INITIAL): plpgsql_yyterminate(); --- 1292,1298 ---- #line 188 "scan.l" ECHO; PLPGSQL_YY_BREAK ! #line 1296 "lex.plpgsql_yy.c" case PLPGSQL_YY_STATE_EOF(INITIAL): plpgsql_yyterminate();