Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 57b5966

Browse files
committed
The following uuencoded, gzip'd file will ...
1. Remove the char2, char4, char8 and char16 types from postgresql 2. Change references of char16 to name in the regression tests. 3. Rename the char16.sql regression test to name.sql. 4. Modify the regression test scripts and outputs to match up. Might require new regression.{SYSTEM} files... Darren King
1 parent 31c3610 commit 57b5966

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+327
-1326
lines changed

src/backend/access/common/tupdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.36 1998/02/26 04:29:22 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.37 1998/03/30 17:22:05 momjian Exp $
1111
*
1212
* NOTES
1313
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -317,7 +317,7 @@ TupleDescInitEntry(TupleDesc desc,
317317
*
318318
* Note: in the special case of
319319
*
320-
* create EMP (name = char16, manager = EMP)
320+
* create EMP (name = text, manager = EMP)
321321
*
322322
* RelationNameCreateHeapRelation() calls BuildDesc() which
323323
* calls this routine and since EMP does not exist yet, the

src/backend/access/hash/hashfunc.c

Lines changed: 4 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.6 1997/09/08 21:40:47 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.7 1998/03/30 17:22:08 momjian Exp $
1111
*
1212
* NOTES
1313
* These functions are stored in pg_amproc. For each operator class
@@ -133,75 +133,24 @@ hashoid(Oid key)
133133
return ((uint32) ~key);
134134
}
135135

136+
#define PRIME1 37
137+
#define PRIME2 1048583
136138

137139
uint32
138140
hashchar(char key)
139141
{
140142
int len;
141143
uint32 h;
142144

143-
len = sizeof(char);
144-
145-
#define PRIME1 37
146-
#define PRIME2 1048583
147-
148145
h = 0;
146+
len = sizeof(char);
149147
/* Convert char to integer */
150148
h = h * PRIME1 ^ (key - ' ');
151149
h %= PRIME2;
152150

153151
return (h);
154152
}
155153

156-
uint32
157-
hashchar2(uint16 intkey)
158-
{
159-
uint32 h;
160-
int len;
161-
char *key = (char *) &intkey;
162-
163-
h = 0;
164-
len = sizeof(uint16);
165-
/* Convert string to integer */
166-
while (len--)
167-
h = h * PRIME1 ^ (*key++ - ' ');
168-
h %= PRIME2;
169-
170-
return (h);
171-
}
172-
173-
uint32
174-
hashchar4(uint32 intkey)
175-
{
176-
uint32 h;
177-
int len;
178-
char *key = (char *) &intkey;
179-
180-
h = 0;
181-
len = sizeof(uint32);
182-
/* Convert string to integer */
183-
while (len--)
184-
h = h * PRIME1 ^ (*key++ - ' ');
185-
h %= PRIME2;
186-
187-
return (h);
188-
}
189-
190-
uint32
191-
hashchar8(char *key)
192-
{
193-
uint32 h;
194-
int len;
195-
196-
h = 0;
197-
len = sizeof(char8);
198-
/* Convert string to integer */
199-
while (len--)
200-
h = h * PRIME1 ^ (*key++ - ' ');
201-
h %= PRIME2;
202-
203-
return (h);
204-
}
205154

206155
uint32
207156
hashname(NameData *n)
@@ -223,22 +172,6 @@ hashname(NameData *n)
223172
}
224173

225174

226-
uint32
227-
hashchar16(char *key)
228-
{
229-
uint32 h;
230-
int len;
231-
232-
h = 0;
233-
len = sizeof(char16);
234-
/* Convert string to integer */
235-
while (len--)
236-
h = h * PRIME1 ^ (*key++ - ' ');
237-
h %= PRIME2;
238-
239-
return (h);
240-
}
241-
242175

