Commit 75133d9a authored by Jan Wieck's avatar Jan Wieck

Reactivated LZTEXT data type and changed rule plan- and qual-strings

into lztext.

Jan
parent 97e38d32
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for utils/adt # Makefile for utils/adt
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.34 2000/02/16 17:24:46 thomas Exp $ # $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.35 2000/02/27 12:02:32 wieck Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -25,7 +25,7 @@ endif ...@@ -25,7 +25,7 @@ endif
OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \
date.o datetime.o datum.o filename.o float.o \ date.o datetime.o datum.o filename.o float.o \
geo_ops.o geo_selfuncs.o int.o int8.o like.o \ geo_ops.o geo_selfuncs.o int.o int8.o like.o lztext.o \
misc.o nabstime.o name.o not_in.o numeric.o numutils.o \ misc.o nabstime.o name.o not_in.o numeric.o numutils.o \
oid.o oracle_compat.o \ oid.o oracle_compat.o \
regexp.o regproc.o ruleutils.o selfuncs.o sets.o \ regexp.o regproc.o ruleutils.o selfuncs.o sets.o \
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.90 2000/02/18 09:28:55 inoue Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.91 2000/02/27 12:02:32 wieck Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "postgres.h" #include "postgres.h"
#include "utils/builtins.h"
#include "access/genam.h" #include "access/genam.h"
#include "access/heapam.h" #include "access/heapam.h"
#include "access/istrat.h" #include "access/istrat.h"
...@@ -55,7 +56,6 @@ ...@@ -55,7 +56,6 @@
#include "miscadmin.h" #include "miscadmin.h"
#include "storage/bufmgr.h" #include "storage/bufmgr.h"
#include "storage/smgr.h" #include "storage/smgr.h"
#include "utils/builtins.h"
#include "utils/catcache.h" #include "utils/catcache.h"
#include "utils/relcache.h" #include "utils/relcache.h"
#include "utils/temprel.h" #include "utils/temprel.h"
...@@ -688,7 +688,7 @@ RelationBuildRuleLock(Relation relation) ...@@ -688,7 +688,7 @@ RelationBuildRuleLock(Relation relation)
Anum_pg_rewrite_ev_action, Anum_pg_rewrite_ev_action,
pg_rewrite_tupdesc, pg_rewrite_tupdesc,
&isnull); &isnull);
ruleaction_str = textout((text *) DatumGetPointer(ruleaction)); ruleaction_str = lztextout((lztext *) DatumGetPointer(ruleaction));
rule->actions = (List *) stringToNode(ruleaction_str); rule->actions = (List *) stringToNode(ruleaction_str);
pfree(ruleaction_str); pfree(ruleaction_str);
...@@ -696,7 +696,7 @@ RelationBuildRuleLock(Relation relation) ...@@ -696,7 +696,7 @@ RelationBuildRuleLock(Relation relation)
Anum_pg_rewrite_ev_qual, Anum_pg_rewrite_ev_qual,
pg_rewrite_tupdesc, pg_rewrite_tupdesc,
&isnull); &isnull);
rule_evqual_str = textout((text *) DatumGetPointer(rule_evqual)); rule_evqual_str = lztextout((lztext *) DatumGetPointer(rule_evqual));
rule->qual = (Node *) stringToNode(rule_evqual_str); rule->qual = (Node *) stringToNode(rule_evqual_str);
pfree(rule_evqual_str); pfree(rule_evqual_str);
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_amop.h,v 1.30 2000/02/10 19:51:42 momjian Exp $ * $Id: pg_amop.h,v 1.31 2000/02/27 12:02:33 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -354,6 +354,17 @@ DATA(insert OID = 0 ( 403 1690 91 3 )); ...@@ -354,6 +354,17 @@ DATA(insert OID = 0 ( 403 1690 91 3 ));
DATA(insert OID = 0 ( 403 1690 1695 4 )); DATA(insert OID = 0 ( 403 1690 1695 4 ));
DATA(insert OID = 0 ( 403 1690 59 5 )); DATA(insert OID = 0 ( 403 1690 59 5 ));
/*
* nbtree lztext
*/
DATA(insert OID = 0 ( 403 1663 1659 1 ));
DATA(insert OID = 0 ( 403 1663 1660 2 ));
DATA(insert OID = 0 ( 403 1663 1657 3 ));
DATA(insert OID = 0 ( 403 1663 1662 4 ));
DATA(insert OID = 0 ( 403 1663 1661 5 ));
/* /*
* hash table _ops * hash table _ops
*/ */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_amproc.h,v 1.20 2000/02/10 19:51:45 momjian Exp $ * $Id: pg_amproc.h,v 1.21 2000/02/27 12:02:33 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -100,6 +100,8 @@ DATA(insert OID = 0 (403 935 926 1)); ...@@ -100,6 +100,8 @@ DATA(insert OID = 0 (403 935 926 1));
DATA(insert OID = 0 (403 652 926 1)); DATA(insert OID = 0 (403 652 926 1));
DATA(insert OID = 0 (403 1768 1769 1)); DATA(insert OID = 0 (403 1768 1769 1));
DATA(insert OID = 0 (403 1690 1693 1)); DATA(insert OID = 0 (403 1690 1693 1));
DATA(insert OID = 0 (403 1663 1636 1));
/* hash */ /* hash */
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_opclass.h,v 1.29 2000/02/16 17:26:07 thomas Exp $ * $Id: pg_opclass.h,v 1.30 2000/02/27 12:02:33 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -118,6 +118,8 @@ DATA(insert OID = 652 ( cidr_ops 650 )); ...@@ -118,6 +118,8 @@ DATA(insert OID = 652 ( cidr_ops 650 ));
DESCR(""); DESCR("");
DATA(insert OID = 1768 ( numeric_ops 1700 )); DATA(insert OID = 1768 ( numeric_ops 1700 ));
DESCR(""); DESCR("");
DATA(insert OID = 1663 ( lztext_ops 1625 ));
DESCR("");
DATA(insert OID = 1690 ( bool_ops 16 )); DATA(insert OID = 1690 ( bool_ops 16 ));
DESCR(""); DESCR("");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_operator.h,v 1.70 2000/02/24 02:05:28 tgl Exp $ * $Id: pg_operator.h,v 1.71 2000/02/27 12:02:33 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -684,6 +684,14 @@ DATA(insert OID = 1762 ( "%" PGUID 0 b t f 1700 1700 1700 0 0 0 0 numeric ...@@ -684,6 +684,14 @@ DATA(insert OID = 1762 ( "%" PGUID 0 b t f 1700 1700 1700 0 0 0 0 numeric
DATA(insert OID = 1763 ( "@" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_abs - - )); DATA(insert OID = 1763 ( "@" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_abs - - ));
DATA(insert OID = 1788 ( "-" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_uminus - - )); DATA(insert OID = 1788 ( "-" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_uminus - - ));
/* LZTEXT type */
DATA(insert OID = 1657 ( "=" PGUID 0 b t f 1625 1625 16 1657 1658 1659 1659 lztext_eq eqsel eqjoinsel ));
DATA(insert OID = 1658 ( "<>" PGUID 0 b t f 1625 1625 16 1658 1657 0 0 lztext_ne neqsel neqjoinsel ));
DATA(insert OID = 1659 ( "<" PGUID 0 b t f 1625 1625 16 1661 1662 0 0 lztext_lt intltsel intltjoinsel ));
DATA(insert OID = 1660 ( "<=" PGUID 0 b t f 1625 1625 16 1662 1661 0 0 lztext_le intltsel intltjoinsel ));
DATA(insert OID = 1661 ( ">" PGUID 0 b t f 1625 1625 16 1659 1660 0 0 lztext_gt intgtsel intgtjoinsel ));
DATA(insert OID = 1662 ( ">=" PGUID 0 b t f 1625 1625 16 1660 1659 0 0 lztext_ge intgtsel intgtjoinsel ));
/* /*
* function prototypes * function prototypes
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* 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.125 2000/02/24 02:05:27 tgl Exp $ * $Id: pg_proc.h,v 1.126 2000/02/27 12:02:33 wieck 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
...@@ -2352,6 +2352,42 @@ DESCR("(internal)"); ...@@ -2352,6 +2352,42 @@ DESCR("(internal)");
DATA(insert OID = 1787 ( int2 PGUID 11 f t t 1 f 21 "1700" 100 0 0 100 numeric_int2 - )); DATA(insert OID = 1787 ( int2 PGUID 11 f t t 1 f 21 "1700" 100 0 0 100 numeric_int2 - ));
DESCR("(internal)"); DESCR("(internal)");
/* OID's 1625 - 1639 LZTEXT data type */
DATA(insert OID = 1626 ( lztextin PGUID 11 f t t 1 f 1625 "0" 100 0 0 100 lztextin - ));
DESCR("(internal)");
DATA(insert OID = 1627 ( lztextout PGUID 11 f t t 1 f 23 "0" 100 0 0 100 lztextout - ));
DESCR("(internal)");
DATA(insert OID = 1628 ( lztext_text PGUID 11 f t t 1 f 25 "1625" 100 0 0 100 lztext_text -));
DESCR("convert lztext to text");
DATA(insert OID = 1629 ( text PGUID 11 f t t 1 f 25 "1625" 100 0 0 100 lztext_text -));
DESCR("convert lztext to text");
DATA(insert OID = 1630 ( text_lztext PGUID 11 f t t 1 f 1625 "25" 100 0 0 100 text_lztext -));
DESCR("convert text to lztext");
DATA(insert OID = 1631 ( lztext PGUID 11 f t t 1 f 1625 "25" 100 0 0 100 text_lztext -));
DESCR("convert text to lztext");
DATA(insert OID = 1632 ( lztextlen PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextlen - ));
DESCR("length");
DATA(insert OID = 1633 ( length PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextlen - ));
DESCR("length");
DATA(insert OID = 1634 ( lztextoctetlen PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextoctetlen - ));
DESCR("octet length");
DATA(insert OID = 1635 ( octet_length PGUID 11 f t t 1 f 23 "1625" 100 0 1 0 lztextoctetlen - ));
DESCR("octet length");
DATA(insert OID = 1636 ( lztext_cmp PGUID 11 f t t 2 f 23 "1625 1625" 100 0 1 0 lztext_cmp - ));
DESCR("compare lztext vs. lztext");
DATA(insert OID = 1637 ( lztext_eq PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_eq - ));
DESCR("equal");
DATA(insert OID = 1638 ( lztext_ne PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ne - ));
DESCR("not equal");
DATA(insert OID = 1639 ( lztext_gt PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_gt - ));
DESCR("greater-than");
DATA(insert OID = 1664 ( lztext_ge PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_ge - ));
DESCR("greater-than-or-equal");
DATA(insert OID = 1665 ( lztext_lt PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_lt - ));
DESCR("lower-than");
DATA(insert OID = 1656 ( lztext_le PGUID 11 f t t 2 f 16 "1625 1625" 100 0 1 0 lztext_le - ));
DESCR("lower-than-or-equal");
/* formatting */ /* formatting */
DATA(insert OID = 1770 ( to_char PGUID 11 f t f 2 f 25 "1184 25" 100 0 0 100 timestamp_to_char - )); DATA(insert OID = 1770 ( to_char PGUID 11 f t f 2 f 25 "1184 25" 100 0 0 100 timestamp_to_char - ));
DESCR("convert / formatting timestamp to text"); DESCR("convert / formatting timestamp to text");
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_rewrite.h,v 1.10 2000/01/26 05:57:58 momjian Exp $ * $Id: pg_rewrite.h,v 1.11 2000/02/27 12:02:34 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -38,8 +38,8 @@ CATALOG(pg_rewrite) ...@@ -38,8 +38,8 @@ CATALOG(pg_rewrite)
Oid ev_class; Oid ev_class;
int2 ev_attr; int2 ev_attr;
bool is_instead; bool is_instead;
text ev_qual; lztext ev_qual;
text ev_action; lztext ev_action;
} FormData_pg_rewrite; } FormData_pg_rewrite;
/* ---------------- /* ----------------
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_type.h,v 1.83 2000/02/21 03:36:57 tgl Exp $ * $Id: pg_type.h,v 1.84 2000/02/27 12:02:34 wieck Exp $
* *
* NOTES * NOTES
* the genbki.sh script reads this file and generates .bki * the genbki.sh script reads this file and generates .bki
...@@ -383,6 +383,10 @@ DATA(insert OID = 1700 ( numeric PGUID -1 -1 f b t \054 0 0 numeric_in nume ...@@ -383,6 +383,10 @@ DATA(insert OID = 1700 ( numeric PGUID -1 -1 f b t \054 0 0 numeric_in nume
DESCR("numeric(precision, decimal), arbitrary precision number"); DESCR("numeric(precision, decimal), arbitrary precision number");
#define NUMERICOID 1700 #define NUMERICOID 1700
/* OIDS 1625 - 1639 */
DATA(insert OID = 1625 ( lztext PGUID -1 -1 f b t \054 0 0 lztextin lztextout lztextin lztextout i _null_ ));
DESCR("variable-length string, stored compressed");
#define LZTEXTOID 1625
#define VARLENA_FIXED_SIZE(attr) ((attr)->atttypid == BPCHAROID && (attr)->atttypmod > 0) #define VARLENA_FIXED_SIZE(attr) ((attr)->atttypid == BPCHAROID && (attr)->atttypmod > 0)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* 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.104 2000/02/24 02:05:24 tgl Exp $ * $Id: builtins.h,v 1.105 2000/02/27 12:02:34 wieck Exp $
* *
* NOTES * NOTES
* This should normally only be included by fmgr.h. * This should normally only be included by fmgr.h.
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "utils/timestamp.h" #include "utils/timestamp.h"
#include "utils/nabstime.h" #include "utils/nabstime.h"
#include "utils/date.h" #include "utils/date.h"
#include "utils/lztext.h"
/* /*
* Defined in adt/ * Defined in adt/
...@@ -558,6 +559,21 @@ extern float32 numeric_float4(Numeric num); ...@@ -558,6 +559,21 @@ extern float32 numeric_float4(Numeric num);
extern Numeric float8_numeric(float64 val); extern Numeric float8_numeric(float64 val);
extern float64 numeric_float8(Numeric num); extern float64 numeric_float8(Numeric num);
/* lztext.c */
lztext *lztextin(char *str);
char *lztextout(lztext *lz);
text *lztext_text(lztext *lz);
lztext *text_lztext(text *txt);
int32 lztextlen(lztext *lz);
int32 lztextoctetlen(lztext *lz);
int32 lztext_cmp(lztext *lz1, lztext *lz2);
bool lztext_eq(lztext *lz1, lztext *lz2);
bool lztext_ne(lztext *lz1, lztext *lz2);
bool lztext_gt(lztext *lz1, lztext *lz2);
bool lztext_ge(lztext *lz1, lztext *lz2);
bool lztext_lt(lztext *lz1, lztext *lz2);
bool lztext_le(lztext *lz1, lztext *lz2);
/* ri_triggers.c */ /* ri_triggers.c */
extern HeapTuple RI_FKey_check_ins(FmgrInfo *proinfo); extern HeapTuple RI_FKey_check_ins(FmgrInfo *proinfo);
extern HeapTuple RI_FKey_check_upd(FmgrInfo *proinfo); extern HeapTuple RI_FKey_check_upd(FmgrInfo *proinfo);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment