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
25a64f75
Commit
25a64f75
authored
Sep 21, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for \z formatting from Tom Lane.
parent
4b048fbf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
72 additions
and
17 deletions
+72
-17
src/backend/optimizer/util/ordering.c
src/backend/optimizer/util/ordering.c
+1
-6
src/bin/psql/psql.c
src/bin/psql/psql.c
+49
-9
src/include/port/svr4.h
src/include/port/svr4.h
+7
-0
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+14
-1
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+1
-1
No files found.
src/backend/optimizer/util/ordering.c
View file @
25a64f75
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.
7 1998/09/01 03:23:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.
8 1998/09/21 02:25:21
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -38,14 +38,11 @@ equal_path_path_ordering(PathOrder *path_ordering1,
if
(
path_ordering1
->
ordtype
==
MERGE_ORDER
&&
path_ordering2
->
ordtype
==
MERGE_ORDER
)
{
return
equal
(
path_ordering1
->
ord
.
merge
,
path_ordering2
->
ord
.
merge
);
}
else
if
(
path_ordering1
->
ordtype
==
SORTOP_ORDER
&&
path_ordering2
->
ordtype
==
SORTOP_ORDER
)
{
return
(
equal_sortops_order
(
path_ordering1
->
ord
.
sortop
,
path_ordering2
->
ord
.
sortop
));
...
...
@@ -53,14 +50,12 @@ equal_path_path_ordering(PathOrder *path_ordering1,
else
if
(
path_ordering1
->
ordtype
==
MERGE_ORDER
&&
path_ordering2
->
ordtype
==
SORTOP_ORDER
)
{
return
(
path_ordering2
->
ord
.
sortop
&&
(
path_ordering1
->
ord
.
merge
->
left_operator
==
path_ordering2
->
ord
.
sortop
[
0
]));
}
else
{
return
(
path_ordering1
->
ord
.
sortop
&&
(
path_ordering1
->
ord
.
sortop
[
0
]
==
path_ordering2
->
ord
.
merge
->
left_operator
));
...
...
src/bin/psql/psql.c
View file @
25a64f75
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.16
0 1998/09/03 05:08:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.16
1 1998/09/21 02:25:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -156,6 +156,7 @@ static int tableList(PsqlSettings *pset, bool deep_tablelist,
static
int
tableDesc
(
PsqlSettings
*
pset
,
char
*
table
,
FILE
*
fout
);
static
int
objectDescription
(
PsqlSettings
*
pset
,
char
*
object
);
static
int
rightsList
(
PsqlSettings
*
pset
);
static
void
emitNtimes
(
FILE
*
fout
,
const
char
*
str
,
int
N
);
static
void
prompt_for_password
(
char
*
username
,
char
*
password
);
static
char
*
gets_noreadline
(
char
*
prompt
,
FILE
*
source
);
...
...
@@ -244,7 +245,7 @@ slashUsage(PsqlSettings *pset)
/* if you add/remove a line here, change the row test above */
fprintf
(
fout
,
"
\\
? -- help
\n
"
);
fprintf
(
fout
,
"
\\
a -- toggle field-alignment (currenty %s)
\n
"
,
on
(
pset
->
opt
.
align
));
fprintf
(
fout
,
"
\\
a -- toggle field-alignment (current
l
y %s)
\n
"
,
on
(
pset
->
opt
.
align
));
fprintf
(
fout
,
"
\\
C [<captn>] -- set html3 caption (currently '%s')
\n
"
,
pset
->
opt
.
caption
?
pset
->
opt
.
caption
:
""
);
fprintf
(
fout
,
"
\\
connect <dbname|-> <user> -- connect to new database (currently '%s')
\n
"
,
PQdb
(
pset
->
db
));
fprintf
(
fout
,
"
\\
copy table {from | to} <fname>
\n
"
);
...
...
@@ -540,6 +541,8 @@ rightsList(PsqlSettings *pset)
char
listbuf
[
512
];
int
nColumns
;
int
i
;
int
maxCol1Len
;
int
maxCol2Len
;
int
usePipe
=
0
;
char
*
pagerenv
;
FILE
*
fout
;
...
...
@@ -583,21 +586,50 @@ rightsList(PsqlSettings *pset)
else
fout
=
stdout
;
/* choose column widths */
maxCol1Len
=
strlen
(
"Relation"
);
maxCol2Len
=
strlen
(
"Grant/Revoke Permissions"
);
for
(
i
=
0
;
i
<
PQntuples
(
res
);
i
++
)
{
int
l
=
strlen
(
PQgetvalue
(
res
,
i
,
0
));
if
(
l
>
maxCol1Len
)
maxCol1Len
=
l
;
l
=
strlen
(
PQgetvalue
(
res
,
i
,
1
));
if
(
l
>
maxCol2Len
)
maxCol2Len
=
l
;
}
/* Display the information */
fprintf
(
fout
,
"
\n
Database = %s
\n
"
,
PQdb
(
pset
->
db
));
fprintf
(
fout
,
" +------------------+----------------------------------------------------+
\n
"
);
fprintf
(
fout
,
" | Relation | Grant/Revoke Permissions |
\n
"
);
fprintf
(
fout
,
" +------------------+----------------------------------------------------+
\n
"
);
fprintf
(
fout
,
" +"
);
emitNtimes
(
fout
,
"-"
,
maxCol1Len
+
2
);
fprintf
(
fout
,
"+"
);
emitNtimes
(
fout
,
"-"
,
maxCol2Len
+
2
);
fprintf
(
fout
,
"+
\n
"
);
fprintf
(
fout
,
" | %-*s | %-*s |
\n
"
,
maxCol1Len
,
"Relation"
,
maxCol2Len
,
"Grant/Revoke Permissions"
);
fprintf
(
fout
,
" +"
);
emitNtimes
(
fout
,
"-"
,
maxCol1Len
+
2
);
fprintf
(
fout
,
"+"
);
emitNtimes
(
fout
,
"-"
,
maxCol2Len
+
2
);
fprintf
(
fout
,
"+
\n
"
);
/* next, print out the instances */
for
(
i
=
0
;
i
<
PQntuples
(
res
);
i
++
)
{
fprintf
(
fout
,
" | %-
16.16s"
,
PQgetvalue
(
res
,
i
,
0
));
fprintf
(
fout
,
" | %-50.50s | "
,
PQgetvalue
(
res
,
i
,
1
));
fprintf
(
fout
,
"
\n
"
);
fprintf
(
fout
,
" | %-
*s | %-*s |
\n
"
,
maxCol1Len
,
PQgetvalue
(
res
,
i
,
0
),
maxCol2Len
,
PQgetvalue
(
res
,
i
,
1
)
);
}
fprintf
(
fout
,
" +------------------+----------------------------------------------------+
\n
"
);
fprintf
(
fout
,
" +"
);
emitNtimes
(
fout
,
"-"
,
maxCol1Len
+
2
);
fprintf
(
fout
,
"+"
);
emitNtimes
(
fout
,
"-"
,
maxCol2Len
+
2
);
fprintf
(
fout
,
"+
\n
"
);
PQclear
(
res
);
if
(
usePipe
)
{
...
...
@@ -614,6 +646,14 @@ rightsList(PsqlSettings *pset)
}
}
static
void
emitNtimes
(
FILE
*
fout
,
const
char
*
str
,
int
N
)
{
int
i
;
for
(
i
=
0
;
i
<
N
;
i
++
)
{
fputs
(
str
,
fout
);
}
}
/*
* Describe a table
*
...
...
src/include/port/svr4.h
View file @
25a64f75
...
...
@@ -8,3 +8,10 @@
#define BYTE_ORDER BIG_ENDIAN
#endif
#endif
#ifdef sinix
#define HAS_TEST_AND_SET
#include <abi_mutex.h>
typedef
abilock_t
slock_t
;
#endif
src/include/storage/s_lock.h
View file @
25a64f75
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.
49 1998/09/18 17:18:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.
50 1998/09/21 02:25:27
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -273,6 +273,19 @@ static const slock_t clear_lock =
#define S_LOCK_FREE(lock) (test_then_add(lock,0) == 0)
#endif
/* __sgi */
#if defined(sinix)
/*
* SINIX / Reliant UNIX
* slock_t is defined as a struct abilock_t, which has a single unsigned long
* member. (Basically same as SGI)
*
*/
#define TAS(lock) (!acquire_lock(lock))
#define S_UNLOCK(lock) release_lock(lock)
#define S_INIT_LOCK(lock) init_lock(lock)
#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
#endif
/* sinix */
#if defined(_AIX)
/*
...
...
src/interfaces/ecpg/preproc/Makefile
View file @
25a64f75
...
...
@@ -25,7 +25,7 @@ uninstall:
# Rule that really do something.
ecpg
:
$(OBJ)
$(CC)
-o
ecpg
$(OBJ)
$(LEXLIB)
$(CC)
-o
ecpg
$(OBJ)
$(LEXLIB)
$(LDFLAGS)
y.tab.h y.tab.c
:
preproc.y
$(YACC)
$(YFLAGS)
$<
...
...
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