Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4390b0b

Browse files
committed
Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.
1 parent7fc7551 commit4390b0b

File tree

69 files changed

+6841
-6497
lines changed

Some content is hidden

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

69 files changed

+6841
-6497
lines changed

‎doc/src/sgml/ref/copy.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Specifies that output goes to a pipe or terminal.
248248
</para>
249249
<para>
250250
The backslash character has other special meanings. NULL attributes are
251-
output as "\N". A literal backslash character isoutput as two
251+
represented as "\N". A literal backslash character isrepresented as two
252252
consecutive backslashes ("\\"). A literal tab character is represented
253253
as a backslash and a tab. A literal newline character is
254254
represented as a backslash and a newline. When loading text data

‎doc/src/sgml/ref/create_table.sgml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<DATE>1998-09-11</DATE>
1919
</REFSYNOPSISDIVINFO>
2020
<SYNOPSIS>
21-
CREATE TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> (
21+
CREATE[TEMP]TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> (
2222
<REPLACEABLE CLASS="PARAMETER">column</REPLACEABLE> <REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>
2323
[ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT <REPLACEABLE CLASS="PARAMETER">value</REPLACEABLE> ]
2424
[<REPLACEABLE>column_constraint_clause</REPLACEABLE> | PRIMARY KEY } [ ... ] ]
@@ -38,6 +38,18 @@ CREATE TABLE <REPLACEABLE CLASS="PARAMETER">table</REPLACEABLE> (
3838
</TITLE>
3939
<PARA>
4040

41+
<VARLISTENTRY>
42+
<TERM>
43+
TEMP
44+
</TERM>
45+
<LISTITEM>
46+
<PARA>
47+
The table is created unique to this session, and is
48+
automatically dropped on session exit.
49+
</PARA>
50+
</LISTITEM>
51+
</VARLISTENTRY>
52+
4153
<VARIABLELIST>
4254
<VARLISTENTRY>
4355
<TERM>

‎doc/src/sgml/ref/select.sgml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SELECT
1919
<synopsis>
2020
SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
2121
<replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
22-
[ INTO [TABLE] <replaceable class="PARAMETER">new_table</replaceable> ]
22+
[ INTO [TEMP] [TABLE] <replaceable class="PARAMETER">new_table</replaceable> ]
2323
[ FROM <replaceable class="PARAMETER">table</replaceable> [<replaceable class="PARAMETER">alias</replaceable> ] [, ...] ]
2424
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
2525
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]
@@ -64,6 +64,18 @@ SELECT [ALL|DISTINCT [ON <replaceable class="PARAMETER">column</replaceable>] ]
6464
</listitem>
6565
</varlistentry>
6666

67+
<VARLISTENTRY>
68+
<TERM>
69+
TEMP
70+
</TERM>
71+
<LISTITEM>
72+
<PARA>
73+
The table is created unique to this session, and is
74+
automatically dropped on session exit.
75+
</PARA>
76+
</LISTITEM>
77+
</VARLISTENTRY>
78+
6779
<varlistentry>
6880
<term>
6981
<replaceable class="PARAMETER">new_table</replaceable>
@@ -599,7 +611,7 @@ Create a new table from an existing table or view
599611
</refsynopsisdivinfo>
600612
<synopsis>
601613
SELECT [ ALL | DISTINCT ] <replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">name</replaceable> ] [, ...]
602-
INTO [ TABLE ] <replaceable class="PARAMETER">new_table</replaceable> ]
614+
INTO [TEMP] [ TABLE ] <replaceable class="PARAMETER">new_table</replaceable> ]
603615
[ FROM <replaceable class="PARAMETER">table</replaceable> [<replaceable class="PARAMETER">alias</replaceable>] [, ...] ]
604616
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
605617
[ GROUP BY <replaceable class="PARAMETER">column</replaceable> [, ...] ]

