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
40a89e08
Commit
40a89e08
authored
Jul 15, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups.
parent
fb38a5d8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
18 deletions
+36
-18
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lmgr.c
+2
-2
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+5
-5
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/multi.c
+2
-2
src/include/optimizer/geqo_random.h
src/include/optimizer/geqo_random.h
+3
-3
src/include/storage/lock.h
src/include/storage/lock.h
+4
-4
src/tools/pginclude/pgfixinclude
src/tools/pginclude/pgfixinclude
+18
-0
src/tools/pginclude/pgnoinclude
src/tools/pginclude/pgnoinclude
+2
-2
No files found.
src/backend/storage/lmgr/lmgr.c
View file @
40a89e08
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.2
8 1999/07/15 15:19:51
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.2
9 1999/07/15 20:32:27
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
extern
Oid
MyDatabaseId
;
extern
Oid
MyDatabaseId
;
static
MASK
LockConflicts
[]
=
{
static
LOCK
MASK
LockConflicts
[]
=
{
(
int
)
NULL
,
(
int
)
NULL
,
/* AccessShareLock */
/* AccessShareLock */
...
...
src/backend/storage/lmgr/lock.c
View file @
40a89e08
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.5
6 1999/07/15 15:19:52
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.5
7 1999/07/15 20:32:27
momjian Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -162,8 +162,8 @@ SPINLOCK LockMgrLock; /* in Shmem or created in
...
@@ -162,8 +162,8 @@ SPINLOCK LockMgrLock; /* in Shmem or created in
/* This is to simplify/speed up some bit arithmetic */
/* This is to simplify/speed up some bit arithmetic */
static
MASK
BITS_OFF
[
MAX_LOCKMODES
];
static
LOCK
MASK
BITS_OFF
[
MAX_LOCKMODES
];
static
MASK
BITS_ON
[
MAX_LOCKMODES
];
static
LOCK
MASK
BITS_ON
[
MAX_LOCKMODES
];
/* -----------------
/* -----------------
* XXX Want to move this to this file
* XXX Want to move this to this file
...
@@ -231,7 +231,7 @@ LockDisable(int status)
...
@@ -231,7 +231,7 @@ LockDisable(int status)
*/
*/
static
void
static
void
LockMethodInit
(
LOCKMETHODTABLE
*
lockMethodTable
,
LockMethodInit
(
LOCKMETHODTABLE
*
lockMethodTable
,
MASK
*
conflictsP
,
LOCK
MASK
*
conflictsP
,
int
*
prioP
,
int
*
prioP
,
int
numModes
)
int
numModes
)
{
{
...
@@ -258,7 +258,7 @@ LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
...
@@ -258,7 +258,7 @@ LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
*/
*/
LOCKMETHOD
LOCKMETHOD
LockMethodTableInit
(
char
*
tabName
,
LockMethodTableInit
(
char
*
tabName
,
MASK
*
conflictsP
,
LOCK
MASK
*
conflictsP
,
int
*
prioP
,
int
*
prioP
,
int
numModes
)
int
numModes
)
{
{
...
...
src/backend/storage/lmgr/multi.c
View file @
40a89e08
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
29 1999/05/25 16:11:22
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.
30 1999/07/15 20:32:27
momjian Exp $
*
*
* NOTES:
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
* (1) The lock.c module assumes that the caller here is doing
...
@@ -41,7 +41,7 @@ static bool MultiRelease(LOCKMETHOD lockmethod, LOCKTAG *tag,
...
@@ -41,7 +41,7 @@ static bool MultiRelease(LOCKMETHOD lockmethod, LOCKTAG *tag,
* WRITE conflict between the tuple's intent lock and the relation's
* WRITE conflict between the tuple's intent lock and the relation's
* write lock.
* write lock.
*/
*/
static
MASK
MultiConflicts
[]
=
{
static
LOCK
MASK
MultiConflicts
[]
=
{
(
int
)
NULL
,
(
int
)
NULL
,
/* All reads and writes at any level conflict with a write lock */
/* All reads and writes at any level conflict with a write lock */
(
1
<<
WRITE_LOCK
)
|
(
1
<<
WRITE_INTENT
)
|
(
1
<<
READ_LOCK
)
|
(
1
<<
READ_INTENT
),
(
1
<<
WRITE_LOCK
)
|
(
1
<<
WRITE_INTENT
)
|
(
1
<<
READ_LOCK
)
|
(
1
<<
READ_INTENT
),
...
...
src/include/optimizer/geqo_random.h
View file @
40a89e08
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: geqo_random.h,v 1.
4 1999/02/13 23:21:4
8 momjian Exp $
* $Id: geqo_random.h,v 1.
5 1999/07/15 20:32:2
8 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
#include <math.h>
#include <math.h>
#define MASK 2147483647
#define
GEQO
MASK 2147483647
#define geqo_rand() ((double)random()/MASK)
#define geqo_rand() ((double)random()/
GEQO
MASK)
/* geqo_randint returns integer value
/* geqo_randint returns integer value
between lower and upper inclusive */
between lower and upper inclusive */
...
...
src/include/storage/lock.h
View file @
40a89e08
...
@@ -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: lock.h,v 1.3
0 1999/06/01 09:35:39 vadim
Exp $
* $Id: lock.h,v 1.3
1 1999/07/15 20:32:29 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include <utils/array.h>
#include <utils/array.h>
extern
SPINLOCK
LockMgrLock
;
extern
SPINLOCK
LockMgrLock
;
typedef
int
MASK
;
typedef
int
LOCK
MASK
;
#define INIT_TABLE_SIZE 100
#define INIT_TABLE_SIZE 100
#define MAX_TABLE_SIZE 1000
#define MAX_TABLE_SIZE 1000
...
@@ -41,7 +41,7 @@ typedef int MASK;
...
@@ -41,7 +41,7 @@ typedef int MASK;
typedef
int
LOCKMODE
;
typedef
int
LOCKMODE
;
typedef
int
LOCKMETHOD
;
typedef
int
LOCKMETHOD
;
/* MAX_LOCKMODES cannot be larger than the bits in MASK */
/* MAX_LOCKMODES cannot be larger than the bits in
LOCK
MASK */
#define MAX_LOCKMODES 8
#define MAX_LOCKMODES 8
/*
/*
...
@@ -241,7 +241,7 @@ extern SPINLOCK LockMgrLock;
...
@@ -241,7 +241,7 @@ extern SPINLOCK LockMgrLock;
*/
*/
extern
void
InitLocks
(
void
);
extern
void
InitLocks
(
void
);
extern
void
LockDisable
(
int
status
);
extern
void
LockDisable
(
int
status
);
extern
LOCKMETHOD
LockMethodTableInit
(
char
*
tabName
,
MASK
*
conflictsP
,
extern
LOCKMETHOD
LockMethodTableInit
(
char
*
tabName
,
LOCK
MASK
*
conflictsP
,
int
*
prioP
,
int
numModes
);
int
*
prioP
,
int
numModes
);
extern
LOCKMETHOD
LockMethodTableRename
(
LOCKMETHOD
lockmethod
);
extern
LOCKMETHOD
LockMethodTableRename
(
LOCKMETHOD
lockmethod
);
extern
bool
LockAcquire
(
LOCKMETHOD
lockmethod
,
LOCKTAG
*
locktag
,
extern
bool
LockAcquire
(
LOCKMETHOD
lockmethod
,
LOCKTAG
*
locktag
,
...
...
src/tools/pginclude/pgfixinclude
0 → 100755
View file @
40a89e08
:
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
find . \( -name CVS -a -prune \) -o -type f -print |
while read FILE
do
cat /tmp/$$a | grep "^#include" |
sed 's/^#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
while read INCLUDE
do
if [ -s /usr/include/"$INCLUDE" ]
then cat "$FILE" |
sed 's/^#include[ ]*[<"]'"$INCLUDE"'[>"]$/#include <'"$INCLUDE"'>/g' >/tmp/$$
else cat "$FILE" |
sed 's/^#include[ ]*[<"]'"$INCLUDE"'[>"]$/#include "'"$INCLUDE"'"/g' >/tmp/$$
fi
cat /tmp/$$ > "$FILE"
done
done
src/tools/pginclude/pgnoinclude
View file @
40a89e08
...
@@ -14,7 +14,7 @@ do
...
@@ -14,7 +14,7 @@ do
else cat "$FILE" >/tmp/$$a
else cat "$FILE" >/tmp/$$a
fi
fi
cat /tmp/$$a | grep "^#include" |
cat /tmp/$$a | grep "^#include" |
sed 's/#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
sed 's/
^
#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
while read INCLUDE
while read INCLUDE
do
do
[ -s /usr/include/$INCLUDE ] && continue
[ -s /usr/include/$INCLUDE ] && continue
...
@@ -36,7 +36,7 @@ do
...
@@ -36,7 +36,7 @@ do
if [ "$?" -eq 0 ]
if [ "$?" -eq 0 ]
then echo "$FILE $INCLUDE"
then echo "$FILE $INCLUDE"
if [ "$IS_INCLUDE" = "N" ]
if [ "$IS_INCLUDE" = "N" ]
then grep -v '
#include[ ]*[<"]$INCLUDE
[>"]' $FILE >/tmp/$$b
then grep -v '
^#include[ ][ ]*[<"]'"$INCLUDE"'
[>"]' $FILE >/tmp/$$b
mv /tmp/$$b "$FILE"
mv /tmp/$$b "$FILE"
fi
fi
if [ "$1" = "-v" ]
if [ "$1" = "-v" ]
...
...
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