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
7344d698
Commit
7344d698
authored
Jul 23, 1996
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished merging in src/backend from Dr. George's source tree
parent
e11744e1
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
150 additions
and
25 deletions
+150
-25
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+11
-10
src/backend/commands/copy.c
src/backend/commands/copy.c
+100
-1
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+13
-2
src/backend/parser/Makefile.inc
src/backend/parser/Makefile.inc
+3
-3
src/backend/parser/gram.y
src/backend/parser/gram.y
+2
-2
src/backend/parser/scan.l
src/backend/parser/scan.l
+9
-1
src/backend/parser/scansup.c
src/backend/parser/scansup.c
+6
-2
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+4
-2
src/backend/rewrite/rewriteManip.c
src/backend/rewrite/rewriteManip.c
+2
-2
No files found.
src/backend/bootstrap/bootstrap.c
View file @
7344d698
...
...
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.
3 1996/07/16 07:12:27
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.
4 1996/07/23 02:23:05
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -187,7 +187,9 @@ typedef void (*sig_func)();
* error handling / abort routines
* ----------------
*/
#if !defined(PORTNAME_bsdi) && !defined(PORTNAME_bsdi_2_1)
# if !defined(PORTNAME_BSD44_derived) && \
!defined(PORTNAME_bsdi) && \
!defined(PORTNAME_bsdi_2_1)
void
err
()
{
Warnings
++
;
...
...
@@ -279,6 +281,11 @@ BootstrapMain(int argc, char *argv[])
case
'C'
:
Noversion
=
1
;
break
;
#ifdef OPENLINK_PATCHES
case
'F'
:
fsyncOff
=
1
;
break
;
#endif
case
'O'
:
override
=
true
;
break
;
...
...
@@ -288,12 +295,6 @@ BootstrapMain(int argc, char *argv[])
case
'P'
:
/* specify port */
portFd
=
atoi
(
optarg
);
break
;
#ifdef OPENLINK_PATCHES
case
'F'
:
fsyncOff
=
1
;
break
;
#endif
break
;
default:
usage
();
break
;
...
...
src/backend/commands/copy.c
View file @
7344d698
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.
1.1.1 1996/07/09 06:21:19
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.
2 1996/07/23 02:23:15
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -650,6 +650,10 @@ GetIndexRelations(Oid main_relation_oid,
heap_endscan
(
scandesc
);
heap_close
(
pg_index_rel
);
/* We cannot trust to relhasindex of the main_relation now, so... */
if
(
*
n_indices
==
0
)
return
;
*
index_rels
=
(
Relation
*
)
palloc
(
*
n_indices
*
sizeof
(
Relation
));
for
(
i
=
0
,
scan
=
head
;
i
<
*
n_indices
;
i
++
,
scan
=
scan
->
next
)
{
...
...
@@ -726,6 +730,67 @@ CopyReadAttribute(int attno, FILE *fp, bool *isnull, char *delim)
}
}
else
if
(
c
==
'\\'
)
{
c
=
getc
(
fp
);
#ifdef ESCAPE_PATCH
#define ISOCTAL(c) (((c) >= '0') && ((c) <= '7'))
#define VALUE(c) ((c) - '0')
if
(
feof
(
fp
))
{
*
isnull
=
(
bool
)
false
;
return
(
NULL
);
}
switch
(
c
)
{
case
'0'
:
case
'1'
:
case
'2'
:
case
'3'
:
case
'4'
:
case
'5'
:
case
'6'
:
case
'7'
:
{
int
val
;
val
=
VALUE
(
c
);
c
=
getc
(
fp
);
if
(
ISOCTAL
(
c
))
{
val
=
(
val
<<
3
)
+
VALUE
(
c
);
c
=
getc
(
fp
);
if
(
ISOCTAL
(
c
))
{
val
=
(
val
<<
3
)
+
VALUE
(
c
);
}
else
{
if
(
feof
(
fp
))
{
*
isnull
=
(
bool
)
false
;
return
(
NULL
);
}
ungetc
(
c
,
fp
);
}
}
else
{
if
(
feof
(
fp
))
{
*
isnull
=
(
bool
)
false
;
return
(
NULL
);
}
ungetc
(
c
,
fp
);
}
c
=
val
&
0377
;
}
break
;
case
'b'
:
c
=
'\b'
;
break
;
case
'f'
:
c
=
'\f'
;
break
;
case
'n'
:
c
=
'\n'
;
break
;
case
'r'
:
c
=
'\r'
;
break
;
case
't'
:
c
=
'\t'
;
break
;
case
'v'
:
c
=
'\v'
;
break
;
}
#endif
}
else
if
(
inString
(
c
,
delim
)
||
c
==
'\n'
)
{
done
=
1
;
}
...
...
@@ -743,6 +808,39 @@ CopyReadAttribute(int attno, FILE *fp, bool *isnull, char *delim)
}
}
#ifdef ESCAPE_PATCH
static
void
CopyAttributeOut
(
FILE
*
fp
,
char
*
string
,
char
*
delim
)
{
char
c
;
int
is_array
=
false
;
int
len
=
strlen
(
string
);
/* XXX - This is a kludge, we should check the data type */
if
(
len
&&
(
string
[
0
]
==
'{'
)
&&
(
string
[
len
-
1
]
==
'}'
))
{
is_array
=
true
;
}
for
(
;
c
=
*
string
;
string
++
)
{
if
((
c
==
delim
[
0
])
||
(
c
==
'\n'
))
{
fputc
(
'\\'
,
fp
);
}
else
if
((
c
==
'\\'
)
&&
is_array
)
{
if
(
*
(
string
+
1
)
==
'\\'
)
{
/* translate \\ to \\\\ */
fputc
(
'\\'
,
fp
);
fputc
(
'\\'
,
fp
);
fputc
(
'\\'
,
fp
);
string
++
;
}
else
if
(
*
(
string
+
1
)
==
'"'
)
{
/* translate \" to \\\" */
fputc
(
'\\'
,
fp
);
fputc
(
'\\'
,
fp
);
}
}
fputc
(
*
string
,
fp
);
}
}
#else
static
void
CopyAttributeOut
(
FILE
*
fp
,
char
*
string
,
char
*
delim
)
{
...
...
@@ -756,6 +854,7 @@ CopyAttributeOut(FILE *fp, char *string, char *delim)
fputc
(
string
[
i
],
fp
);
}
}
#endif
/*
* Returns the number of tuples in a relation. Unfortunately, currently
...
...
src/backend/libpq/pqcomm.c
View file @
7344d698
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.
1.1.1 1996/07/09 06:21:31
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.
2 1996/07/23 02:23:25
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -551,6 +551,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
{
struct
sockaddr_in
sin
;
int
fd
;
int
one
=
1
;
#ifdef WIN32
/* This is necessary to make it possible for a backend to use
...
...
@@ -576,6 +577,16 @@ StreamServerPort(char *hostName, short portName, int *fdP)
return
(
STATUS_ERROR
);
}
if
((
setsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
char
*
)
&
one
,
sizeof
(
one
)))
==
-
1
)
{
(
void
)
sprintf
(
PQerrormsg
,
"FATAL: StreamServerPort: setsockopt (SO_REUSEADDR) failed: errno=%d
\n
"
,
errno
);
fputs
(
PQerrormsg
,
stderr
);
pqdebug
(
"%s"
,
PQerrormsg
);
return
(
STATUS_ERROR
);
}
sin
.
sin_family
=
AF_INET
;
sin
.
sin_port
=
htons
(
portName
);
...
...
src/backend/parser/Makefile.inc
View file @
7344d698
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.
1.1.1 1996/07/09 06:21:39
scrappy Exp $
# $Header: /cvsroot/pgsql/src/backend/parser/Attic/Makefile.inc,v 1.
2 1996/07/23 02:23:32
scrappy Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -34,13 +34,13 @@ $(objdir)/scan.o: scan.c
SRCS_PARSER
+=
analyze.c catalog_utils.c dbcommands.c gram.c
\
keywords.c parser.c parse_query.c scan.c scansup.c
keywords.c parser.c parse_query.c scan.c scansup.c
sysfunc.c
CLEANFILES
+=
scan.c
${PARSEYACCS}
POSTGRES_DEPEND
+=
scan.c
$(PARSEYACCS)
HEADERS
+=
catalog_utils.h io.h parse_query.h parsetree.h
\
dbcommands.h keywords.h
dbcommands.h keywords.h
sysfunc.c
src/backend/parser/gram.y
View file @
7344d698
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.
1.1.1 1996/07/09 06:21:40
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 1.
2 1996/07/23 02:23:33
scrappy Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
...
...
@@ -515,7 +515,7 @@ fetch_how_many: Iconst
{ $$ = $1;
if ($1 <= 0) elog(WARN,"Please specify nonnegative count for fetch"); }
| ALL { $$ = 0; /* 0 means fetch all tuples*/}
| /*EMPTY*/ { $$ =
0
; /*default*/ }
| /*EMPTY*/ { $$ =
1
; /*default*/ }
;
/*****************************************************************************
...
...
src/backend/parser/scan.l
View file @
7344d698
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.
1.1.1 1996/07/09 06:21:41
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.
2 1996/07/23 02:23:34
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,6 +29,7 @@
#include "nodes/parsenodes.h"
#include "parser/keywords.h"
#include "parser/scansup.h"
#include "parser/sysfunc.h"
#include "parse.h"
#include "utils/elog.h"
#include "utils/palloc.h"
...
...
@@ -61,6 +62,8 @@ digit [0-9]
letter [_A-Za-z]
letter_or_digit [_A-Za-z0-9]
sysfunc SYS_{letter}{letter_or_digit}*
identifier {letter}{letter_or_digit}*
self [,()\[\].;$\:\+\-\*\/\<\>\=\|]
...
...
@@ -83,6 +86,11 @@ space [ \t\n\f]
other .
%%
{sysfunc} {
yylval.str = pstrdup(SystemFunctionHandler((char *)yytext));
return (SCONST);
}
{comment} { /* ignore */ }
"::" { return TYPECAST; }
...
...
src/backend/parser/scansup.c
View file @
7344d698
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.
1.1.1 1996/07/09 06:21:41
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scansup.c,v 1.
2 1996/07/23 02:23:35
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -134,7 +134,11 @@ scanstr(char *s)
}
}
default:
#ifdef ESCAPE_PATCH
newStr
[
j
]
=
s
[
i
];
#else
elog
(
WARN
,
"Bad escape sequence, s[i] = %d"
,
s
[
i
]);
#endif
}
/* switch */
}
/* s[i] == '\\' */
else
...
...
src/backend/postmaster/postmaster.c
View file @
7344d698
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
2 1996/07/16 07:13:0
7 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.
3 1996/07/23 02:23:4
7 scrappy Exp $
*
* NOTES
*
...
...
@@ -49,7 +49,9 @@
#define MAXINT INT_MAX
#else
#include <netdb.h>
/* for MAXHOSTNAMELEN on some */
# if defined(PORTNAME_BSD44_derived) || defined(PORTNAME_bsdi) || defined(PORTNAME_bsdi_2_1)
# if defined(PORTNAME_BSD44_derived) || \
defined(PORTNAME_bsdi) || \
defined(PORTNAME_bsdi_2_1)
# include <machine/limits.h>
# define MAXINT INT_MAX
# else
...
...
src/backend/rewrite/rewriteManip.c
View file @
7344d698
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.
1.1.1 1996/07/09 06:21:52
scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.
2 1996/07/23 02:23:54
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -319,7 +319,7 @@ nodeHandleRIRAttributeRule(Node **nodePtr,
if
(
name_to_look_for
.
data
[
0
])
{
Node
*
n
;
n
=
FindMatchingTLEntry
(
targetlist
,
&
name_to_look_for
);
n
=
FindMatchingTLEntry
(
targetlist
,
(
char
*
)
&
name_to_look_for
);
if
(
n
==
NULL
)
{
*
nodePtr
=
make_null
(((
Var
*
)
node
)
->
vartype
);
}
else
{
...
...
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