‎doc/src/sgml/ref/set.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
363363
<listitem>
364364
<para>
365365
enables the genetic optimizer algorithm
366-
for statements with8 or more tables.
366+
for statements with6 or more tables.
367367
</para>
368368
</listitem>
369369
</varlistentry>
@@ -406,7 +406,7 @@ SET TIME ZONE { '<REPLACEABLE CLASS="PARAMETER">timezone</REPLACEABLE>' | LOCAL
406406
</para>
407407
<para>
408408
This algorithm is on by default, which used GEQO for
409-
statements ofeight or more tables.
409+
statements ofsix or more tables.
410410
(See the chapter on GEQO in the Programmer's Guide
411411
for more information).
412412
</para>

‎src/Makefile.global.in

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.54 1998/11/29 05:30:14 tgl Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.55 1999/02/02 03:43:56 momjian Exp $
1111
#
1212
# NOTES
13-
# Essentially all Postgres make files include this file and use the
14-
# variables it sets.
13+
# Essentially all Postgres make files include this file and use the
14+
# variables it sets.
1515
#
1616
# To override the default setting, create a Makefile.custom in this
1717
# directory and put your defines there. (Makefile.custom is included
1818
# near the end of this file). Sometimes, a variable gets set in
1919
# Makefile.global after Makefile.custom has been included, so you can't
2020
# simply set that variable in Makefile.custom. In those cases, there is
21-
# often another variable (like CUSTOM_COPT) that you can set in
21+
# often another variable (like CUSTOM_COPT) that you can set in
2222
# Makefile.custom that influences the later setting of the true variable
2323
# of interest (like CFLAGS) by Makefile.global.
2424
#
2525
#
26-
# If you change any of these defines you probably have to
26+
# If you change any of these defines you probably have to
2727
# make clean; make
28-
# since no dependencies are created for these. (of course you can
28+
# since no dependencies are created for these. (of course you can
2929
# be crafty and check what files really depend on them and just remake
3030
# those).
31-
#
32-
# Before including this file, you must set the SRCDIR variable to the
33-
# path of the top of the Postgres source tree (the directory that
34-
# contains this file).
31+
#
32+
# Before including this file, you must set the SRCDIR variable to the
33+
# path of the top of the Postgres source tree (the directory that
34+
# contains this file).
3535
#
3636
#-------------------------------------------------------------------------
3737

@@ -40,8 +40,8 @@
4040
#
4141
# CONFIGURATION SECTION
4242
#
43-
# Following are settings pertaining to the postgres build and
44-
# installation.
43+
# Following are settings pertaining to the postgres build and
44+
# installation.
4545
# of the port.
4646
#
4747
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
@@ -55,8 +55,8 @@ ELF_SYSTEM= @ELF_SYS@
5555

5656
LIBPQDIR:= $(SRCDIR)/interfaces/libpq
5757

58-
# For convenience, POSTGRESDIR is where BINDIR, and LIBDIR
59-
# and other target destinations are rooted. Of course, each of these is
58+
# For convenience, POSTGRESDIR is where BINDIR, and LIBDIR
59+
# and other target destinations are rooted. Of course, each of these is
6060
# changable separately.
6161
POSTGRESDIR= @prefix@
6262

@@ -73,7 +73,7 @@ LIBDIR= $(POSTGRESDIR)/lib
7373
# This is the directory where IPC utilities ipcs and ipcrm are located
7474
#
7575
IPCS=@ipcs@
76-
IPCRM=@ipcrm@
76+
IPCRM=@ipcrm@
7777

7878
# Where the man pages (suitable for use with "man") get installed.
7979
POSTMANDIR= $(POSTGRESDIR)/man
@@ -91,7 +91,7 @@ ODBCINST= $(POSTGRESDIR)
9191

9292
##############################################################################
9393
#
94-
# FEATURES
94+
# FEATURES
9595
#
9696
# To disable a feature, comment out the entire definition
9797
# (that is, prepend '#', don't set it to "0" or "no").
@@ -167,7 +167,7 @@ endif
167167

168168
##############################################################################
169169
#
170-
# Installation.
170+
# Installation.
171171
#
172172
# For many ports, INSTALL is overridden below.
173173
INSTALL= @INSTALL@
@@ -181,7 +181,7 @@ INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
181181
##############################################################################
182182
#
183183
# For building shell scripts:
184-
#
184+
#
185185
# For many ports, these are overridden below.
186186

187187
# DASH_N is what we put before the text on an echo command when we don't
@@ -191,7 +191,7 @@ INSTL_SHLIB_OPTS= @INSTL_SHLIB_OPTS@
191191
# you do echo "no newline after this\c".
192192

193193
DASH_N= @DASH_N@
194-
BACKSLASH_C= @BACKSLASH_C@
194+
BACKSLASH_C= @BACKSLASH_C@
195195

196196

197197

@@ -204,7 +204,7 @@ YFLAGS= @YFLAGS@
204204
YACC= @YACC@
205205
LEX= @LEX@
206206
AROPT= @AROPT@
207-
CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@
207+
CFLAGS= -I$(SRCDIR)/include -I$(SRCDIR)/backend @CPPFLAGS@ @CFLAGS@
208208
CFLAGS_SL= @SHARED_LIB@
209209
LDFLAGS= @LDFLAGS@ @LIBS@
210210
DLSUFFIX= @DLSUFFIX@
@@ -245,25 +245,25 @@ INSTALL= $(CUSTOM_INSTALL)
245245
endif
246246

247247
#
248-
# Flags for CC and LD.
248+
# Flags for CC and LD.
249249

250250
##############################################################################
251251
# COPT
252252
#
253-
# COPT is for options that the sophisticated builder might want to vary
253+
# COPT is for options that the sophisticated builder might want to vary
254254
# from one build to the next, like options to build Postgres with debugging
255-
# information included. COPT is meant to be set on the make command line,
255+
# information included. COPT is meant to be set on the make command line,
256256
# for example with the command "make COPT=-g". The value you see set here
257257
# is the default that gets used if the builder does not give a value for
258258
# COPT on his make command.
259259
#
260-
# There is a nonobvious relationship between -O (optimization) and
260+
# There is a nonobvious relationship between -O (optimization) and
261261
# -Werror (consider all warnings fatal). On some systems, if you don't
262262
# optimize, you will always get some warnings because the system header
263263
# files will include some unreferenced functions in the code. These are
264264
# functions that are supposed to be inline, so there wouldn't ordinarily
265265
# be an "unreferenced" problem, but if you don't enable optimization, no
266-
# inlining can happen, and hence the problem. Therefore, we include
266+
# inlining can happen, and hence the problem. Therefore, we include
267267
# if you override -O, you override -Werror as well.
268268
#
269269
# CUSTOM_COPT is something the user may set in Makefile.custom

‎src/backend/access/heap/hio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Id: hio.c,v 1.15 1998/12/15 12:45:14 vadim Exp $
10+
* $Id: hio.c,v 1.16 1999/02/02 03:43:57 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -110,7 +110,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
110110
ItemIditemId;
111111
Itemitem;
112112

113-
if (!relation->rd_islocal)
113+
if (!relation->rd_myxactonly)
114114
LockRelation(relation,ExtendLock);
115115

116116
/*
@@ -158,7 +158,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple)
158158
elog(ERROR,"Tuple is too big: size %d",len);
159159
}
160160

161-
if (!relation->rd_islocal)
161+
if (!relation->rd_myxactonly)
162162
UnlockRelation(relation,ExtendLock);
163163

164164
offnum=PageAddItem((Page)pageHeader, (Item)tuple->t_data,

‎src/backend/access/transam/xact.c

Lines changed: 4 additions & 4 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/xact.c,v 1.29 1999/01/29 09:22:53 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.30 1999/02/02 03:44:00 momjian Exp $
1111
*
1212
* NOTES
1313
*Transaction aborts can now occur two ways:
@@ -850,7 +850,7 @@ StartTransaction()
850850
are created in the course of the transactions
851851
they need to be destroyed properly at the end of the transactions
852852
*/
853-
InitTempRelList();
853+
InitNoNameRelList();
854854

855855
/* ----------------
856856
*done with start processing, set current transaction
@@ -917,7 +917,7 @@ CommitTransaction()
917917
AtCommit_Notify();
918918

919919
CloseSequences();
920-
DestroyTempRels();
920+
DestroyNoNameRels();
921921
AtEOXact_portals();
922922
RecordTransactionCommit();
923923
RelationPurgeLocalRelation(true);
@@ -984,7 +984,7 @@ AbortTransaction()
984984
AtEOXact_portals();
985985
RecordTransactionAbort();
986986
RelationPurgeLocalRelation(false);
987-
DestroyTempRels();
987+
DestroyNoNameRels();
988988
AtAbort_Cache();
989989
AtAbort_Locks();
990990
AtAbort_Memory();

‎src/backend/bootstrap/bootparse.y

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.22 1999/01/21 22:48:04 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.23 1999/02/02 03:44:03 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -164,7 +164,8 @@ Boot_CreateStmt:
164164
if (DebugMode)
165165
puts("creating bootstrap relation");
166166
tupdesc = CreateTupleDesc(numattr,attrtypes);
167-
reldesc = heap_create(LexIDStr($3), tupdesc);
167+
reldesc = heap_create(LexIDStr($3), tupdesc,
168+
false,false);
168169
if (DebugMode)
169170
puts("bootstrap relation created ok");
170171
}
@@ -175,7 +176,7 @@ Boot_CreateStmt:
175176

176177
tupdesc = CreateTupleDesc(numattr,attrtypes);
177178
id = heap_create_with_catalog(LexIDStr($3),
178-
tupdesc, RELKIND_RELATION);
179+
tupdesc, RELKIND_RELATION,false);
179180
if (!Quiet)
180181
printf("CREATED relation %s with OID %d\n",
181182
LexIDStr($3), id);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp