Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4b2b8592
Commit
4b2b8592
authored
28 years ago
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile and warning cleanup
parent
d79bb2fd
Changes
85
Show whitespace changes
Inline
Side-by-side
Showing
85 changed files
with
342 additions
and
228 deletions
+342
-228
src/backend/bootstrap/Makefile
src/backend/bootstrap/Makefile
+2
-2
src/backend/commands/define.c
src/backend/commands/define.c
+3
-2
src/backend/executor/execJunk.c
src/backend/executor/execJunk.c
+3
-1
src/backend/executor/execTuples.c
src/backend/executor/execTuples.c
+3
-1
src/backend/executor/nodeGroup.c
src/backend/executor/nodeGroup.c
+2
-1
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeNestloop.c
+2
-1
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSeqscan.c
+3
-1
src/backend/executor/nodeSort.c
src/backend/executor/nodeSort.c
+4
-1
src/backend/executor/nodeUnique.c
src/backend/executor/nodeUnique.c
+7
-1
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+3
-3
src/backend/main/main.c
src/backend/main/main.c
+2
-2
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+3
-3
src/backend/nodes/equalfuncs.c
src/backend/nodes/equalfuncs.c
+2
-2
src/backend/nodes/outfuncs.c
src/backend/nodes/outfuncs.c
+2
-2
src/backend/nodes/read.c
src/backend/nodes/read.c
+3
-3
src/backend/nodes/readfuncs.c
src/backend/nodes/readfuncs.c
+5
-5
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/allpaths.c
+2
-2
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/indxpath.c
+3
-1
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/prune.c
+2
-2
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+4
-4
src/backend/parser/Makefile
src/backend/parser/Makefile
+2
-2
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+11
-12
src/backend/parser/catalog_utils.c
src/backend/parser/catalog_utils.c
+2
-2
src/backend/parser/dbcommands.c
src/backend/parser/dbcommands.c
+2
-2
src/backend/parser/parser.c
src/backend/parser/parser.c
+11
-3
src/backend/parser/sysfunc.c
src/backend/parser/sysfunc.c
+2
-2
src/backend/port/bsdi/port-protos.h
src/backend/port/bsdi/port-protos.h
+5
-0
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+13
-11
src/backend/regex/regcomp.c
src/backend/regex/regcomp.c
+5
-4
src/backend/regex/regerror.c
src/backend/regex/regerror.c
+1
-0
src/backend/regex/regexec.c
src/backend/regex/regexec.c
+1
-0
src/backend/rewrite/rewriteSupport.c
src/backend/rewrite/rewriteSupport.c
+3
-1
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_init.c
+2
-1
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/bufmgr.c
+3
-1
src/backend/storage/buffer/localbuf.c
src/backend/storage/buffer/localbuf.c
+3
-1
src/backend/storage/file/fd.c
src/backend/storage/file/fd.c
+4
-3
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/ipc.c
+2
-1
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/ipci.c
+5
-6
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/shmem.c
+2
-2
src/backend/storage/large_object/inv_api.c
src/backend/storage/large_object/inv_api.c
+6
-1
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lmgr.c
+2
-1
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+5
-1
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/proc.c
+6
-2
src/backend/storage/page/bufpage.c
src/backend/storage/page/bufpage.c
+2
-1
src/backend/storage/smgr/md.c
src/backend/storage/smgr/md.c
+4
-1
src/backend/storage/smgr/mm.c
src/backend/storage/smgr/mm.c
+2
-1
src/backend/storage/smgr/smgr.c
src/backend/storage/smgr/smgr.c
+1
-5
src/backend/tcop/Makefile
src/backend/tcop/Makefile
+2
-2
src/backend/tcop/aclchk.c
src/backend/tcop/aclchk.c
+5
-3
src/backend/tcop/fastpath.c
src/backend/tcop/fastpath.c
+3
-1
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+17
-11
src/backend/tcop/pquery.c
src/backend/tcop/pquery.c
+4
-2
src/backend/tcop/utility.c
src/backend/tcop/utility.c
+2
-2
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayfuncs.c
+19
-13
src/backend/utils/adt/chunk.c
src/backend/utils/adt/chunk.c
+22
-8
src/backend/utils/adt/datum.c
src/backend/utils/adt/datum.c
+2
-2
src/backend/utils/adt/filename.c
src/backend/utils/adt/filename.c
+2
-2
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/nabstime.c
+4
-3
src/backend/utils/adt/regproc.c
src/backend/utils/adt/regproc.c
+2
-2
src/backend/utils/adt/sets.c
src/backend/utils/adt/sets.c
+2
-2
src/backend/utils/adt/varlena.c
src/backend/utils/adt/varlena.c
+2
-2
src/backend/utils/cache/catcache.c
src/backend/utils/cache/catcache.c
+2
-2
src/backend/utils/cache/inval.c
src/backend/utils/cache/inval.c
+2
-2
src/backend/utils/error/elog.c
src/backend/utils/error/elog.c
+6
-3
src/backend/utils/fmgr/fmgr.c
src/backend/utils/fmgr/fmgr.c
+2
-2
src/backend/utils/hash/dynahash.c
src/backend/utils/hash/dynahash.c
+2
-10
src/backend/utils/init/postinit.c
src/backend/utils/init/postinit.c
+2
-2
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/aset.c
+2
-2
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/mcxt.c
+5
-3
src/backend/utils/mmgr/portalmem.c
src/backend/utils/mmgr/portalmem.c
+6
-2
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+2
-3
src/bin/pg_id/pg_id.c
src/bin/pg_id/pg_id.c
+3
-3
src/bin/pg_version/pg_version.c
src/bin/pg_version/pg_version.c
+2
-1
src/bin/psql/Makefile
src/bin/psql/Makefile
+4
-4
src/bin/psql/psql.c
src/bin/psql/psql.c
+4
-2
src/include/bootstrap/bootstrap.h
src/include/bootstrap/bootstrap.h
+5
-3
src/include/commands/async.h
src/include/commands/async.h
+2
-1
src/include/config.h
src/include/config.h
+2
-1
src/include/rewrite/locks.h
src/include/rewrite/locks.h
+4
-1
src/include/storage/fd.h
src/include/storage/fd.h
+2
-1
src/include/storage/lmgr.h
src/include/storage/lmgr.h
+4
-1
src/include/storage/smgr.h
src/include/storage/smgr.h
+4
-1
src/interfaces/libpq/Makefile
src/interfaces/libpq/Makefile
+15
-14
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-lobj.c
+2
-1
src/interfaces/libpq/pqsignal.c
src/interfaces/libpq/pqsignal.c
+3
-1
No files found.
src/backend/bootstrap/Makefile
View file @
4b2b8592
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Makefile for the bootstrap module
# Makefile for the bootstrap module
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.
1 1996/10/27 09:46:59 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.
2 1996/11/08 05:55:46 momjian
Exp $
#
#
#
#
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
...
@@ -26,7 +26,7 @@ INCLUDE_OPT = -I.. \
...
@@ -26,7 +26,7 @@ INCLUDE_OPT = -I.. \
-I
../include
\
-I
../include
\
-I
../../include
-I
../../include
CFLAGS
+=
$(INCLUDE_OPT)
CFLAGS
+=
$(INCLUDE_OPT)
-Wno-error
BOOTYACCS
=
bootstrap_tokens.h bootparse.c
BOOTYACCS
=
bootstrap_tokens.h bootparse.c
...
...
This diff is collapsed.
Click to expand it.
src/backend/commands/define.c
View file @
4b2b8592
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.
6 1996/11/06 08:21:34 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.
7 1996/11/08 05:55:49 momjian
Exp $
*
*
* DESCRIPTION
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
* The "DefineFoo" routines take the parse tree and pick out the
...
@@ -136,8 +136,9 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
...
@@ -136,8 +136,9 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
*/
*/
*
byte_pct_p
=
atoi
(
param
->
val
);
*
byte_pct_p
=
atoi
(
param
->
val
);
}
else
if
(
strcasecmp
(
param
->
name
,
"perbyte_cpu"
)
==
0
)
{
}
else
if
(
strcasecmp
(
param
->
name
,
"perbyte_cpu"
)
==
0
)
{
count
=
0
;
if
(
sscanf
(
param
->
val
,
"%d"
,
perbyte_cpu_p
)
==
0
)
{
if
(
sscanf
(
param
->
val
,
"%d"
,
perbyte_cpu_p
)
==
0
)
{
for
(
count
=
0
,
ptr
=
param
->
val
;
*
ptr
!=
'\0'
;
ptr
++
)
for
(
ptr
=
param
->
val
;
*
ptr
!=
'\0'
;
ptr
++
)
if
(
*
ptr
==
'!'
)
count
++
;
if
(
*
ptr
==
'!'
)
count
++
;
}
}
*
perbyte_cpu_p
=
(
int
)
pow
(
10
.
0
,
(
double
)
count
);
*
perbyte_cpu_p
=
(
int
)
pow
(
10
.
0
,
(
double
)
count
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/execJunk.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.
2 1996/10/31 10:11:23 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.
3 1996/11/08 05:55:55 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include "postgres.h"
#include "postgres.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "access/heaptuple.h"
#include "access/heapam.h"
#include "executor/executor.h"
#include "executor/executor.h"
#include "nodes/relation.h"
#include "nodes/relation.h"
#include "optimizer/tlist.h"
/* for MakeTLE */
#include "optimizer/tlist.h"
/* for MakeTLE */
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/execTuples.c
View file @
4b2b8592
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.
2 1996/10/31 10:11:38 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.
3 1996/11/08 05:56:01 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -116,6 +116,8 @@
...
@@ -116,6 +116,8 @@
* and the TupleTableSlot node in execnodes.h.
* and the TupleTableSlot node in execnodes.h.
*
*
*/
*/
#include <string.h>
#include "postgres.h"
#include "postgres.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/nodeGroup.c
View file @
4b2b8592
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* columns. (ie. tuples from the same group are consecutive)
* columns. (ie. tuples from the same group are consecutive)
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.
2 1996/10/31 10:11:59 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.
3 1996/11/08 05:56:08 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "access/heapam.h"
#include "access/heapam.h"
#include "catalog/catalog.h"
#include "catalog/catalog.h"
#include "access/printtup.h"
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/nodeGroup.h"
#include "executor/nodeGroup.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/nodeNestloop.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.
2 1996/10/31 10:12:14 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.
3 1996/11/08 05:56:15 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "postgres.h"
#include "postgres.h"
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/execdebug.h"
#include "executor/nodeNestloop.h"
#include "executor/nodeNestloop.h"
#include "executor/nodeIndexscan.h"
#include "executor/nodeIndexscan.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/nodeSeqscan.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.
2 1996/10/31 10:12:20 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.
3 1996/11/08 05:56:16 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
#include "postgres.h"
#include "postgres.h"
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/execdebug.h"
#include "executor/nodeSeqscan.h"
#include "executor/nodeSeqscan.h"
#include "access/heapam.h"
#include "parser/parsetree.h"
#include "parser/parsetree.h"
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/nodeSort.c
View file @
4b2b8592
...
@@ -7,17 +7,20 @@
...
@@ -7,17 +7,20 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.
3 1996/10/31 10:12:22 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.
4 1996/11/08 05:56:17 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include "postgres.h"
#include "postgres.h"
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/execdebug.h"
#include "executor/nodeSort.h"
#include "executor/nodeSort.h"
#include "access/heapam.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "utils/psort.h"
#include "utils/psort.h"
#include "catalog/catalog.h"
#include "catalog/catalog.h"
#include "catalog/heap.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
#include "optimizer/internal.h"
/* for _TEMP_RELATION_ID_ */
#include "optimizer/internal.h"
/* for _TEMP_RELATION_ID_ */
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/nodeUnique.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.
3 1996/10/31 10:12:26 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeUnique.c,v 1.
4 1996/11/08 05:56:19 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#include "executor/executor.h"
#include "executor/executor.h"
#include "executor/nodeUnique.h"
#include "executor/nodeUnique.h"
#include "optimizer/clauses.h"
#include "optimizer/clauses.h"
#include "access/heapam.h"
#include "access/heaptuple.h"
#include "access/printtup.h"
/* for typtoout() */
#include "access/printtup.h"
/* for typtoout() */
#include "utils/builtins.h"
/* for namecpy()*/
#include "utils/builtins.h"
/* for namecpy()*/
...
@@ -128,6 +130,10 @@ ExecUnique(Unique *node)
...
@@ -128,6 +130,10 @@ ExecUnique(Unique *node)
tupDesc
=
ExecGetResultType
(
uniquestate
);
tupDesc
=
ExecGetResultType
(
uniquestate
);
typoutput
=
typtoout
((
Oid
)
tupDesc
->
attrs
[
uniqueAttrNum
-
1
]
->
atttypid
);
typoutput
=
typtoout
((
Oid
)
tupDesc
->
attrs
[
uniqueAttrNum
-
1
]
->
atttypid
);
}
}
else
{
/* keep compiler quiet */
tupDesc
=
NULL
;
typoutput
=
0
;
}
/* ----------------
/* ----------------
* now loop, returning only non-duplicate tuples.
* now loop, returning only non-duplicate tuples.
...
...
This diff is collapsed.
Click to expand it.
src/backend/libpq/pqcomm.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.
5 1996/11/06 08:48:30 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.
6 1996/11/08 05:56:21 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -181,7 +181,7 @@ pq_flush()
...
@@ -181,7 +181,7 @@ pq_flush()
int
int
pq_getstr
(
char
*
s
,
int
maxlen
)
pq_getstr
(
char
*
s
,
int
maxlen
)
{
{
int
c
;
int
c
=
'\0'
;
if
(
Pfin
==
(
FILE
*
)
NULL
)
{
if
(
Pfin
==
(
FILE
*
)
NULL
)
{
/* elog(DEBUG, "Input descriptor is null"); */
/* elog(DEBUG, "Input descriptor is null"); */
...
@@ -266,7 +266,7 @@ PQputline(char *s)
...
@@ -266,7 +266,7 @@ PQputline(char *s)
int
int
pq_getnchar
(
char
*
s
,
int
off
,
int
maxlen
)
pq_getnchar
(
char
*
s
,
int
off
,
int
maxlen
)
{
{
int
c
;
int
c
=
'\0'
;
if
(
Pfin
==
(
FILE
*
)
NULL
)
{
if
(
Pfin
==
(
FILE
*
)
NULL
)
{
/* elog(DEBUG, "Input descriptor is null"); */
/* elog(DEBUG, "Input descriptor is null"); */
...
...
This diff is collapsed.
Click to expand it.
src/backend/main/main.c
View file @
4b2b8592
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.
1.1.1 1996/07/09 06:21:32 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.
2 1996/11/08 05:56:27 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include <string.h>
#include "
c
.h"
#include "
postgres
.h"
#include "miscadmin.h"
#include "miscadmin.h"
#include "bootstrap/bootstrap.h"
/* for BootstrapMain() */
#include "bootstrap/bootstrap.h"
/* for BootstrapMain() */
#include "tcop/tcopprot.h"
/* for PostgresMain() */
#include "tcop/tcopprot.h"
/* for PostgresMain() */
...
...
This diff is collapsed.
Click to expand it.
src/backend/nodes/copyfuncs.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
2 1996/08/19 13:32:14 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.
3 1996/11/08 05:56:35 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -39,7 +39,7 @@ List *
...
@@ -39,7 +39,7 @@ List *
listCopy
(
List
*
list
)
listCopy
(
List
*
list
)
{
{
List
*
newlist
=
NIL
;
List
*
newlist
=
NIL
;
List
*
l
,
*
nl
;
List
*
l
,
*
nl
=
NIL
;
foreach
(
l
,
list
)
{
foreach
(
l
,
list
)
{
if
(
newlist
==
NIL
)
{
if
(
newlist
==
NIL
)
{
...
@@ -1653,7 +1653,7 @@ copyObject(void *from)
...
@@ -1653,7 +1653,7 @@ copyObject(void *from)
case
T_List
:
case
T_List
:
{
{
List
*
list
=
from
,
*
l
;
List
*
list
=
from
,
*
l
;
List
*
newlist
=
NIL
,
*
nl
;
List
*
newlist
=
NIL
,
*
nl
=
NIL
;
foreach
(
l
,
list
)
{
foreach
(
l
,
list
)
{
if
(
newlist
==
NIL
)
{
if
(
newlist
==
NIL
)
{
newlist
=
nl
=
lcons
(
copyObject
(
lfirst
(
l
)),
NIL
);
newlist
=
nl
=
lcons
(
copyObject
(
lfirst
(
l
)),
NIL
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/nodes/equalfuncs.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.
2 1996/08/26 06:30:51 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.
3 1996/11/08 05:56:39 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -570,7 +570,7 @@ _equalValue(Value *a, Value *b)
...
@@ -570,7 +570,7 @@ _equalValue(Value *a, Value *b)
bool
bool
equal
(
void
*
a
,
void
*
b
)
equal
(
void
*
a
,
void
*
b
)
{
{
bool
retval
;
bool
retval
=
false
;
if
(
a
==
b
)
if
(
a
==
b
)
return
(
true
);
return
(
true
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/nodes/outfuncs.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.
1.1.1 1996/07/09 06:21:33 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.
2 1996/11/08 05:56:43 momjian
Exp $
*
*
* NOTES
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
* Every (plan) node in POSTGRES has an associated "out" routine which
...
@@ -548,7 +548,7 @@ static void
...
@@ -548,7 +548,7 @@ static void
_outExpr
(
StringInfo
str
,
Expr
*
node
)
_outExpr
(
StringInfo
str
,
Expr
*
node
)
{
{
char
buf
[
500
];
char
buf
[
500
];
char
*
opstr
;
char
*
opstr
=
NULL
;
sprintf
(
buf
,
"EXPR"
);
sprintf
(
buf
,
"EXPR"
);
appendStringInfo
(
str
,
buf
);
appendStringInfo
(
str
,
buf
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/nodes/read.c
View file @
4b2b8592
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
1.1.1 1996/07/09 06:21:33 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.
2 1996/11/08 05:56:48 momjian
Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -64,7 +64,7 @@ stringToNode(char *str)
...
@@ -64,7 +64,7 @@ stringToNode(char *str)
static
NodeTag
static
NodeTag
nodeTokenType
(
char
*
token
,
int
length
)
nodeTokenType
(
char
*
token
,
int
length
)
{
{
NodeTag
retval
;
NodeTag
retval
=
0
;
/*
/*
* Check if the token is a number (decimal or integer,
* Check if the token is a number (decimal or integer,
...
@@ -168,7 +168,7 @@ nodeRead(bool read_car_only)
...
@@ -168,7 +168,7 @@ nodeRead(bool read_car_only)
{
{
char
*
token
;
char
*
token
;
NodeTag
type
;
NodeTag
type
;
Node
*
this_value
,
*
return_value
;
Node
*
this_value
=
NULL
,
*
return_value
=
NULL
;
int
tok_len
;
int
tok_len
;
char
tmp
;
char
tmp
;
bool
make_dotted_pair_cell
=
false
;
bool
make_dotted_pair_cell
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/nodes/readfuncs.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.
2 1996/07/31 02:18:48 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.
3 1996/11/08 05:56:49 momjian
Exp $
*
*
* NOTES
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
* Most of the read functions for plan nodes are tested. (In fact, they
...
@@ -1047,7 +1047,7 @@ _readEState()
...
@@ -1047,7 +1047,7 @@ _readEState()
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
sscanf
(
token
,
"%x"
,
&
local_node
->
es_result_relation_info
);
sscanf
(
token
,
"%x"
,
(
unsigned
int
*
)
&
local_node
->
es_result_relation_info
);
return
(
local_node
);
return
(
local_node
);
}
}
...
@@ -1117,13 +1117,13 @@ _readRel()
...
@@ -1117,13 +1117,13 @@ _readRel()
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
sscanf
(
token
,
"%x"
,
&
local_node
->
unorderedpath
);
sscanf
(
token
,
"%x"
,
(
unsigned
int
*
)
&
local_node
->
unorderedpath
);
token
=
lsptok
(
NULL
,
&
length
);
/* get :cheapestpath */
token
=
lsptok
(
NULL
,
&
length
);
/* get :cheapestpath */
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* get @ */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
token
=
lsptok
(
NULL
,
&
length
);
/* now read it */
sscanf
(
token
,
"%x"
,
&
local_node
->
cheapestpath
);
sscanf
(
token
,
"%x"
,
(
unsigned
int
*
)
&
local_node
->
cheapestpath
);
token
=
lsptok
(
NULL
,
&
length
);
/* get :clauseinfo */
token
=
lsptok
(
NULL
,
&
length
);
/* get :clauseinfo */
...
@@ -1792,7 +1792,7 @@ parsePlanString()
...
@@ -1792,7 +1792,7 @@ parsePlanString()
{
{
char
*
token
;
char
*
token
;
int
length
;
int
length
;
void
*
return_value
;
void
*
return_value
=
NULL
;
token
=
lsptok
(
NULL
,
&
length
);
token
=
lsptok
(
NULL
,
&
length
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/optimizer/path/allpaths.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.
2 1996/11/06 09:29:03 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.
3 1996/11/08 05:56:52 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -255,7 +255,7 @@ print_path(Query *root, Path *path, int indent)
...
@@ -255,7 +255,7 @@ print_path(Query *root, Path *path, int indent)
{
{
char
*
ptype
=
NULL
;
char
*
ptype
=
NULL
;
JoinPath
*
jp
;
JoinPath
*
jp
;
bool
join
;
bool
join
=
false
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
indent
;
i
++
)
for
(
i
=
0
;
i
<
indent
;
i
++
)
...
...
This diff is collapsed.
Click to expand it.
src/backend/optimizer/path/indxpath.c
View file @
4b2b8592
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.
3 1996/09/10 06:48:12 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.
4 1996/11/08 05:56:55 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -981,6 +981,7 @@ indexable_joinclauses(Rel *rel, Rel *index, List *joininfo_list)
...
@@ -981,6 +981,7 @@ indexable_joinclauses(Rel *rel, Rel *index, List *joininfo_list)
* the list of clause info contains join clauses and restriction clauses.
* the list of clause info contains join clauses and restriction clauses.
* This routine returns the restriction clauses only.
* This routine returns the restriction clauses only.
*/
*/
#ifdef NOT_USED
static
List
*
static
List
*
extract_restrict_clauses
(
List
*
clausegroup
)
extract_restrict_clauses
(
List
*
clausegroup
)
{
{
...
@@ -996,6 +997,7 @@ extract_restrict_clauses(List *clausegroup)
...
@@ -996,6 +997,7 @@ extract_restrict_clauses(List *clausegroup)
}
}
return
restrict_cls
;
return
restrict_cls
;
}
}
#endif
/*
/*
* index-innerjoin--
* index-innerjoin--
...
...
This diff is collapsed.
Click to expand it.
src/backend/optimizer/path/prune.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.
1.1.1 1996/07/09 06:21:36 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.
2 1996/11/08 05:57:01 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -95,7 +95,7 @@ prune_rel_paths(List *rel_list)
...
@@ -95,7 +95,7 @@ prune_rel_paths(List *rel_list)
{
{
List
*
x
=
NIL
;
List
*
x
=
NIL
;
List
*
y
=
NIL
;
List
*
y
=
NIL
;
Path
*
path
;
Path
*
path
=
NULL
;
Rel
*
rel
=
(
Rel
*
)
NULL
;
Rel
*
rel
=
(
Rel
*
)
NULL
;
JoinPath
*
cheapest
=
(
JoinPath
*
)
NULL
;
JoinPath
*
cheapest
=
(
JoinPath
*
)
NULL
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/optimizer/plan/createplan.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
5 1996/11/06 09:29:10 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.
6 1996/11/08 05:57:08 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -156,7 +156,7 @@ static Scan *
...
@@ -156,7 +156,7 @@ static Scan *
create_scan_node
(
Path
*
best_path
,
List
*
tlist
)
create_scan_node
(
Path
*
best_path
,
List
*
tlist
)
{
{
Scan
*
node
;
Scan
*
node
=
NULL
;
List
*
scan_clauses
;
List
*
scan_clauses
;
/*
/*
...
@@ -208,7 +208,7 @@ create_join_node(JoinPath *best_path, List *tlist)
...
@@ -208,7 +208,7 @@ create_join_node(JoinPath *best_path, List *tlist)
Plan
*
inner_node
;
Plan
*
inner_node
;
List
*
inner_tlist
;
List
*
inner_tlist
;
List
*
clauses
;
List
*
clauses
;
Join
*
retval
;
Join
*
retval
=
NULL
;
outer_node
=
create_plan
((
Path
*
)
best_path
->
outerjoinpath
);
outer_node
=
create_plan
((
Path
*
)
best_path
->
outerjoinpath
);
outer_tlist
=
outer_node
->
targetlist
;
outer_tlist
=
outer_node
->
targetlist
;
...
@@ -803,7 +803,7 @@ make_temp(List *tlist,
...
@@ -803,7 +803,7 @@ make_temp(List *tlist,
int
temptype
)
int
temptype
)
{
{
List
*
temp_tlist
;
List
*
temp_tlist
;
Temp
*
retval
;
Temp
*
retval
=
NULL
;
/* Create a new target list for the temporary, with keys set. */
/* Create a new target list for the temporary, with keys set. */
temp_tlist
=
set_temp_tlist_operators
(
new_unsorted_tlist
(
tlist
),
temp_tlist
=
set_temp_tlist_operators
(
new_unsorted_tlist
(
tlist
),
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/Makefile
View file @
4b2b8592
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Makefile for parser
# Makefile for parser
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.
1 1996/10/27 09:49:05 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.
2 1996/11/08 05:57:18 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -16,7 +16,7 @@ INCLUDE_OPT = -I.. \
...
@@ -16,7 +16,7 @@ INCLUDE_OPT = -I.. \
-I
../include
\
-I
../include
\
-I
../../include
-I
../../include
CFLAGS
+=
$(INCLUDE_OPT)
CFLAGS
+=
$(INCLUDE_OPT)
-Wno-error
OBJS
=
analyze.o catalog_utils.o dbcommands.o gram.o
\
OBJS
=
analyze.o catalog_utils.o dbcommands.o gram.o
\
keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
keywords.o parser.o parse_query.o scan.o scansup.o sysfunc.o
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/analyze.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.1
2 1996/11/06 06:48:20 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.1
3 1996/11/08 05:57:25 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -274,7 +274,6 @@ static Query *
...
@@ -274,7 +274,6 @@ static Query *
transformInsertStmt
(
ParseState
*
pstate
,
AppendStmt
*
stmt
)
transformInsertStmt
(
ParseState
*
pstate
,
AppendStmt
*
stmt
)
{
{
Query
*
qry
=
makeNode
(
Query
);
/* make a new query tree */
Query
*
qry
=
makeNode
(
Query
);
/* make a new query tree */
List
*
targetlist
;
qry
->
commandType
=
CMD_INSERT
;
qry
->
commandType
=
CMD_INSERT
;
pstate
->
p_is_insert
=
true
;
pstate
->
p_is_insert
=
true
;
...
@@ -531,7 +530,7 @@ transformCursorStmt(ParseState *pstate, CursorStmt *stmt)
...
@@ -531,7 +530,7 @@ transformCursorStmt(ParseState *pstate, CursorStmt *stmt)
static
Node
*
static
Node
*
transformExpr
(
ParseState
*
pstate
,
Node
*
expr
)
transformExpr
(
ParseState
*
pstate
,
Node
*
expr
)
{
{
Node
*
result
;
Node
*
result
=
NULL
;
if
(
expr
==
NULL
)
if
(
expr
==
NULL
)
return
NULL
;
return
NULL
;
...
@@ -809,7 +808,7 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
...
@@ -809,7 +808,7 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
Oid
Oid
exprType
(
Node
*
expr
)
exprType
(
Node
*
expr
)
{
{
Oid
type
;
Oid
type
=
(
Oid
)
0
;
switch
(
nodeTag
(
expr
))
{
switch
(
nodeTag
(
expr
))
{
case
T_Func
:
case
T_Func
:
...
@@ -1426,7 +1425,7 @@ static Resdom *
...
@@ -1426,7 +1425,7 @@ static Resdom *
find_tl_elt
(
ParseState
*
pstate
,
char
*
refname
,
char
*
colname
,
List
*
tlist
)
find_tl_elt
(
ParseState
*
pstate
,
char
*
refname
,
char
*
colname
,
List
*
tlist
)
{
{
List
*
i
;
List
*
i
;
int
real_rtable_pos
;
int
real_rtable_pos
=
0
;
if
(
refname
)
if
(
refname
)
real_rtable_pos
=
refnameRangeTablePosn
(
pstate
->
p_rtable
,
refname
);
real_rtable_pos
=
refnameRangeTablePosn
(
pstate
->
p_rtable
,
refname
);
...
@@ -1471,7 +1470,7 @@ any_ordering_op(int restype)
...
@@ -1471,7 +1470,7 @@ any_ordering_op(int restype)
static
List
*
static
List
*
transformGroupClause
(
ParseState
*
pstate
,
List
*
grouplist
)
transformGroupClause
(
ParseState
*
pstate
,
List
*
grouplist
)
{
{
List
*
glist
=
NIL
,
*
gl
;
List
*
glist
=
NIL
,
*
gl
=
NIL
;
while
(
grouplist
!=
NIL
)
{
while
(
grouplist
!=
NIL
)
{
GroupClause
*
grpcl
=
makeNode
(
GroupClause
);
GroupClause
*
grpcl
=
makeNode
(
GroupClause
);
...
@@ -1505,7 +1504,7 @@ transformSortClause(ParseState *pstate,
...
@@ -1505,7 +1504,7 @@ transformSortClause(ParseState *pstate,
char
*
uniqueFlag
)
char
*
uniqueFlag
)
{
{
List
*
sortlist
=
NIL
;
List
*
sortlist
=
NIL
;
List
*
s
,
*
i
;
List
*
s
=
NIL
,
*
i
;
while
(
orderlist
!=
NIL
)
{
while
(
orderlist
!=
NIL
)
{
SortBy
*
sortby
=
lfirst
(
orderlist
);
SortBy
*
sortby
=
lfirst
(
orderlist
);
...
@@ -1555,7 +1554,7 @@ transformSortClause(ParseState *pstate,
...
@@ -1555,7 +1554,7 @@ transformSortClause(ParseState *pstate,
}
}
}
}
else
{
else
{
TargetEntry
*
tlelt
;
TargetEntry
*
tlelt
=
NULL
;
char
*
uniqueAttrName
=
uniqueFlag
;
char
*
uniqueAttrName
=
uniqueFlag
;
/* only create sort clause with the specified unique attribute */
/* only create sort clause with the specified unique attribute */
...
@@ -1873,12 +1872,12 @@ static Node *
...
@@ -1873,12 +1872,12 @@ static Node *
ParseFunc
(
ParseState
*
pstate
,
char
*
funcname
,
List
*
fargs
,
int
*
curr_resno
)
ParseFunc
(
ParseState
*
pstate
,
char
*
funcname
,
List
*
fargs
,
int
*
curr_resno
)
{
{
Oid
rettype
=
(
Oid
)
0
;
Oid
rettype
=
(
Oid
)
0
;
Oid
argrelid
;
Oid
argrelid
=
(
Oid
)
0
;
Oid
funcid
=
(
Oid
)
0
;
Oid
funcid
=
(
Oid
)
0
;
List
*
i
=
NIL
;
List
*
i
=
NIL
;
Node
*
first_arg
=
NULL
;
Node
*
first_arg
=
NULL
;
char
*
relname
;
char
*
relname
=
NULL
;
char
*
refname
;
char
*
refname
=
NULL
;
Relation
rd
;
Relation
rd
;
Oid
relid
;
Oid
relid
;
int
nargs
;
int
nargs
;
...
@@ -1889,7 +1888,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
...
@@ -1889,7 +1888,7 @@ ParseFunc(ParseState *pstate, char *funcname, List *fargs, int *curr_resno)
bool
retset
;
bool
retset
;
bool
exists
;
bool
exists
;
bool
attisset
=
false
;
bool
attisset
=
false
;
Oid
toid
;
Oid
toid
=
(
Oid
)
0
;
Expr
*
expr
;
Expr
*
expr
;
if
(
fargs
)
{
if
(
fargs
)
{
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/catalog_utils.c
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.
7 1996/11/06 06:48:23 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.
8 1996/11/08 05:57:29 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1423,7 +1423,7 @@ FindDelimiter(char *typename)
...
@@ -1423,7 +1423,7 @@ FindDelimiter(char *typename)
void
void
op_error
(
char
*
op
,
int
arg1
,
int
arg2
)
op_error
(
char
*
op
,
int
arg1
,
int
arg2
)
{
{
Type
tp1
,
tp2
;
Type
tp1
=
NULL
,
tp2
=
NULL
;
if
(
check_typeid
(
arg1
))
{
if
(
check_typeid
(
arg1
))
{
tp1
=
get_id_type
(
arg1
);
tp1
=
get_id_type
(
arg1
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/dbcommands.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
1.1.1 1996/07/09 06:21:40 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.
2 1996/11/08 05:57:31 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -153,7 +153,7 @@ check_permissions(char *command,
...
@@ -153,7 +153,7 @@ check_permissions(char *command,
{
{
Relation
dbrel
;
Relation
dbrel
;
HeapTuple
dbtup
,
utup
;
HeapTuple
dbtup
,
utup
;
Oid
dbowner
;
Oid
dbowner
=
(
Oid
)
0
;
char
use_createdb
;
char
use_createdb
;
bool
dbfound
;
bool
dbfound
;
bool
use_super
;
bool
use_super
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/parser.c
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.
5 1996/11/06 06:48:26 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.
6 1996/11/08 05:57:33 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -37,12 +37,18 @@
...
@@ -37,12 +37,18 @@
#include "nodes/makefuncs.h"
#include "nodes/makefuncs.h"
#include "optimizer/clauses.h"
#include "optimizer/clauses.h"
void
init_io
();
/* from scan.l */
void
parser_init
(
Oid
*
typev
,
int
nargs
);
/* from gram.y */
int
yyparse
();
/* from gram.c */
char
*
parseString
;
/* the char* which holds the string to be parsed */
char
*
parseString
;
/* the char* which holds the string to be parsed */
char
*
parseCh
;
/* a pointer used during parsing to walk down ParseString*/
char
*
parseCh
;
/* a pointer used during parsing to walk down ParseString*/
List
*
parsetree
=
NIL
;
List
*
parsetree
=
NIL
;
#ifdef SETS_FIXED
static
void
fixupsets
();
static
void
fixupsets
();
#endif
static
void
define_sets
();
static
void
define_sets
();
/*
/*
* parser-- returns a list of parse trees
* parser-- returns a list of parse trees
...
@@ -99,6 +105,7 @@ parser(char *str, Oid *typev, int nargs)
...
@@ -99,6 +105,7 @@ parser(char *str, Oid *typev, int nargs)
return
queryList
;
return
queryList
;
}
}
#ifdef SETS_FIXED
static
void
static
void
fixupsets
(
Query
*
parse
)
fixupsets
(
Query
*
parse
)
{
{
...
@@ -110,6 +117,7 @@ fixupsets(Query *parse)
...
@@ -110,6 +117,7 @@ fixupsets(Query *parse)
return
;
return
;
define_sets
(
parse
);
define_sets
(
parse
);
}
}
#endif
/* Recursively find all of the Consts in the parsetree. Some of
/* Recursively find all of the Consts in the parsetree. Some of
* these may represent a set. The value of the Const will be the
* these may represent a set. The value of the Const will be the
...
@@ -180,7 +188,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
...
@@ -180,7 +188,7 @@ parser_typecast(Value *expr, TypeName *typename, int typlen)
char
type_string
[
16
];
char
type_string
[
16
];
int32
len
;
int32
len
;
char
*
cp
=
NULL
;
char
*
cp
=
NULL
;
char
*
const_string
;
char
*
const_string
=
NULL
;
bool
string_palloced
=
false
;
bool
string_palloced
=
false
;
switch
(
nodeTag
(
expr
))
{
switch
(
nodeTag
(
expr
))
{
...
@@ -297,7 +305,7 @@ parser_typecast2(Node *expr, int exprType, Type tp, int typlen)
...
@@ -297,7 +305,7 @@ parser_typecast2(Node *expr, int exprType, Type tp, int typlen)
int32
len
=
tlen
(
tp
);
int32
len
=
tlen
(
tp
);
char
*
cp
=
NULL
;
char
*
cp
=
NULL
;
char
*
const_string
;
char
*
const_string
=
NULL
;
bool
string_palloced
=
false
;
bool
string_palloced
=
false
;
Assert
(
IsA
(
expr
,
Const
));
Assert
(
IsA
(
expr
,
Const
));
...
...
This diff is collapsed.
Click to expand it.
src/backend/parser/sysfunc.c
View file @
4b2b8592
...
@@ -33,10 +33,10 @@ char *Sysfunc_system_date(void)
...
@@ -33,10 +33,10 @@ char *Sysfunc_system_date(void)
time
(
&
cur_time_secs
);
time
(
&
cur_time_secs
);
cur_time_expanded
=
localtime
(
&
cur_time_secs
);
cur_time_expanded
=
localtime
(
&
cur_time_secs
);
#if defined(EUROPEAN_DATES)
#if defined(EUROPEAN_DATES)
sprintf
(
buf
,
"%
02.2d-%02.2d-%0
4.4d"
,
cur_time_expanded
->
tm_mday
,
sprintf
(
buf
,
"%
2.2d-%2.2d-%
4.4d"
,
cur_time_expanded
->
tm_mday
,
cur_time_expanded
->
tm_mon
+
1
,
cur_time_expanded
->
tm_year
+
1900
);
cur_time_expanded
->
tm_mon
+
1
,
cur_time_expanded
->
tm_year
+
1900
);
#else
#else
sprintf
(
buf
,
"%
02.2d-%02.2d-%0
4.4d"
,
cur_time_expanded
->
tm_mon
+
1
,
sprintf
(
buf
,
"%
2.2d-%2.2d-%
4.4d"
,
cur_time_expanded
->
tm_mon
+
1
,
cur_time_expanded
->
tm_mday
,
cur_time_expanded
->
tm_year
+
1900
);
cur_time_expanded
->
tm_mday
,
cur_time_expanded
->
tm_year
+
1900
);
#endif
#endif
return
&
buf
[
0
];
return
&
buf
[
0
];
...
...
This diff is collapsed.
Click to expand it.
src/backend/port/bsdi/port-protos.h
View file @
4b2b8592
...
@@ -18,7 +18,12 @@
...
@@ -18,7 +18,12 @@
/* dynloader.c */
/* dynloader.c */
#define SAVE_MAXPATHLEN MAXPATHLEN
#undef MAXPATHLEN
/* prevent compiler warning */
#include <sys/param.h>
#include <sys/param.h>
#undef MAXPATHLEN
#define MAXPATHLEN SAVE_MAXPATHLEN
#undef SAVE_MAXPATHLEN
#if _BSDI_VERSION >= 199510
#if _BSDI_VERSION >= 199510
# include <dlfcn.h>
# include <dlfcn.h>
...
...
This diff is collapsed.
Click to expand it.
src/backend/postmaster/postmaster.c
View file @
4b2b8592
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.2
0 1996/11/03 04:48:26 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.2
1 1996/11/08 05:57:41 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -32,10 +32,16 @@
...
@@ -32,10 +32,16 @@
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
/* moved here to prevent double define */
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#ifndef MAXHOSTNAMELEN
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
#endif
#include "postgres.h"
#include "postgres.h"
#include <signal.h>
/* for other stuff */
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -47,10 +53,6 @@
...
@@ -47,10 +53,6 @@
#include <sys/types.h>
/* for fd_set stuff */
#include <sys/types.h>
/* for fd_set stuff */
#include <sys/stat.h>
/* for umask */
#include <sys/stat.h>
/* for umask */
#include <sys/time.h>
#include <sys/time.h>
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#ifndef MAXHOSTNAMELEN
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
#endif
#include <sys/socket.h>
#include <sys/socket.h>
#if defined(USE_LIMITS_H)
#if defined(USE_LIMITS_H)
# include <machine/limits.h>
# include <machine/limits.h>
...
@@ -1098,8 +1100,8 @@ DoExec(StartupInfo *packet, int portFd)
...
@@ -1098,8 +1100,8 @@ DoExec(StartupInfo *packet, int portFd)
av
[
ac
]
=
(
char
*
)
NULL
;
av
[
ac
]
=
(
char
*
)
NULL
;
if
(
DebugLvl
>
1
)
{
if
(
DebugLvl
>
1
)
{
fprintf
(
stderr
,
"%s child[%d]: execv("
,
fprintf
(
stderr
,
"%s child[%
l
d]: execv("
,
progname
,
getpid
());
progname
,
(
long
)
getpid
());
for
(
i
=
0
;
i
<
ac
;
++
i
)
for
(
i
=
0
;
i
<
ac
;
++
i
)
fprintf
(
stderr
,
"%s, "
,
av
[
i
]);
fprintf
(
stderr
,
"%s, "
,
av
[
i
]);
fprintf
(
stderr
,
")
\n
"
);
fprintf
(
stderr
,
")
\n
"
);
...
@@ -1166,10 +1168,10 @@ dumpstatus(SIGNAL_ARGS)
...
@@ -1166,10 +1168,10 @@ dumpstatus(SIGNAL_ARGS)
Port
*
port
=
DLE_VAL
(
curr
);
Port
*
port
=
DLE_VAL
(
curr
);
fprintf
(
stderr
,
"%s: dumpstatus:
\n
"
,
progname
);
fprintf
(
stderr
,
"%s: dumpstatus:
\n
"
,
progname
);
fprintf
(
stderr
,
"
\t
sock %d: nBytes=%d, laddr=0x%
x, raddr=0x%
x
\n
"
,
fprintf
(
stderr
,
"
\t
sock %d: nBytes=%d, laddr=0x%
lx, raddr=0x%l
x
\n
"
,
port
->
sock
,
port
->
nBytes
,
port
->
sock
,
port
->
nBytes
,
port
->
laddr
,
port
->
laddr
.
sin_addr
.
s_addr
,
port
->
raddr
);
port
->
raddr
.
sin_addr
.
s_addr
);
curr
=
DLGetSucc
(
curr
);
curr
=
DLGetSucc
(
curr
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/backend/regex/regcomp.c
View file @
4b2b8592
...
@@ -47,6 +47,7 @@ static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
...
@@ -47,6 +47,7 @@ static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
#include <ctype.h>
#include <ctype.h>
#include <limits.h>
#include <limits.h>
#include <stdlib.h>
#include <stdlib.h>
#include <assert.h>
#include <regex/regex.h>
#include <regex/regex.h>
#include <regex/utils.h>
#include <regex/utils.h>
...
@@ -284,8 +285,8 @@ register struct parse *p;
...
@@ -284,8 +285,8 @@ register struct parse *p;
int
stop
;
/* character this ERE should end at */
int
stop
;
/* character this ERE should end at */
{
{
register
char
c
;
register
char
c
;
register
sopno
prevback
;
register
sopno
prevback
=
0
;
register
sopno
prevfwd
;
register
sopno
prevfwd
=
0
;
register
sopno
conc
;
register
sopno
conc
;
register
int
first
=
1
;
/* is this the first alternative? */
register
int
first
=
1
;
/* is this the first alternative? */
...
@@ -1592,8 +1593,8 @@ struct parse *p;
...
@@ -1592,8 +1593,8 @@ struct parse *p;
register
struct
re_guts
*
g
;
register
struct
re_guts
*
g
;
{
{
register
sop
*
scan
;
register
sop
*
scan
;
sop
*
start
;
sop
*
start
=
0
;
register
sop
*
newstart
;
register
sop
*
newstart
=
0
;
register
sopno
newlen
;
register
sopno
newlen
;
register
sop
s
;
register
sop
s
;
register
char
*
cp
;
register
char
*
cp
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/regex/regerror.c
View file @
4b2b8592
...
@@ -47,6 +47,7 @@ static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
...
@@ -47,6 +47,7 @@ static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
#include <ctype.h>
#include <ctype.h>
#include <limits.h>
#include <limits.h>
#include <stdlib.h>
#include <stdlib.h>
#include <assert.h>
#include <regex/regex.h>
#include <regex/regex.h>
#include <regex/utils.h>
#include <regex/utils.h>
...
...
This diff is collapsed.
Click to expand it.
src/backend/regex/regexec.c
View file @
4b2b8592
...
@@ -54,6 +54,7 @@ static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
...
@@ -54,6 +54,7 @@ static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
#include <string.h>
#include <string.h>
#include <limits.h>
#include <limits.h>
#include <ctype.h>
#include <ctype.h>
#include <assert.h>
#include <regex/regex.h>
#include <regex/regex.h>
#include <regex/utils.h>
#include <regex/utils.h>
...
...
This diff is collapsed.
Click to expand it.
src/backend/rewrite/rewriteSupport.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.
2 1996/10/11 03:25:00 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.
3 1996/11/08 05:58:06 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
* given a rule oid, look it up and return the rule-event-qual and
* given a rule oid, look it up and return the rule-event-qual and
* list of parsetrees for the rule (in parseTrees)
* list of parsetrees for the rule (in parseTrees)
*/
*/
#ifdef NOT_USED
static
Node
*
static
Node
*
RuleIdGetActionInfo
(
Oid
ruleoid
,
bool
*
instead_flag
,
Query
**
parseTrees
)
RuleIdGetActionInfo
(
Oid
ruleoid
,
bool
*
instead_flag
,
Query
**
parseTrees
)
{
{
...
@@ -84,6 +85,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
...
@@ -84,6 +85,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
*
parseTrees
=
ruleparse
;
*
parseTrees
=
ruleparse
;
return
rule_evqual
;
return
rule_evqual
;
}
}
#endif
int
int
IsDefinedRewriteRule
(
char
*
ruleName
)
IsDefinedRewriteRule
(
char
*
ruleName
)
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/buffer/buf_init.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.
2 1996/11/03 04:56:58 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.
3 1996/11/08 05:58:09 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "storage/lmgr.h"
#include "storage/lmgr.h"
#include "miscadmin.h"
#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/dynahash.h"
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
#include "executor/execdebug.h"
/* for NDirectFileRead */
#include "executor/execdebug.h"
/* for NDirectFileRead */
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/buffer/bufmgr.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.
4 1996/11/03 04:57:00 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.
5 1996/11/08 05:58:11 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
*/
*/
#include <sys/file.h>
#include <sys/file.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <math.h>
#include <signal.h>
#include <signal.h>
...
@@ -69,6 +70,7 @@
...
@@ -69,6 +70,7 @@
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
#include "utils/relcache.h"
#include "executor/execdebug.h"
/* for NDirectFileRead */
#include "executor/execdebug.h"
/* for NDirectFileRead */
#include "catalog/catalog.h"
#include "catalog/catalog.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/buffer/localbuf.c
View file @
4b2b8592
...
@@ -15,12 +15,13 @@
...
@@ -15,12 +15,13 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.
2 1996/11/03 04:57:03 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.
3 1996/11/08 05:58:16 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <sys/file.h>
#include <sys/file.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <math.h>
#include <signal.h>
#include <signal.h>
...
@@ -41,6 +42,7 @@
...
@@ -41,6 +42,7 @@
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
#include "utils/relcache.h"
#include "executor/execdebug.h"
/* for NDirectFileRead */
#include "executor/execdebug.h"
/* for NDirectFileRead */
#include "catalog/catalog.h"
#include "catalog/catalog.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/file/fd.c
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Id: fd.c,v 1.
8 1996/11/06 06:48:51 scrappy
Exp $
* $Id: fd.c,v 1.
9 1996/11/08 05:58:21 momjian
Exp $
*
*
* NOTES:
* NOTES:
*
*
...
@@ -47,9 +47,10 @@
...
@@ -47,9 +47,10 @@
#include <sys/types.h>
#include <sys/types.h>
#include <fcntl.h>
#include <fcntl.h>
#include "
c
.h"
#include "
postgres
.h"
#include "miscadmin.h"
/* for DataDir */
#include "miscadmin.h"
/* for DataDir */
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "storage/fd.h"
#ifdef sparc
#ifdef sparc
/*
/*
...
@@ -200,7 +201,7 @@ static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
...
@@ -200,7 +201,7 @@ static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
static
char
*
filepath
(
char
*
filename
);
static
char
*
filepath
(
char
*
filename
);
int
int
pg_fsync
(
fd
)
pg_fsync
(
int
fd
)
{
{
extern
int
fsyncOff
;
extern
int
fsyncOff
;
return
fsyncOff
?
0
:
fsync
(
fd
);
return
fsyncOff
?
0
:
fsync
(
fd
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/ipc/ipc.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.
7 1996/11/06 06:49:01 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.
8 1996/11/08 05:58:30 momjian
Exp $
*
*
* NOTES
* NOTES
*
*
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/file.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <errno.h>
/* XXX - the following dependency should be moved into the defaults.mk file */
/* XXX - the following dependency should be moved into the defaults.mk file */
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/ipc/ipci.c
View file @
4b2b8592
...
@@ -7,10 +7,14 @@
...
@@ -7,10 +7,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.
3 1996/11/06 06:49:03 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipci.c,v 1.
4 1996/11/08 05:58:33 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include "postgres.h"
#include "postgres.h"
#include "storage/ipc.h"
#include "storage/ipc.h"
...
@@ -22,11 +26,6 @@
...
@@ -22,11 +26,6 @@
#include "storage/lock.h"
#include "storage/lock.h"
#include "miscadmin.h"
/* for DebugLvl */
#include "miscadmin.h"
/* for DebugLvl */
#if defined(sparc_solaris)
#include <string.h>
#include <sys/ipc.h>
#endif
/*
/*
* SystemPortAddressCreateMemoryKey --
* SystemPortAddressCreateMemoryKey --
* Returns a memory key given a port address.
* Returns a memory key given a port address.
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/ipc/shmem.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.
3 1996/11/03 05:06:57 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.
4 1996/11/08 05:58:36 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -425,7 +425,7 @@ ShmemPIDDestroy(int pid)
...
@@ -425,7 +425,7 @@ ShmemPIDDestroy(int pid)
{
{
BindingEnt
*
result
,
item
;
BindingEnt
*
result
,
item
;
bool
found
;
bool
found
;
SHMEM_OFFSET
location
;
SHMEM_OFFSET
location
=
0
;
Assert
(
BindingTable
);
Assert
(
BindingTable
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/large_object/inv_api.c
View file @
4b2b8592
...
@@ -8,12 +8,14 @@
...
@@ -8,12 +8,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.
4 1996/11/06 06:49:17 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.
5 1996/11/08 05:58:41 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
/* for sprintf() */
#include <stdio.h>
/* for sprintf() */
#include <string.h>
#include <sys/file.h>
#include <sys/file.h>
#include "postgres.h"
#include "postgres.h"
#include "miscadmin.h"
#include "miscadmin.h"
#include "libpq/libpq-fs.h"
#include "libpq/libpq-fs.h"
...
@@ -32,9 +34,12 @@
...
@@ -32,9 +34,12 @@
#include "storage/itemptr.h"
#include "storage/itemptr.h"
#include "storage/bufpage.h"
#include "storage/bufpage.h"
#include "storage/bufmgr.h"
#include "storage/bufmgr.h"
#include "storage/smgr.h"
#include "utils/rel.h"
#include "utils/rel.h"
#include "utils/relcache.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "storage/large_object.h"
#include "storage/large_object.h"
#include "storage/lmgr.h"
#include "utils/syscache.h"
#include "utils/syscache.h"
#include "utils/builtins.h"
/* for namestrcpy() */
#include "utils/builtins.h"
/* for namestrcpy() */
#include "catalog/heap.h"
#include "catalog/heap.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/lmgr/lmgr.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.
2 1996/11/03 05:07:26 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.
3 1996/11/08 05:58:47 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "storage/lmgr.h"
#include "storage/lmgr.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "utils/mcxt.h"
#include "utils/rel.h"
#include "utils/rel.h"
#include "catalog/catname.h"
#include "catalog/catname.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/lmgr/lock.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.
4 1996/11/03 05:07:29 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.
5 1996/11/08 05:58:51 momjian
Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -32,12 +32,16 @@
...
@@ -32,12 +32,16 @@
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
/* for sprintf() */
#include <stdio.h>
/* for sprintf() */
#include <string.h>
#include "postgres.h"
#include "postgres.h"
#include "storage/shmem.h"
#include "storage/shmem.h"
#include "storage/spin.h"
#include "storage/spin.h"
#include "storage/proc.h"
#include "storage/proc.h"
#include "storage/lock.h"
#include "storage/lock.h"
#include "utils/dynahash.h"
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/memutils.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "access/xact.h"
#include "access/xact.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/lmgr/proc.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.
8 1996/11/06 06:49:24 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.
9 1996/11/08 05:58:59 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -46,14 +46,17 @@
...
@@ -46,14 +46,17 @@
* This is so that we can support more backends. (system-wide semaphore
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
* sets run out pretty fast.) -ay 4/95
*
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.
8 1996/11/06 06:49:24 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.
9 1996/11/08 05:58:59 momjian
Exp $
*/
*/
#include <sys/time.h>
#include <sys/time.h>
#ifndef WIN32
#ifndef WIN32
#include <unistd.h>
#include <unistd.h>
#endif
/* WIN32 */
#endif
/* WIN32 */
#include <string.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#if defined(sparc_solaris)
#if defined(sparc_solaris)
#include <sys/ipc.h>
#include <sys/ipc.h>
...
@@ -69,6 +72,7 @@
...
@@ -69,6 +72,7 @@
#include "storage/buf.h"
#include "storage/buf.h"
#include "storage/lock.h"
#include "storage/lock.h"
#include "storage/lmgr.h"
#include "storage/shmem.h"
#include "storage/shmem.h"
#include "storage/spin.h"
#include "storage/spin.h"
#include "storage/proc.h"
#include "storage/proc.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/page/bufpage.c
View file @
4b2b8592
...
@@ -7,10 +7,11 @@
...
@@ -7,10 +7,11 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.
2 1996/11/03 05:07:44 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.
3 1996/11/08 05:59:03 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/file.h>
#include <sys/file.h>
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/smgr/md.c
View file @
4b2b8592
...
@@ -7,17 +7,20 @@
...
@@ -7,17 +7,20 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.
7 1996/11/04 04:53:2
7 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.
8 1996/11/08 05:59:0
7 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <unistd.h>
#include <stdio.h>
/* for sprintf() */
#include <stdio.h>
/* for sprintf() */
#include <string.h>
#include <sys/file.h>
#include <sys/file.h>
#include "postgres.h"
#include "postgres.h"
#include "miscadmin.h"
/* for DataDir */
#include "miscadmin.h"
/* for DataDir */
#include "storage/block.h"
#include "storage/block.h"
#include "storage/fd.h"
#include "storage/smgr.h"
/* where the declarations go */
#include "storage/smgr.h"
/* where the declarations go */
#include "storage/fd.h"
#include "storage/fd.h"
#include "utils/mcxt.h"
#include "utils/mcxt.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/smgr/mm.c
View file @
4b2b8592
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.
3 1996/11/03 05:07:57 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.
4 1996/11/08 05:59:11 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "storage/shmem.h"
#include "storage/shmem.h"
#include "storage/spin.h"
#include "storage/spin.h"
#include "utils/dynahash.h"
#include "utils/hsearch.h"
#include "utils/hsearch.h"
#include "utils/rel.h"
#include "utils/rel.h"
#include "utils/memutils.h"
#include "utils/memutils.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/storage/smgr/smgr.c
View file @
4b2b8592
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.
3 1996/11/03 05:08:00 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.
4 1996/11/08 05:59:15 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -83,7 +83,6 @@ int
...
@@ -83,7 +83,6 @@ int
smgrinit
()
smgrinit
()
{
{
int
i
;
int
i
;
extern
char
*
smgrout
();
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
if
(
smgrsw
[
i
].
smgr_init
)
{
if
(
smgrsw
[
i
].
smgr_init
)
{
...
@@ -102,7 +101,6 @@ void
...
@@ -102,7 +101,6 @@ void
smgrshutdown
(
int
dummy
)
smgrshutdown
(
int
dummy
)
{
{
int
i
;
int
i
;
extern
char
*
smgrout
();
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
if
(
smgrsw
[
i
].
smgr_shutdown
)
{
if
(
smgrsw
[
i
].
smgr_shutdown
)
{
...
@@ -331,7 +329,6 @@ int
...
@@ -331,7 +329,6 @@ int
smgrcommit
()
smgrcommit
()
{
{
int
i
;
int
i
;
extern
char
*
smgrout
();
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
if
(
smgrsw
[
i
].
smgr_commit
)
{
if
(
smgrsw
[
i
].
smgr_commit
)
{
...
@@ -347,7 +344,6 @@ int
...
@@ -347,7 +344,6 @@ int
smgrabort
()
smgrabort
()
{
{
int
i
;
int
i
;
extern
char
*
smgrout
();
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
for
(
i
=
0
;
i
<
NSmgr
;
i
++
)
{
if
(
smgrsw
[
i
].
smgr_abort
)
{
if
(
smgrsw
[
i
].
smgr_abort
)
{
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/Makefile
View file @
4b2b8592
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Makefile for tcop
# Makefile for tcop
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.
3 1996/11/03 06:52:27 scrappy
Exp $
# $Header: /cvsroot/pgsql/src/backend/tcop/Makefile,v 1.
4 1996/11/08 05:59:20 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -14,7 +14,7 @@ include ../../Makefile.global
...
@@ -14,7 +14,7 @@ include ../../Makefile.global
INCLUDE_OPT
=
-I
../port/
$(PORTNAME)
\
INCLUDE_OPT
=
-I
../port/
$(PORTNAME)
\
-I
../../include
-I
../../include
CFLAGS
+=
$(INCLUDE_OPT)
CFLAGS
+=
$(INCLUDE_OPT)
-Wno-error
OBJS
=
aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o
OBJS
=
aclchk.o dest.o fastpath.o postgres.o pquery.o utility.o
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/aclchk.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.
3 1996/11/03 06:52:29 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/Attic/aclchk.c,v 1.
4 1996/11/08 05:59:23 momjian
Exp $
*
*
* NOTES
* NOTES
* See acl.h.
* See acl.h.
...
@@ -22,12 +22,14 @@
...
@@ -22,12 +22,14 @@
#include "access/htup.h"
#include "access/htup.h"
#include "access/tupmacs.h"
#include "access/tupmacs.h"
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/memutils.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
#include "catalog/indexing.h"
#include "catalog/indexing.h"
#include "catalog/catalog.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/catname.h"
#include "catalog/pg_group.h"
#include "catalog/pg_group.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_user.h"
#include "catalog/pg_user.h"
#include "utils/syscache.h"
#include "utils/syscache.h"
#include "parser/catalog_utils.h"
#include "parser/catalog_utils.h"
...
@@ -189,7 +191,7 @@ char*
...
@@ -189,7 +191,7 @@ char*
get_groname
(
AclId
grosysid
)
get_groname
(
AclId
grosysid
)
{
{
HeapTuple
htp
;
HeapTuple
htp
;
char
*
name
;
char
*
name
=
NULL
;
htp
=
SearchSysCacheTuple
(
GROSYSID
,
PointerGetDatum
(
grosysid
),
htp
=
SearchSysCacheTuple
(
GROSYSID
,
PointerGetDatum
(
grosysid
),
0
,
0
,
0
);
0
,
0
,
0
);
...
@@ -460,7 +462,7 @@ pg_ownercheck(char *usename,
...
@@ -460,7 +462,7 @@ pg_ownercheck(char *usename,
int
cacheid
)
int
cacheid
)
{
{
HeapTuple
htp
;
HeapTuple
htp
;
AclId
user_id
,
owner_id
;
AclId
user_id
,
owner_id
=
0
;
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
htp
=
SearchSysCacheTuple
(
USENAME
,
PointerGetDatum
(
usename
),
0
,
0
,
0
);
0
,
0
,
0
);
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/fastpath.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.
2 1996/11/03 06:52:32 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.
3 1996/11/08 05:59:26 momjian
Exp $
*
*
* NOTES
* NOTES
* This cruft is the server side of PQfn.
* This cruft is the server side of PQfn.
...
@@ -57,6 +57,8 @@
...
@@ -57,6 +57,8 @@
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include "postgres.h"
#include "postgres.h"
#include "tcop/tcopdebug.h"
#include "tcop/tcopdebug.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/postgres.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.1
4 1996/11/04 04:53
:31 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.1
5 1996/11/08 05:59
:31 momjian Exp $
*
*
* NOTES
* NOTES
* this is the "main" module of the postgres backend and
* this is the "main" module of the postgres backend and
...
@@ -16,16 +16,21 @@
...
@@ -16,16 +16,21 @@
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#include "libpq/pqsignal.h"
/* substitute for <signal.h> */
#if defined(linux)
#if defined(linux)
#ifndef __USE_POSIX
#ifndef __USE_POSIX
#define __USE_POSIX
#define __USE_POSIX
#endif
#endif
#endif
/* defined(linux) */
#endif
/* defined(linux) */
#include <setjmp.h>
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <time.h>
#include <time.h>
#include <setjmp.h>
#include <sys/time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#include <sys/param.h>
/* for MAXHOSTNAMELEN on most */
#ifndef MAXHOSTNAMELEN
#ifndef MAXHOSTNAMELEN
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
...
@@ -279,7 +284,7 @@ static char
...
@@ -279,7 +284,7 @@ static char
SocketBackend
(
char
*
inBuf
,
int
multiplexedBackend
)
SocketBackend
(
char
*
inBuf
,
int
multiplexedBackend
)
{
{
char
qtype
[
2
];
char
qtype
[
2
];
char
result
;
char
result
=
'\0'
;
/* ----------------
/* ----------------
* get input from the frontend
* get input from the frontend
...
@@ -782,7 +787,7 @@ PostgresMain(int argc, char *argv[])
...
@@ -782,7 +787,7 @@ PostgresMain(int argc, char *argv[])
int
flagE
;
int
flagE
;
int
flag
;
int
flag
;
char
*
DBName
;
char
*
DBName
=
NULL
;
int
errs
=
0
;
int
errs
=
0
;
char
firstchar
;
char
firstchar
;
...
@@ -793,11 +798,11 @@ PostgresMain(int argc, char *argv[])
...
@@ -793,11 +798,11 @@ PostgresMain(int argc, char *argv[])
char
*
hostName
;
/* the host name of the backend server */
char
*
hostName
;
/* the host name of the backend server */
char
hostbuf
[
MAXHOSTNAMELEN
];
char
hostbuf
[
MAXHOSTNAMELEN
];
int
serverSock
;
int
serverSock
;
int
serverPortnum
;
int
serverPortnum
=
0
;
int
nSelected
;
/* number of descriptors ready from select(); */
int
nSelected
;
/* number of descriptors ready from select(); */
int
maxFd
;
/* max file descriptor + 1 */
int
maxFd
=
0
;
/* max file descriptor + 1 */
fd_set
rmask
,
basemask
;
fd_set
rmask
,
basemask
;
FrontEnd
*
newFE
,
*
currentFE
;
FrontEnd
*
newFE
,
*
currentFE
=
NULL
;
int
numFE
=
0
;
/* keep track of number of active frontends */
int
numFE
=
0
;
/* keep track of number of active frontends */
Port
*
newPort
;
Port
*
newPort
;
int
newFd
;
int
newFd
;
...
@@ -1157,7 +1162,8 @@ PostgresMain(int argc, char *argv[])
...
@@ -1157,7 +1162,8 @@ PostgresMain(int argc, char *argv[])
#endif
/* WIN32 */
#endif
/* WIN32 */
if
(
multiplexedBackend
)
{
if
(
multiplexedBackend
)
{
if
(
StreamServerPort
(
hostName
,
serverPortnum
,
&
serverSock
)
!=
STATUS_OK
)
if
(
serverPortnum
==
0
||
StreamServerPort
(
hostName
,
serverPortnum
,
&
serverSock
)
!=
STATUS_OK
)
{
{
fprintf
(
stderr
,
"Postgres: cannot create stream port %d
\n
"
,
serverPortnum
);
fprintf
(
stderr
,
"Postgres: cannot create stream port %d
\n
"
,
serverPortnum
);
exit
(
1
);
exit
(
1
);
...
@@ -1250,7 +1256,7 @@ PostgresMain(int argc, char *argv[])
...
@@ -1250,7 +1256,7 @@ PostgresMain(int argc, char *argv[])
*/
*/
if
(
IsUnderPostmaster
==
false
)
{
if
(
IsUnderPostmaster
==
false
)
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.1
4 $ $Date: 1996/11/04 04:53
:31 $"
);
puts
(
"$Revision: 1.1
5 $ $Date: 1996/11/08 05:59
:31 $"
);
}
}
/* ----------------
/* ----------------
...
@@ -1503,7 +1509,7 @@ ShowUsage()
...
@@ -1503,7 +1509,7 @@ ShowUsage()
fprintf
(
StatFp
,
"! system usage stats:
\n
"
);
fprintf
(
StatFp
,
"! system usage stats:
\n
"
);
fprintf
(
StatFp
,
fprintf
(
StatFp
,
"!
\t
%
d.%06d elapsed %d.%06d user %d.%06
d system sec
\n
"
,
"!
\t
%
ld.%06ld elapsed %ld.%06ld user %ld.%06l
d system sec
\n
"
,
elapse_t
.
tv_sec
-
Save_t
.
tv_sec
,
elapse_t
.
tv_sec
-
Save_t
.
tv_sec
,
elapse_t
.
tv_usec
-
Save_t
.
tv_usec
,
elapse_t
.
tv_usec
-
Save_t
.
tv_usec
,
r
.
ru_utime
.
tv_sec
-
Save_r
.
ru_utime
.
tv_sec
,
r
.
ru_utime
.
tv_sec
-
Save_r
.
ru_utime
.
tv_sec
,
...
@@ -1511,7 +1517,7 @@ ShowUsage()
...
@@ -1511,7 +1517,7 @@ ShowUsage()
r
.
ru_stime
.
tv_sec
-
Save_r
.
ru_stime
.
tv_sec
,
r
.
ru_stime
.
tv_sec
-
Save_r
.
ru_stime
.
tv_sec
,
r
.
ru_stime
.
tv_usec
-
Save_r
.
ru_stime
.
tv_usec
);
r
.
ru_stime
.
tv_usec
-
Save_r
.
ru_stime
.
tv_usec
);
fprintf
(
StatFp
,
fprintf
(
StatFp
,
"!
\t
[%
d.%06d user %d.%06
d sys total]
\n
"
,
"!
\t
[%
ld.%06ld user %ld.%06l
d sys total]
\n
"
,
user
.
tv_sec
,
user
.
tv_usec
,
sys
.
tv_sec
,
sys
.
tv_usec
);
user
.
tv_sec
,
user
.
tv_usec
,
sys
.
tv_sec
,
sys
.
tv_usec
);
#ifndef NEED_RUSAGE
#ifndef NEED_RUSAGE
fprintf
(
StatFp
,
fprintf
(
StatFp
,
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/pquery.c
View file @
4b2b8592
...
@@ -7,10 +7,12 @@
...
@@ -7,10 +7,12 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.
3 1996/11/03 06:52:35 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.
4 1996/11/08 05:59:34 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <string.h>
#include "postgres.h"
#include "postgres.h"
#include "tcop/tcopdebug.h"
#include "tcop/tcopdebug.h"
...
@@ -209,7 +211,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
...
@@ -209,7 +211,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
bool
isRetrieveIntoPortal
;
bool
isRetrieveIntoPortal
;
bool
isRetrieveIntoRelation
;
bool
isRetrieveIntoRelation
;
char
*
intoName
;
char
*
intoName
=
NULL
;
CommandDest
dest
;
CommandDest
dest
;
/* ----------------
/* ----------------
...
...
This diff is collapsed.
Click to expand it.
src/backend/tcop/utility.c
View file @
4b2b8592
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.
5 1996/11/03 06:52:36 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.
6 1996/11/08 05:59:35 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include "commands/explain.h"
#include "commands/explain.h"
#include "nodes/parsenodes.h"
#include "nodes/parsenodes.h"
#include "parse.h"
#include "
../backend/parser/
parse.h"
#include "utils/builtins.h"
#include "utils/builtins.h"
#include "utils/acl.h"
#include "utils/acl.h"
#include "utils/palloc.h"
#include "utils/palloc.h"
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/arrayfuncs.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.
9 1996/11/06 10:30:38 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.
10 1996/11/08 05:59:38 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -47,15 +47,19 @@ static char *_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
...
@@ -47,15 +47,19 @@ static char *_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[],
func_ptr
inputproc
,
Oid
typelem
,
char
typdelim
,
func_ptr
inputproc
,
Oid
typelem
,
char
typdelim
,
int
typlen
,
bool
typbyval
,
char
typalign
,
int
typlen
,
bool
typbyval
,
char
typalign
,
int
*
nbytes
);
int
*
nbytes
);
#ifdef LOARRAY
static
char
*
_ReadLOArray
(
char
*
str
,
int
*
nbytes
,
int
*
fd
,
bool
*
chunkFlag
,
static
char
*
_ReadLOArray
(
char
*
str
,
int
*
nbytes
,
int
*
fd
,
bool
*
chunkFlag
,
int
ndim
,
int
dim
[],
int
baseSize
);
int
ndim
,
int
dim
[],
int
baseSize
);
#endif
static
void
_CopyArrayEls
(
char
**
values
,
char
*
p
,
int
nitems
,
int
typlen
,
static
void
_CopyArrayEls
(
char
**
values
,
char
*
p
,
int
nitems
,
int
typlen
,
char
typalign
,
bool
typbyval
);
char
typalign
,
bool
typbyval
);
static
void
system_cache_lookup
(
Oid
element_type
,
bool
input
,
int
*
typlen
,
static
void
system_cache_lookup
(
Oid
element_type
,
bool
input
,
int
*
typlen
,
bool
*
typbyval
,
char
*
typdelim
,
Oid
*
typelem
,
Oid
*
proc
,
bool
*
typbyval
,
char
*
typdelim
,
Oid
*
typelem
,
Oid
*
proc
,
char
*
typalign
);
char
*
typalign
);
static
Datum
_ArrayCast
(
char
*
value
,
bool
byval
,
int
len
);
static
Datum
_ArrayCast
(
char
*
value
,
bool
byval
,
int
len
);
#ifdef LOARRAY
static
char
*
_AdvanceBy1word
(
char
*
str
,
char
**
word
);
static
char
*
_AdvanceBy1word
(
char
*
str
,
char
**
word
);
#endif
static
void
_ArrayRange
(
int
st
[],
int
endp
[],
int
bsize
,
char
*
destPtr
,
static
void
_ArrayRange
(
int
st
[],
int
endp
[],
int
bsize
,
char
*
destPtr
,
ArrayType
*
array
,
int
from
);
ArrayType
*
array
,
int
from
);
static
int
_ArrayClipCount
(
int
stI
[],
int
endpI
[],
ArrayType
*
array
);
static
int
_ArrayClipCount
(
int
stI
[],
int
endpI
[],
ArrayType
*
array
);
...
@@ -63,8 +67,6 @@ static void _LOArrayRange(int st[], int endp[], int bsize, int srcfd,
...
@@ -63,8 +67,6 @@ static void _LOArrayRange(int st[], int endp[], int bsize, int srcfd,
int
destfd
,
ArrayType
*
array
,
int
isSrcLO
,
bool
*
isNull
);
int
destfd
,
ArrayType
*
array
,
int
isSrcLO
,
bool
*
isNull
);
static
void
_ReadArray
(
int
st
[],
int
endp
[],
int
bsize
,
int
srcfd
,
int
destfd
,
static
void
_ReadArray
(
int
st
[],
int
endp
[],
int
bsize
,
int
srcfd
,
int
destfd
,
ArrayType
*
array
,
int
isDestLO
,
bool
*
isNull
);
ArrayType
*
array
,
int
isDestLO
,
bool
*
isNull
);
static
char
*
_array_set
(
ArrayType
*
array
,
struct
varlena
*
indx_str
,
struct
varlena
*
dataPtr
);
static
ArrayCastAndSet
(
char
*
src
,
bool
typbyval
,
int
typlen
,
char
*
dest
);
static
ArrayCastAndSet
(
char
*
src
,
bool
typbyval
,
int
typlen
,
char
*
dest
);
...
@@ -90,7 +92,7 @@ array_in(char *string, /* input array in external form */
...
@@ -90,7 +92,7 @@ array_in(char *string, /* input array in external form */
int
i
,
nitems
,
dummy
;
int
i
,
nitems
,
dummy
;
int32
nbytes
;
int32
nbytes
;
char
*
dataPtr
;
char
*
dataPtr
;
ArrayType
*
retval
;
ArrayType
*
retval
=
NULL
;
int
ndim
,
dim
[
MAXDIM
],
lBound
[
MAXDIM
];
int
ndim
,
dim
[
MAXDIM
],
lBound
[
MAXDIM
];
char
typalign
;
char
typalign
;
...
@@ -407,6 +409,7 @@ _ReadArrayStr(char *arrayStr,
...
@@ -407,6 +409,7 @@ _ReadArrayStr(char *arrayStr,
* Read data about an array to be stored as a large object
* Read data about an array to be stored as a large object
*----------------------------------------------------------------------------
*----------------------------------------------------------------------------
*/
*/
#ifdef LOARRAY
static
char
*
static
char
*
_ReadLOArray
(
char
*
str
,
_ReadLOArray
(
char
*
str
,
int
*
nbytes
,
int
*
nbytes
,
...
@@ -460,6 +463,7 @@ _ReadLOArray(char *str,
...
@@ -460,6 +463,7 @@ _ReadLOArray(char *str,
}
}
return
(
retStr
);
return
(
retStr
);
}
}
#endif
static
void
static
void
_CopyArrayEls
(
char
**
values
,
_CopyArrayEls
(
char
**
values
,
...
@@ -659,8 +663,8 @@ array_ref(ArrayType *array,
...
@@ -659,8 +663,8 @@ array_ref(ArrayType *array,
bool
*
isNull
)
bool
*
isNull
)
{
{
int
i
,
ndim
,
*
dim
,
*
lb
,
offset
,
nbytes
;
int
i
,
ndim
,
*
dim
,
*
lb
,
offset
,
nbytes
;
struct
varlena
*
v
;
struct
varlena
*
v
=
NULL
;
char
*
retval
;
char
*
retval
=
NULL
;
if
(
array
==
(
ArrayType
*
)
NULL
)
RETURN_NULL
;
if
(
array
==
(
ArrayType
*
)
NULL
)
RETURN_NULL
;
if
(
arraylen
>
0
)
{
if
(
arraylen
>
0
)
{
...
@@ -684,7 +688,7 @@ array_ref(ArrayType *array,
...
@@ -684,7 +688,7 @@ array_ref(ArrayType *array,
if
(
ARR_IS_LO
(
array
))
{
if
(
ARR_IS_LO
(
array
))
{
char
*
lo_name
;
char
*
lo_name
;
int
fd
;
int
fd
=
0
;
/* We are assuming fixed element lengths here */
/* We are assuming fixed element lengths here */
offset
*=
elmlen
;
offset
*=
elmlen
;
...
@@ -786,8 +790,8 @@ array_clip(ArrayType *array,
...
@@ -786,8 +790,8 @@ array_clip(ArrayType *array,
#ifdef LOARRAY
#ifdef LOARRAY
char
*
lo_name
;
char
*
lo_name
;
#endif
#endif
char
*
newname
;
char
*
newname
=
NULL
;
int
fd
,
newfd
,
isDestLO
=
true
,
rsize
;
int
fd
=
0
,
newfd
=
0
,
isDestLO
=
true
,
rsize
;
if
(
len
<
0
)
if
(
len
<
0
)
elog
(
WARN
,
"array_clip: array of variable length objects not supported"
);
elog
(
WARN
,
"array_clip: array of variable length objects not supported"
);
...
@@ -908,7 +912,7 @@ array_set(ArrayType *array,
...
@@ -908,7 +912,7 @@ array_set(ArrayType *array,
offset
=
GetOffset
(
n
,
dim
,
lb
,
indx
);
offset
=
GetOffset
(
n
,
dim
,
lb
,
indx
);
if
(
ARR_IS_LO
(
array
))
{
if
(
ARR_IS_LO
(
array
))
{
int
fd
;
int
fd
=
0
;
struct
varlena
*
v
;
struct
varlena
*
v
;
/* We are assuming fixed element lengths here */
/* We are assuming fixed element lengths here */
...
@@ -1017,7 +1021,7 @@ array_assgn(ArrayType *array,
...
@@ -1017,7 +1021,7 @@ array_assgn(ArrayType *array,
elog
(
WARN
,
"lowerIndex larger than upperIndx"
);
elog
(
WARN
,
"lowerIndex larger than upperIndx"
);
if
(
ARR_IS_LO
(
array
))
{
if
(
ARR_IS_LO
(
array
))
{
int
fd
,
newfd
;
int
fd
=
0
,
newfd
=
0
;
#ifdef LOARRAY
#ifdef LOARRAY
char
*
lo_name
;
char
*
lo_name
;
...
@@ -1156,6 +1160,7 @@ ArrayCastAndSet(char *src,
...
@@ -1156,6 +1160,7 @@ ArrayCastAndSet(char *src,
return
(
inc
);
return
(
inc
);
}
}
#ifdef LOARRAY
static
char
*
static
char
*
_AdvanceBy1word
(
char
*
str
,
char
**
word
)
_AdvanceBy1word
(
char
*
str
,
char
**
word
)
{
{
...
@@ -1173,6 +1178,7 @@ _AdvanceBy1word(char *str, char **word)
...
@@ -1173,6 +1178,7 @@ _AdvanceBy1word(char *str, char **word)
retstr
=
NULL
;
retstr
=
NULL
;
return
retstr
;
return
retstr
;
}
}
#endif
int
int
SanityCheckInput
(
int
ndim
,
int
n
,
int
dim
[],
int
lb
[],
int
indx
[])
SanityCheckInput
(
int
ndim
,
int
n
,
int
dim
[],
int
lb
[],
int
indx
[])
...
@@ -1371,7 +1377,7 @@ _LOtransfer(char **destfd,
...
@@ -1371,7 +1377,7 @@ _LOtransfer(char **destfd,
{
{
#define MAX_READ (512 * 1024)
#define MAX_READ (512 * 1024)
#define min(a, b) (a < b ? a : b)
#define min(a, b) (a < b ? a : b)
struct
varlena
*
v
;
struct
varlena
*
v
=
NULL
;
int
tmp
,
inc
,
resid
;
int
tmp
,
inc
,
resid
;
inc
=
nitems
*
size
;
inc
=
nitems
*
size
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/chunk.c
View file @
4b2b8592
...
@@ -6,11 +6,14 @@
...
@@ -6,11 +6,14 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.
3 1996/11/06 10:30:40 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.
4 1996/11/08 05:59:40 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <ctype.h>
#include <ctype.h>
#include <sys/types.h>
#include <fcntl.h>
#include "postgres.h"
#include "postgres.h"
#include <libpq/be-fsstubs.h>
#include <libpq/be-fsstubs.h>
...
@@ -46,12 +49,14 @@ static int _FindBestChunk(int size, int dmax[], int dbest[], int dim,
...
@@ -46,12 +49,14 @@ static int _FindBestChunk(int size, int dmax[], int dbest[], int dim,
int
A
[
MAXPAT
][
MAXDIM
+
1
],
int
N
);
int
A
[
MAXPAT
][
MAXDIM
+
1
],
int
N
);
static
int
get_next
(
int
d
[],
int
k
,
int
C
,
int
dmax
[]);
static
int
get_next
(
int
d
[],
int
k
,
int
C
,
int
dmax
[]);
static
void
initialize_info
(
CHUNK_INFO
*
A
,
int
ndim
,
int
dim
[],
int
chunk
[]);
static
void
initialize_info
(
CHUNK_INFO
*
A
,
int
ndim
,
int
dim
[],
int
chunk
[]);
#ifdef LOARRAY
static
void
_ConvertToChunkFile
(
int
n
,
int
baseSize
,
int
dim
[],
int
C
[],
static
void
_ConvertToChunkFile
(
int
n
,
int
baseSize
,
int
dim
[],
int
C
[],
int
srcfd
,
int
destfd
);
int
srcfd
,
int
destfd
);
static
void
read_chunk
(
int
chunk_no
[],
int
C
[],
char
a_chunk
[],
int
srcfd
,
static
void
read_chunk
(
int
chunk_no
[],
int
C
[],
char
a_chunk
[],
int
srcfd
,
int
n
,
int
baseSize
,
int
PX
[],
int
dist
[]);
int
n
,
int
baseSize
,
int
PX
[],
int
dist
[]);
static
int
write_chunk
(
struct
varlena
*
a_chunk
,
int
ofile
);
static
int
write_chunk
(
struct
varlena
*
a_chunk
,
int
ofile
);
static
int
seek_and_read
(
int
pos
,
int
size
,
char
buff
[],
int
fp
,
int
from
);
static
int
seek_and_read
(
int
pos
,
int
size
,
char
buff
[],
int
fp
,
int
from
);
#endif
/*------------------------------------------------------------------------
/*------------------------------------------------------------------------
* _ChunkArray ---
* _ChunkArray ---
...
@@ -71,7 +76,9 @@ _ChunkArray(int fd,
...
@@ -71,7 +76,9 @@ _ChunkArray(int fd,
int
*
nbytes
,
int
*
nbytes
,
char
*
chunkfile
)
char
*
chunkfile
)
{
{
int
cfd
;
#ifdef LOARRAY
int
cfd
=
0
;
#endif
int
chunk
[
MAXDIM
],
csize
;
int
chunk
[
MAXDIM
],
csize
;
bool
reorgFlag
;
bool
reorgFlag
;
...
@@ -86,17 +93,20 @@ _ChunkArray(int fd,
...
@@ -86,17 +93,20 @@ _ChunkArray(int fd,
chunkfile
=
_array_newLO
(
&
cfd
,
fileFlag
);
chunkfile
=
_array_newLO
(
&
cfd
,
fileFlag
);
else
else
cfd
=
LOopen
(
chunkfile
,
O_RDONLY
);
cfd
=
LOopen
(
chunkfile
,
O_RDONLY
);
#endif
if
(
cfd
<
0
)
if
(
cfd
<
0
)
elog
(
WARN
,
"Enable to open chunk file"
);
elog
(
WARN
,
"Unable to open chunk file"
);
#endif
strcpy
(
cInfo
.
lo_name
,
chunkfile
);
strcpy
(
cInfo
.
lo_name
,
chunkfile
);
/* find chunk size */
/* find chunk size */
csize
=
GetChunkSize
(
afd
,
ndim
,
dim
,
baseSize
,
chunk
);
csize
=
GetChunkSize
(
afd
,
ndim
,
dim
,
baseSize
,
chunk
);
#ifdef LOARRAY
if
(
reorgFlag
)
if
(
reorgFlag
)
/* copy data from input file to chunked file */
/* copy data from input file to chunked file */
_ConvertToChunkFile
(
ndim
,
baseSize
,
dim
,
chunk
,
fd
,
cfd
);
_ConvertToChunkFile
(
ndim
,
baseSize
,
dim
,
chunk
,
fd
,
cfd
);
#endif
initialize_info
(
&
cInfo
,
ndim
,
dim
,
chunk
);
initialize_info
(
&
cInfo
,
ndim
,
dim
,
chunk
);
*
nbytes
=
sizeof
(
CHUNK_INFO
);
*
nbytes
=
sizeof
(
CHUNK_INFO
);
...
@@ -231,8 +241,10 @@ get_next(int d[], int k, int C, int dmax[])
...
@@ -231,8 +241,10 @@ get_next(int d[], int k, int C, int dmax[])
return
(
1
);
return
(
1
);
}
}
#ifdef LOARRAY
static
char
a_chunk
[
_PAGE_SIZE_
+
4
];
/* 4 since a_chunk is in
static
char
a_chunk
[
_PAGE_SIZE_
+
4
];
/* 4 since a_chunk is in
varlena format */
varlena format */
#endif
static
void
static
void
initialize_info
(
CHUNK_INFO
*
A
,
int
ndim
,
int
dim
[],
int
chunk
[])
initialize_info
(
CHUNK_INFO
*
A
,
int
ndim
,
int
dim
[],
int
chunk
[])
...
@@ -254,6 +266,7 @@ initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
...
@@ -254,6 +266,7 @@ initialize_info(CHUNK_INFO *A, int ndim, int dim[], int chunk[])
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#ifdef LOARRAY
static
void
static
void
_ConvertToChunkFile
(
int
n
,
_ConvertToChunkFile
(
int
n
,
int
baseSize
,
int
baseSize
,
...
@@ -337,7 +350,7 @@ read_chunk(int chunk_no[],
...
@@ -337,7 +350,7 @@ read_chunk(int chunk_no[],
static
int
static
int
write_chunk
(
struct
varlena
*
a_chunk
,
int
ofile
)
write_chunk
(
struct
varlena
*
a_chunk
,
int
ofile
)
{
{
int
got_n
;
int
got_n
=
0
;
#ifdef LOARRAY
#ifdef LOARRAY
got_n
=
LOwrite
(
ofile
,
a_chunk
);
got_n
=
LOwrite
(
ofile
,
a_chunk
);
#endif
#endif
...
@@ -354,7 +367,7 @@ write_chunk(struct varlena * a_chunk, int ofile)
...
@@ -354,7 +367,7 @@ write_chunk(struct varlena * a_chunk, int ofile)
static
int
static
int
seek_and_read
(
int
pos
,
int
size
,
char
buff
[],
int
fp
,
int
from
)
seek_and_read
(
int
pos
,
int
size
,
char
buff
[],
int
fp
,
int
from
)
{
{
struct
varlena
*
v
;
struct
varlena
*
v
=
NULL
;
/* Assuming only one file */
/* Assuming only one file */
if
(
lo_lseek
(
fp
,
pos
,
from
)
<
0
)
if
(
lo_lseek
(
fp
,
pos
,
from
)
<
0
)
...
@@ -369,6 +382,7 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
...
@@ -369,6 +382,7 @@ seek_and_read(int pos, int size, char buff[], int fp, int from)
return
(
1
);
return
(
1
);
}
}
#endif
/* LOARRAY */
/*----------------------------------------------------------------------------
/*----------------------------------------------------------------------------
* _ReadChunkArray --
* _ReadChunkArray --
...
@@ -453,7 +467,7 @@ _ReadChunkArray(int st[],
...
@@ -453,7 +467,7 @@ _ReadChunkArray(int st[],
for
(
i
=
0
;
i
<
n
;
range
[
i
++
]
=
0
);
for
(
i
=
0
;
i
<
n
;
range
[
i
++
]
=
0
);
j
=
n
-
1
;
bptr
*=
bsize
;
j
=
n
-
1
;
bptr
*=
bsize
;
if
(
isDestLO
)
{
if
(
isDestLO
)
{
if
(
lo_lseek
(
destfp
,
bptr
,
SEEK_SET
)
<
0
)
if
(
lo_lseek
(
(
int
)
destfp
,
bptr
,
SEEK_SET
)
<
0
)
RETURN_NULL
;
RETURN_NULL
;
}
}
else
else
...
@@ -480,7 +494,7 @@ _ReadChunkArray(int st[],
...
@@ -480,7 +494,7 @@ _ReadChunkArray(int st[],
block_seek
+=
cdist
[
j
];
block_seek
+=
cdist
[
j
];
bptr
+=
adist
[
j
]
*
bsize
;
bptr
+=
adist
[
j
]
*
bsize
;
if
(
isDestLO
)
{
if
(
isDestLO
)
{
if
(
lo_lseek
(
destfp
,
bptr
,
SEEK_SET
)
<
0
)
if
(
lo_lseek
(
(
int
)
destfp
,
bptr
,
SEEK_SET
)
<
0
)
RETURN_NULL
;
RETURN_NULL
;
}
}
else
else
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/datum.c
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.
2 1996/11/06 06:49:47 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.
3 1996/11/08 05:59:41 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -51,7 +51,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
...
@@ -51,7 +51,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
{
{
struct
varlena
*
s
;
struct
varlena
*
s
;
Size
size
;
Size
size
=
0
;
if
(
byVal
)
{
if
(
byVal
)
{
if
(
len
>=
0
&&
len
<=
sizeof
(
Datum
))
{
if
(
len
>=
0
&&
len
<=
sizeof
(
Datum
))
{
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/filename.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.
4 1996/11/06 10:30:51 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.
5 1996/11/08 05:59:43 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -28,7 +28,7 @@ char *
...
@@ -28,7 +28,7 @@ char *
filename_in
(
char
*
file
)
filename_in
(
char
*
file
)
{
{
char
*
str
,
*
getenv
();
char
*
str
,
*
getenv
();
int
ind
;
int
ind
=
0
;
/*
/*
* XXX - HACK CITY --- REDO
* XXX - HACK CITY --- REDO
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/nabstime.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.
6 1996/11/06 06:49:51 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.
7 1996/11/08 05:59:45 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -589,8 +589,9 @@ qmktime(struct tm *tp)
...
@@ -589,8 +589,9 @@ qmktime(struct tm *tp)
* correction
* correction
*/
*/
if
(
day
>
nmdays
[
mon
])
if
(
day
>
nmdays
[
mon
])
if
(
mon
!=
2
||
year
%
4
==
0
&&
if
(
mon
!=
2
||
(
year
%
100
!=
0
||
year
%
400
==
0
)
&&
day
>
29
)
(
year
%
4
==
0
&&
((
year
%
100
!=
0
||
year
%
400
==
0
))
&&
day
>
29
))
return
-
1
;
/* day too large for month */
return
-
1
;
/* day too large for month */
/* split year into century and year-of-century */
/* split year into century and year-of-century */
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/regproc.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.
2 1996/11/06 06:49:59 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.
3 1996/11/08 05:59:47 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -36,7 +36,7 @@ int32 regprocin(char *proname)
...
@@ -36,7 +36,7 @@ int32 regprocin(char *proname)
HeapScanDesc
procscan
;
HeapScanDesc
procscan
;
HeapTuple
proctup
;
HeapTuple
proctup
;
ScanKeyData
key
;
ScanKeyData
key
;
RegProcedure
result
;
RegProcedure
result
=
(
Oid
)
0
;
bool
isnull
;
bool
isnull
;
if
(
proname
==
NULL
)
if
(
proname
==
NULL
)
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/sets.c
View file @
4b2b8592
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.
2 1996/11/06 06:50:01 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.
3 1996/11/08 05:59:49 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -44,7 +44,7 @@ SetDefine(char *querystr, char *typename)
...
@@ -44,7 +44,7 @@ SetDefine(char *querystr, char *typename)
char
*
procname
=
GENERICSETNAME
;
char
*
procname
=
GENERICSETNAME
;
char
*
fileName
=
"-"
;
char
*
fileName
=
"-"
;
char
realprocname
[
16
];
char
realprocname
[
16
];
HeapTuple
tup
,
newtup
;
HeapTuple
tup
,
newtup
=
NULL
;
Form_pg_proc
proc
;
Form_pg_proc
proc
;
Relation
procrel
;
Relation
procrel
;
int
i
;
int
i
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/adt/varlena.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.
7 1996/11/06 06:50:07 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.
8 1996/11/08 05:59:51 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -133,7 +133,7 @@ byteaout(struct varlena *vlena)
...
@@ -133,7 +133,7 @@ byteaout(struct varlena *vlena)
vp
=
vlena
->
vl_dat
;
vp
=
vlena
->
vl_dat
;
for
(
i
=
vlena
->
vl_len
-
sizeof
(
int32
);
i
!=
0
;
i
--
)
/* varlena? */
for
(
i
=
vlena
->
vl_len
-
sizeof
(
int32
);
i
!=
0
;
i
--
)
/* varlena? */
if
(
*
vp
==
'\\'
)
{
if
(
*
vp
==
'\\'
)
{
*
vp
++
;
vp
++
;
*
rp
++
=
'\\'
;
*
rp
++
=
'\\'
;
*
rp
++
=
'\\'
;
*
rp
++
=
'\\'
;
}
else
if
(
isascii
(
*
vp
)
&&
isprint
(
*
vp
))
}
else
if
(
isascii
(
*
vp
)
&&
isprint
(
*
vp
))
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/cache/catcache.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.
3 1996/10/24 07:59:46 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.
4 1996/11/08 05:59:53 momjian
Exp $
*
*
* Notes:
* Notes:
* XXX This needs to use exception.h to handle recovery when
* XXX This needs to use exception.h to handle recovery when
...
@@ -744,7 +744,7 @@ SearchSysCache(struct catcache *cache,
...
@@ -744,7 +744,7 @@ SearchSysCache(struct catcache *cache,
CatCTup
*
nct
;
CatCTup
*
nct
;
CatCTup
*
nct2
;
CatCTup
*
nct2
;
Dlelem
*
elt
;
Dlelem
*
elt
;
HeapTuple
ntp
;
HeapTuple
ntp
=
0
;
Buffer
buffer
;
Buffer
buffer
;
Relation
relation
;
Relation
relation
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/cache/inval.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.
2 1996/11/06 10:31:24 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.
3 1996/11/08 05:59:55 momjian
Exp $
*
*
* Note - this code is real crufty...
* Note - this code is real crufty...
*
*
...
@@ -449,7 +449,7 @@ RelationInvalidateRelationCache(Relation relation,
...
@@ -449,7 +449,7 @@ RelationInvalidateRelationCache(Relation relation,
void
(
*
function
)())
void
(
*
function
)())
{
{
Oid
relationId
;
Oid
relationId
;
Oid
objectId
;
Oid
objectId
=
(
Oid
)
0
;
/* ----------------
/* ----------------
* get the relation object id
* get the relation object id
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/error/elog.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.
8 1996/11/06 10:31:33 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.
9 1996/11/08 05:59:57 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -58,7 +58,10 @@ elog(int lev, const char *fmt, ... )
...
@@ -58,7 +58,10 @@ elog(int lev, const char *fmt, ... )
#ifndef PG_STANDALONE
#ifndef PG_STANDALONE
extern
FILE
*
Pfout
;
extern
FILE
*
Pfout
;
#endif
/* !PG_STANDALONE */
#endif
/* !PG_STANDALONE */
time_t
tim
,
time
();
time_t
time
();
#ifdef ELOG_TIMESTAMPS
time_t
tim
;
#endif
int
len
;
int
len
;
int
i
=
0
;
int
i
=
0
;
...
@@ -231,7 +234,7 @@ DebugFileOpen()
...
@@ -231,7 +234,7 @@ DebugFileOpen()
fd
=
fileno
(
stderr
);
fd
=
fileno
(
stderr
);
if
(
fcntl
(
fd
,
F_GETFD
,
0
)
<
0
)
{
if
(
fcntl
(
fd
,
F_GETFD
,
0
)
<
0
)
{
sprintf
(
OutputFileName
,
"%s/pg.errors.%d"
,
sprintf
(
OutputFileName
,
"%s/pg.errors.%d"
,
GetPGData
(),
getpid
());
GetPGData
(),
(
int
)
getpid
());
fd
=
open
(
OutputFileName
,
O_CREAT
|
O_APPEND
|
O_WRONLY
,
0666
);
fd
=
open
(
OutputFileName
,
O_CREAT
|
O_APPEND
|
O_WRONLY
,
0666
);
}
}
#endif
/* WIN32 */
#endif
/* WIN32 */
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/fmgr/fmgr.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.
1.1.1 1996/07/09 06:22:08 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.
2 1996/11/08 06:00:14 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -113,7 +113,7 @@ fmgr_c(func_ptr user_fn,
...
@@ -113,7 +113,7 @@ fmgr_c(func_ptr user_fn,
void
void
fmgr_info
(
Oid
procedureId
,
func_ptr
*
function
,
int
*
nargs
)
fmgr_info
(
Oid
procedureId
,
func_ptr
*
function
,
int
*
nargs
)
{
{
func_ptr
user_fn
;
func_ptr
user_fn
=
NULL
;
FmgrCall
*
fcp
;
FmgrCall
*
fcp
;
HeapTuple
procedureTuple
;
HeapTuple
procedureTuple
;
FormData_pg_proc
*
procedureStruct
;
FormData_pg_proc
*
procedureStruct
;
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/hash/dynahash.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.
3 1996/11/06 10:31:43 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.
4 1996/11/08 06:00:23 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
# include <sys/types.h>
# include <sys/types.h>
# include <string.h>
# include <string.h>
# include "postgres.h"
# include "postgres.h"
# include "utils/dynahash.h"
# include "utils/hsearch.h"
# include "utils/hsearch.h"
#ifndef FRONTEND
#ifndef FRONTEND
# include "utils/mcxt.h"
# include "utils/mcxt.h"
...
@@ -65,7 +66,6 @@
...
@@ -65,7 +66,6 @@
*/
*/
static
long
*
DynaHashAlloc
(
unsigned
int
size
);
static
long
*
DynaHashAlloc
(
unsigned
int
size
);
static
void
DynaHashFree
(
Pointer
ptr
);
static
void
DynaHashFree
(
Pointer
ptr
);
static
int
hash_clear
(
HTAB
*
hashp
);
static
uint32
call_hash
(
HTAB
*
hashp
,
char
*
k
,
int
len
);
static
uint32
call_hash
(
HTAB
*
hashp
,
char
*
k
,
int
len
);
static
SEG_OFFSET
seg_alloc
(
HTAB
*
hashp
);
static
SEG_OFFSET
seg_alloc
(
HTAB
*
hashp
);
static
int
bucket_alloc
(
HTAB
*
hashp
);
static
int
bucket_alloc
(
HTAB
*
hashp
);
...
@@ -352,14 +352,6 @@ init_htab (HTAB *hashp, int nelem)
...
@@ -352,14 +352,6 @@ init_htab (HTAB *hashp, int nelem)
/********************** DESTROY ROUTINES ************************/
/********************** DESTROY ROUTINES ************************/
static
int
hash_clear
(
HTAB
*
hashp
)
{
elog
(
NOTICE
,
"hash_clear not implemented
\n
"
);
return
0
;
}
void
void
hash_destroy
(
HTAB
*
hashp
)
hash_destroy
(
HTAB
*
hashp
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/init/postinit.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.
4 1996/11/06 10:31:59 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.
5 1996/11/08 06:00:33 momjian
Exp $
*
*
* NOTES
* NOTES
* InitPostgres() is the function called from PostgresMain
* InitPostgres() is the function called from PostgresMain
...
@@ -325,7 +325,7 @@ InitCommunication()
...
@@ -325,7 +325,7 @@ InitCommunication()
char
*
getenv
();
/* XXX style */
char
*
getenv
();
/* XXX style */
char
*
postid
;
char
*
postid
;
char
*
postport
;
char
*
postport
;
IPCKey
key
;
IPCKey
key
=
0
;
/* ----------------
/* ----------------
* try and get the backend tag from POSTID
* try and get the backend tag from POSTID
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/mmgr/aset.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.
2 1996/11/06 10:32:04 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.
3 1996/11/08 06:00:48 momjian
Exp $
*
*
* NOTE
* NOTE
* XXX This is a preliminary implementation which lacks fail-fast
* XXX This is a preliminary implementation which lacks fail-fast
...
@@ -368,7 +368,7 @@ AllocPointerGetNext(AllocPointer pointer)
...
@@ -368,7 +368,7 @@ AllocPointerGetNext(AllocPointer pointer)
void
void
AllocPointerDump
(
AllocPointer
pointer
)
AllocPointerDump
(
AllocPointer
pointer
)
{
{
printf
(
"
\t
%-10
d@ %0#x
\n
"
,
((
long
*
)
pointer
)[
-
1
],
pointer
);
/* XXX */
printf
(
"
\t
%-10
ld@ %0#lx
\n
"
,
((
long
*
)
pointer
)[
-
1
],
(
long
)
pointer
);
/* XXX */
}
}
/*
/*
...
...
This diff is collapsed.
Click to expand it.
src/backend/utils/mmgr/mcxt.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.
1.1.1 1996/07/09 06:22:09 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.
2 1996/11/08 06:00:54 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -77,8 +77,9 @@ static Pointer GlobalMemoryRealloc(GlobalMemory this, Pointer pointer,
...
@@ -77,8 +77,9 @@ static Pointer GlobalMemoryRealloc(GlobalMemory this, Pointer pointer,
Size
size
);
Size
size
);
static
char
*
GlobalMemoryGetName
(
GlobalMemory
this
);
static
char
*
GlobalMemoryGetName
(
GlobalMemory
this
);
static
void
GlobalMemoryDump
(
GlobalMemory
this
);
static
void
GlobalMemoryDump
(
GlobalMemory
this
);
#ifdef NOT_USED
static
void
DumpGlobalMemories
(
void
);
static
void
DumpGlobalMemories
(
void
);
#endif
/*
/*
* Global Memory Methods
* Global Memory Methods
...
@@ -493,6 +494,7 @@ GlobalMemoryDump(GlobalMemory this)
...
@@ -493,6 +494,7 @@ GlobalMemoryDump(GlobalMemory this)
* Exceptions:
* Exceptions:
* ???
* ???
*/
*/
#ifdef NOT_USED
static
void
static
void
DumpGlobalMemories
()
DumpGlobalMemories
()
{
{
...
@@ -507,4 +509,4 @@ DumpGlobalMemories()
...
@@ -507,4 +509,4 @@ DumpGlobalMemories()
&
context
->
elemData
);
&
context
->
elemData
);
}
}
}
}
#endif
This diff is collapsed.
Click to expand it.
src/backend/utils/mmgr/portalmem.c
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.
2 1996/11/03 06:54:25 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.
3 1996/11/08 06:00:57 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -465,6 +465,7 @@ AtEOXact_portals()
...
@@ -465,6 +465,7 @@ AtEOXact_portals()
* PortalDump
* PortalDump
* ----------------
* ----------------
*/
*/
#ifdef NOT_USED
static
void
static
void
PortalDump
(
Portal
*
thisP
)
PortalDump
(
Portal
*
thisP
)
{
{
...
@@ -473,11 +474,13 @@ PortalDump(Portal *thisP)
...
@@ -473,11 +474,13 @@ PortalDump(Portal *thisP)
PortalVariableMemoryDump
(
PortalGetVariableMemory
(
*
thisP
));
PortalVariableMemoryDump
(
PortalGetVariableMemory
(
*
thisP
));
PortalHeapMemoryDump
(
PortalGetHeapMemory
(
*
thisP
));
PortalHeapMemoryDump
(
PortalGetHeapMemory
(
*
thisP
));
}
}
#endif
/* ----------------
/* ----------------
* DumpPortals
* DumpPortals
* ----------------
* ----------------
*/
*/
#ifdef NOT_USED
static
void
static
void
DumpPortals
()
DumpPortals
()
{
{
...
@@ -485,6 +488,7 @@ DumpPortals()
...
@@ -485,6 +488,7 @@ DumpPortals()
HashTableWalk
(
PortalHashTable
,
PortalDump
,
0
);
HashTableWalk
(
PortalHashTable
,
PortalDump
,
0
);
}
}
#endif
/* ----------------------------------------------------------------
/* ----------------------------------------------------------------
* public portal interface functions
* public portal interface functions
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_dump/pg_dump.c
View file @
4b2b8592
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.1
2 1996/11/04 04:00:02
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.1
3 1996/11/08 06:01:03
momjian Exp $
*
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
*
...
@@ -1557,7 +1557,6 @@ dumpTuples(PGresult *res, FILE *fout, int* attrmap)
...
@@ -1557,7 +1557,6 @@ dumpTuples(PGresult *res, FILE *fout, int* attrmap)
void
void
setMaxOid
(
FILE
*
fout
)
setMaxOid
(
FILE
*
fout
)
{
{
char
query
[
255
];
PGresult
*
res
;
PGresult
*
res
;
Oid
max_oid
;
Oid
max_oid
;
...
@@ -1592,7 +1591,7 @@ setMaxOid(FILE *fout)
...
@@ -1592,7 +1591,7 @@ setMaxOid(FILE *fout)
g_comment_start
,
max_oid
,
g_comment_end
);
g_comment_start
,
max_oid
,
g_comment_end
);
fprintf
(
fout
,
"CREATE TABLE pgdump_oid (dummy int4);
\n
"
);
fprintf
(
fout
,
"CREATE TABLE pgdump_oid (dummy int4);
\n
"
);
fprintf
(
fout
,
"COPY pgdump_oid WITH OIDS FROM stdin;
\n
"
);
fprintf
(
fout
,
"COPY pgdump_oid WITH OIDS FROM stdin;
\n
"
);
fprintf
(
fout
,
"%-
l
d
\t
0
\n
"
,
max_oid
);
fprintf
(
fout
,
"%-d
\t
0
\n
"
,
max_oid
);
fprintf
(
fout
,
"
\\
.
\n
"
);
fprintf
(
fout
,
"
\\
.
\n
"
);
fprintf
(
fout
,
"DROP TABLE pgdump_oid;
\n
"
);
fprintf
(
fout
,
"DROP TABLE pgdump_oid;
\n
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_id/pg_id.c
View file @
4b2b8592
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.
2 1996/09/16 06:34:40 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.
3 1996/11/08 06:01:12 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -46,9 +46,9 @@ main(int argc, char **argv)
...
@@ -46,9 +46,9 @@ main(int argc, char **argv)
printf
(
"NOUSER
\n
"
);
printf
(
"NOUSER
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
printf
(
"%
d
\n
"
,
pw
->
pw_uid
);
printf
(
"%
ld
\n
"
,
(
long
)
pw
->
pw_uid
);
}
else
{
}
else
{
printf
(
"%
d
\n
"
,
getuid
());
printf
(
"%
ld
\n
"
,
(
long
)
getuid
());
}
}
exit
(
0
);
exit
(
0
);
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_version/pg_version.c
View file @
4b2b8592
...
@@ -7,10 +7,11 @@
...
@@ -7,10 +7,11 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.
3 1996/09/19 19:58:27 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_version/Attic/pg_version.c,v 1.
4 1996/11/08 06:01:17 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
int
Noversion
=
0
;
int
Noversion
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/Makefile
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.
8 1996/11/02 09:53:15 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.
9 1996/11/08 06:01:27 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -65,10 +65,10 @@ endif
...
@@ -65,10 +65,10 @@ endif
all
:
psql
all
:
psql
psql
:
$(OBJS) $(LIBPQDIR)/libpq.a
psql
:
$(OBJS) $(LIBPQDIR)/
obj/
libpq.a
$(CC)
$(LDFLAGS)
-o
psql
-L
$(LIBPQDIR)
$(OBJS)
-lpq
$(LD_ADD)
$(CC)
$(LDFLAGS)
-o
psql
-L
$(LIBPQDIR)
/obj
$(OBJS)
-lpq
$(LD_ADD)
$(srcdir)/libpq/libpq.a
:
$(srcdir)/libpq/
obj/
libpq.a
:
$(MAKE)
-C
$(LIBPQDIR)
libpq.a
$(MAKE)
-C
$(LIBPQDIR)
libpq.a
install
:
install
:
...
...
This diff is collapsed.
Click to expand it.
src/bin/psql/psql.c
View file @
4b2b8592
...
@@ -7,17 +7,19 @@
...
@@ -7,17 +7,19 @@
*
*
*
*
*
IDENTIFICATION
*
IDENTIFICATION
*
$
Header
:
/
cvsroot
/
pgsql
/
src
/
bin
/
psql
/
Attic
/
psql
.
c
,
v
1
.
2
4
1996
/
11
/
04
09
:
17
:
55
bryanh
Exp
$
*
$
Header
:
/
cvsroot
/
pgsql
/
src
/
bin
/
psql
/
Attic
/
psql
.
c
,
v
1
.
2
5
1996
/
11
/
08
06
:
01
:
33
momjian
Exp
$
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <signal.h>
#include <signal.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <unistd.h>
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
#include "postgres.h"
#include "libpq-fe.h"
#include "libpq-fe.h"
#include "stringutils.h"
#include "stringutils.h"
...
@@ -800,7 +802,7 @@ do_edit(const char *filename_arg, char *query, int *retcode_p) {
...
@@ -800,7 +802,7 @@ do_edit(const char *filename_arg, char *query, int *retcode_p) {
fname
=
(
char
*
)
filename_arg
;
fname
=
(
char
*
)
filename_arg
;
error
=
false
;
error
=
false
;
}
else
{
}
else
{
sprintf
(
tmp
,
"/tmp/psql.%
d.%d"
,
geteuid
(),
getpid
());
sprintf
(
tmp
,
"/tmp/psql.%
ld.%ld"
,
(
long
)
geteuid
(),
(
long
)
getpid
());
fname
=
tmp
;
fname
=
tmp
;
unlink
(
tmp
);
unlink
(
tmp
);
if
(
ql
>
0
)
{
if
(
ql
>
0
)
{
...
...
This diff is collapsed.
Click to expand it.
src/include/bootstrap/bootstrap.h
View file @
4b2b8592
...
@@ -6,14 +6,16 @@
...
@@ -6,14 +6,16 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: bootstrap.h,v 1.
2 1996/11/06 10:29:05 scrappy
Exp $
* $Id: bootstrap.h,v 1.
3 1996/11/08 06:01:45 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#ifndef BOOTSTRAP_H
#ifndef BOOTSTRAP_H
#define BOOTSTRAP_H
#define BOOTSTRAP_H
#include "access/funcindex.h"
#include "access/itup.h"
#include "utils/rel.h"
#define MAXATTR 40
/* max. number of attributes in a relation */
#define MAXATTR 40
/* max. number of attributes in a relation */
...
...
This diff is collapsed.
Click to expand it.
src/include/commands/async.h
View file @
4b2b8592
...
@@ -6,13 +6,14 @@
...
@@ -6,13 +6,14 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: async.h,v 1.
3 1996/11/06 10:29:30 scrappy
Exp $
* $Id: async.h,v 1.
4 1996/11/08 06:01:49 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#ifndef ASYNC_H
#ifndef ASYNC_H
#define ASYNC_H
#define ASYNC_H
#include <nodes/memnodes.h>
extern
void
Async_NotifyHandler
(
SIGNAL_ARGS
);
extern
void
Async_NotifyHandler
(
SIGNAL_ARGS
);
extern
void
Async_Notify
(
char
*
relname
);
extern
void
Async_Notify
(
char
*
relname
);
...
...
This diff is collapsed.
Click to expand it.
src/include/config.h
View file @
4b2b8592
...
@@ -178,7 +178,8 @@
...
@@ -178,7 +178,8 @@
/* found in function aclparse() in src/backend/utils/adt/acl.c */
/* found in function aclparse() in src/backend/utils/adt/acl.c */
/* #define ACLDEBUG */
/* #define ACLDEBUG */
/* found in src/backend/utils/adt/arrayfuncs.c */
/* found in src/backend/utils/adt/arrayfuncs.c
code seems broken without it, Bruce Momjian */
/* #define LOARRAY */
/* #define LOARRAY */
/* This is the time, in seconds, at which a given backend server
/* This is the time, in seconds, at which a given backend server
...
...
This diff is collapsed.
Click to expand it.
src/include/rewrite/locks.h
View file @
4b2b8592
...
@@ -6,13 +6,16 @@
...
@@ -6,13 +6,16 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: locks.h,v 1.
2 1996/11/06 10:30:59 scrappy
Exp $
* $Id: locks.h,v 1.
3 1996/11/08 06:02:00 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#ifndef LOCKS_H
#ifndef LOCKS_H
#define LOCKS_H
#define LOCKS_H
#include "nodes/nodes.h"
#include "nodes/parsenodes.h"
#include "rewrite/prs2lock.h"
extern
List
*
matchLocks
(
CmdType
event
,
RuleLock
*
rulelocks
,
int
varno
,
extern
List
*
matchLocks
(
CmdType
event
,
RuleLock
*
rulelocks
,
int
varno
,
Query
*
parsetree
);
Query
*
parsetree
);
...
...
This diff is collapsed.
Click to expand it.
src/include/storage/fd.h
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: fd.h,v 1.
4 1996/11/04 07:45:53 scrappy
Exp $
* $Id: fd.h,v 1.
5 1996/11/08 06:02:12 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -85,5 +85,6 @@ extern void AllocateFile(void);
...
@@ -85,5 +85,6 @@ extern void AllocateFile(void);
extern
void
FreeFile
(
void
);
extern
void
FreeFile
(
void
);
extern
void
closeAllVfds
(
void
);
extern
void
closeAllVfds
(
void
);
extern
void
closeOneVfd
(
void
);
extern
void
closeOneVfd
(
void
);
extern
int
pg_fsync
(
int
fd
);
#endif
/* FD_H */
#endif
/* FD_H */
This diff is collapsed.
Click to expand it.
src/include/storage/lmgr.h
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: lmgr.h,v 1.
3 1996/11/05 06:10:59 scrappy
Exp $
* $Id: lmgr.h,v 1.
4 1996/11/08 06:02:18 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -78,4 +78,7 @@ extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action);
...
@@ -78,4 +78,7 @@ extern bool SingleLockReln(LockInfo linfo, LOCKT lockt, int action);
extern
bool
SingleLockPage
(
LockInfo
linfo
,
ItemPointer
tidPtr
,
extern
bool
SingleLockPage
(
LockInfo
linfo
,
ItemPointer
tidPtr
,
LOCKT
lockt
,
int
action
);
LOCKT
lockt
,
int
action
);
/* proc.c */
extern
void
InitProcGlobal
(
IPCKey
key
);
#endif
/* LMGR_H */
#endif
/* LMGR_H */
This diff is collapsed.
Click to expand it.
src/include/storage/smgr.h
View file @
4b2b8592
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: smgr.h,v 1.
2 1996/11/05 06:11:07 scrappy
Exp $
* $Id: smgr.h,v 1.
3 1996/11/08 06:02:22 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -82,4 +82,7 @@ extern int mmcommit(void);
...
@@ -82,4 +82,7 @@ extern int mmcommit(void);
extern
int
mmabort
(
void
);
extern
int
mmabort
(
void
);
extern
int
MMShmemSize
(
void
);
extern
int
MMShmemSize
(
void
);
/* smgrtype.c */
char
*
smgrout
(
int2
i
);
#endif
/* SMGR_H */
#endif
/* SMGR_H */
This diff is collapsed.
Click to expand it.
src/interfaces/libpq/Makefile
View file @
4b2b8592
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.1
2 1996/11/04 06:32:59 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.1
3 1996/11/08 06:02:25 momjian
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -33,21 +33,22 @@ VPATH:=$(VPATH):../backend/port/$(PORTNAME)
...
@@ -33,21 +33,22 @@ VPATH:=$(VPATH):../backend/port/$(PORTNAME)
OBJS
+=
getcwd.o putenv.o
OBJS
+=
getcwd.o putenv.o
endif
endif
ifdef
LINUX_ELF
shlib
:=
libpq.so.1
else
shlib
:=
shlib
:=
ifdef
LINUX_ELF
ifeq
($(PORTNAME), linux)
shlib
:=
obj/libpq.so.1
endif
endif
endif
all
:
libpq.a $(shlib) postgres.h c.h
all
:
obj/
libpq.a $(shlib) postgres.h c.h
libpq.a
:
$(OBJS)
obj/
libpq.a
:
$(OBJS)
ifdef
MK_NO_LORDER
ifdef
MK_NO_LORDER
$(AR)
$(AROPT)
libpq.a
$(OBJS)
$(AR)
$(AROPT)
obj/
libpq.a
$(OBJS)
else
else
$(AR)
$(AROPT)
libpq.a
`
lorder
$(OBJS)
|
tsort
`
$(AR)
$(AROPT)
obj/
libpq.a
`
lorder
$(OBJS)
|
tsort
`
endif
endif
$(RANLIB)
libpq.a
$(RANLIB)
obj/
libpq.a
fe-lobj.o
::
../backend/fmgr.h
fe-lobj.o
::
../backend/fmgr.h
...
@@ -60,8 +61,8 @@ fe-lobj.o:: ../backend/fmgr.h
...
@@ -60,8 +61,8 @@ fe-lobj.o:: ../backend/fmgr.h
../backend/lib/dllist.o
:
../backend/lib/dllist.o
:
$(MAKE)
-C
../backend/lib dllist.o
$(MAKE)
-C
../backend/lib dllist.o
libpq.so.1
:
$(OBJS)
obj/
libpq.so.1
:
$(OBJS)
$(CC)
$(LDFLAGS)
-shared
$(OBJS)
-o
libpq.so.1
$(CC)
$(LDFLAGS)
-shared
$(OBJS)
-o
obj/
libpq.so.1
postgres.h
:
../include/postgres.h
postgres.h
:
../include/postgres.h
# Note: ../backend/include/postgres.h needs to be named something different
# Note: ../backend/include/postgres.h needs to be named something different
...
@@ -127,17 +128,17 @@ install-shlib-dep :=
...
@@ -127,17 +128,17 @@ install-shlib-dep :=
endif
endif
install-libpq
:
install-libpq
:
$(INSTALL)
$(INSTL_LIB_OPTS)
libpq.a
$(DESTDIR)$(LIBDIR)
/libpq.a
$(INSTALL)
$(INSTL_LIB_OPTS)
obj/
libpq.a
$(DESTDIR)$(LIBDIR)
/libpq.a
install-shlib
:
install-shlib
:
$(INSTALL)
$(INSTL_LIB_OPTS)
libpq.so.1
$(DESTDIR)$(LIBDIR)
/libpq.so.1
$(INSTALL)
$(INSTL_LIB_OPTS)
obj/
libpq.so.1
$(DESTDIR)$(LIBDIR)
/libpq.so.1
depend dep
:
depend dep
:
$(CC)
-MM
$(INCLUDE_OPT)
*
.c
>
depend
$(CC)
-MM
$(INCLUDE_OPT)
*
.c
>
depend
.PHONY
:
clean
.PHONY
:
clean
clean
:
clean
:
rm
-f
libpq.a
libpq.so.1
$(OBJS)
c.h postgres.h
rm
-f
obj/libpq.a obj/
libpq.so.1
$(OBJS)
c.h postgres.h
ifeq
(depend,$(wildcard depend))
ifeq
(depend,$(wildcard depend))
include
depend
include
depend
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/libpq/fe-lobj.c
View file @
4b2b8592
...
@@ -7,10 +7,11 @@
...
@@ -7,10 +7,11 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.
2 1996/10/31 05:58:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.
3 1996/11/08 06:02:28
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <unistd.h>
#include <stdio.h>
#include <stdio.h>
#include <fcntl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/stat.h>
...
...
This diff is collapsed.
Click to expand it.
src/interfaces/libpq/pqsignal.c
View file @
4b2b8592
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.
1.1.1 1996/07/09 06:22:17 scrappy
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.
2 1996/11/08 06:02:30 momjian
Exp $
*
*
* NOTES
* NOTES
* This shouldn't be in libpq, but the monitor and some other
* This shouldn't be in libpq, but the monitor and some other
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
#include <stdlib.h>
#include "libpq/pqsignal.h"
#include "libpq/pqsignal.h"
pqsigfunc
pqsigfunc
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment