1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00

here are some patches for 6.5.0 which I already submitted but have never

been applied. The patches are in the .tar.gz attachment at the end:

varchar-array.patch     this patch adds support for arrays of bpchar() and
                        varchar(), which where always missing from postgres.

                        These datatypes can be used to replace the _char4,
                        _char8, etc., which were dropped some time ago.

block-size.patch        this patch fixes many errors in the parser and other
                        program which happen with very large query statements
                        (> 8K) when using a page size larger than 8192.

                        This patch is needed if you want to submit queries
                        larger than 8K. Postgres supports tuples up to 32K
                        but you can't insert them because you can't submit
                        queries larger than 8K. My patch fixes this problem.

                        The patch also replaces all the occurrences of `8192'
                        and `1<<13' in the sources with the proper constants
                        defined in include files. You should now never find
                        8192 hardwired in C code, just to make code clearer.


--
Massimo Dal Zotto
This commit is contained in:
Bruce Momjian
1999-05-03 19:10:48 +00:00
parent da5f1dd722
commit 210055ad61
27 changed files with 273 additions and 66 deletions

View File

@@ -10,7 +10,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: array.h,v 1.15 1999/02/13 23:22:15 momjian Exp $
* $Id: array.h,v 1.16 1999/05/03 19:10:25 momjian Exp $
*
* NOTES
* XXX the data array should be LONGALIGN'd -- notice that the array
@@ -103,7 +103,7 @@ typedef struct
#define RETURN_NULL {*isNull = true; return(0); }
/* #endif *//* irix5 */
#define NAME_LEN 30
#define MAX_BUFF_SIZE (1 << 13)
#define MAX_BUFF_SIZE BLCKSZ
typedef struct
{
@@ -126,6 +126,8 @@ extern char *array_set(ArrayType *array, int n, int *indx, char *dataPtr,
extern char *array_assgn(ArrayType *array, int n, int *upperIndx,
int *lowerIndx, ArrayType *newArr, int reftype,
int len, bool *isNull);
extern ArrayType *array_map(ArrayType *v, Oid type, char *(fn)(char *p, ...),
Oid retType, int nargs, ...);
extern int array_eq(ArrayType *array1, ArrayType *array2);
extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd,
int isSrcLO, int isDestLO);

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.77 1999/03/15 03:24:31 tgl Exp $
* $Id: builtins.h,v 1.78 1999/05/03 19:10:31 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
@@ -23,6 +23,7 @@
#define BUILTINS_H
#include <storage/itemptr.h>
#include <utils/array.h>
#include <utils/geo_decls.h>
#include <utils/datetime.h>
#include <utils/nabstime.h>
@@ -411,6 +412,7 @@ time_t datetime_timestamp(DateTime *datetime);
extern char *bpcharin(char *s, int dummy, int32 atttypmod);
extern char *bpcharout(char *s);
extern char *bpchar(char *s, int32 slen);
extern ArrayType *_bpchar(ArrayType *v, int32 slen);
extern char *char_bpchar(int32 c);
extern int32 bpchar_char(char *s);
extern char *name_bpchar(NameData *s);
@@ -429,6 +431,7 @@ extern uint32 hashbpchar(struct varlena * key);
extern char *varcharin(char *s, int dummy, int32 atttypmod);
extern char *varcharout(char *s);
extern char *varchar(char *s, int32 slen);
extern ArrayType *_varchar(ArrayType *v, int32 slen);
extern bool varchareq(char *arg1, char *arg2);
extern bool varcharne(char *arg1, char *arg2);
extern bool varcharlt(char *arg1, char *arg2);