243176
/*
244177
* (Comment from the original db3 hashing code: )

src/backend/access/nbtree/nbtcompare.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.13 1997/09/08 21:41:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.14 1998/03/30 17:22:17 momjian Exp $
1111
*
1212
* NOTES
1313
* These functions are stored in pg_amproc. For each operator class
@@ -101,30 +101,6 @@ btcharcmp(char a, char b)
101101
return ((int32) ((uint8) a - (uint8) b));
102102
}
103103

104-
int32
105-
btchar2cmp(uint16 a, uint16 b)
106-
{
107-
return (strncmp((char *) &a, (char *) &b, 2));
108-
}
109-
110-
int32
111-
btchar4cmp(uint32 a, uint32 b)
112-
{
113-
return (strncmp((char *) &a, (char *) &b, 4));
114-
}
115-
116-
int32
117-
btchar8cmp(char *a, char *b)
118-
{
119-
return (strncmp(a, b, 8));
120-
}
121-
122-
int32
123-
btchar16cmp(char *a, char *b)
124-
{
125-
return (strncmp(a, b, 16));
126-
}
127-
128104
int32
129105
btnamecmp(NameData *a, NameData *b)
130106
{

src/backend/access/transam/xid.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.12 1998/02/26 04:30:19 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.13 1998/03/30 17:22:28 momjian Exp $
1111
*
1212
* OLD COMMENTS
1313
* XXX WARNING
@@ -30,14 +30,14 @@ extern TransactionId DisabledTransactionId;
3030
extern TransactionId AmiTransactionId;
3131
extern TransactionId FirstTransactionId;
3232

33-
/* XXX char16 name for catalogs */
33+
/* XXX name for catalogs */
3434
TransactionId
3535
xidin(char *representation)
3636
{
3737
return (atol(representation));
3838
}
3939

40-
/* XXX char16 name for catalogs */
40+
/* XXX name for catalogs */
4141
char *
4242
xidout(TransactionId transactionId)
4343
{

src/backend/bootstrap/bootparse.y

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,47 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.13 1998/01/07 21:02:29 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.14 1998/03/30 17:22:44 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515

16+
#include <stdio.h>
17+
#include <time.h>
18+
1619
#include "postgres.h"
1720

18-
#include "catalog/pg_attribute.h"
21+
#include "miscadmin.h"
22+
1923
#include "access/attnum.h"
20-
#include "nodes/pg_list.h"
24+
#include "access/funcindex.h"
25+
#include "access/htup.h"
26+
#include "access/itup.h"
27+
#include "access/skey.h"
28+
#include "access/strat.h"
2129
#include "access/tupdesc.h"
22-
#include "storage/fd.h"
30+
#include "access/xact.h"
31+
#include "bootstrap/bootstrap.h"
32+
#include "catalog/heap.h"
2333
#include "catalog/pg_am.h"
34+
#include "catalog/pg_attribute.h"
2435
#include "catalog/pg_class.h"
36+
#include "commands/defrem.h"
2537
#include "nodes/nodes.h"
26-
#include "rewrite/prs2lock.h"
27-
#include "access/skey.h"
28-
#include "access/strat.h"
29-
#include "utils/rel.h"
30-
38+
#include "nodes/parsenodes.h"
39+
#include "nodes/pg_list.h"
3140
#include "nodes/primnodes.h"
32-
#include <time.h>
33-
#include "utils/nabstime.h"
41+
#include "rewrite/prs2lock.h"
3442
#include "storage/block.h"
35-
#include "storage/off.h"
36-
#include "storage/itemptr.h"
37-
#include "access/htup.h"
38-
#include "nodes/parsenodes.h"
39-
40-
#include "access/xact.h"
41-
42-
#include <stdio.h>
43-
44-
#include "catalog/heap.h"
45-
43+
#include "storage/fd.h"
4644
#include "storage/ipc.h"
47-
#include "storage/spin.h"
45+
#include "storage/itemptr.h"
46+
#include "storage/off.h"
4847
#include "storage/smgr.h"
49-
48+
#include "storage/spin.h"
5049
#include "tcop/dest.h"
51-
#include "commands/defrem.h"
52-
53-
#include "access/itup.h"
54-
#include "access/funcindex.h"
55-
#include "bootstrap/bootstrap.h"
56-
57-
#include "miscadmin.h"
50+
#include "utils/nabstime.h"
51+
#include "utils/rel.h"
5852

5953
#define DO_START { \
6054
StartTransactionCommand();\

0 commit comments

Comments
 (0)