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
87675fab
Commit
87675fab
authored
Feb 24, 2002
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pgindent copy.c. Patch wasn't in proper format.
parent
0cd8cb1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
src/backend/commands/copy.c
src/backend/commands/copy.c
+23
-20
No files found.
src/backend/commands/copy.c
View file @
87675fab
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.14
7 2002/02/24 02:32:26
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.14
8 2002/02/24 02:33:33
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -327,6 +327,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
else
{
struct
stat
st
;
fp
=
AllocateFile
(
filename
,
PG_BINARY_R
);
if
(
fp
==
NULL
)
...
...
@@ -335,10 +336,11 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
"reading. Errno = %s (%d)."
,
(
int
)
geteuid
(),
filename
,
strerror
(
errno
),
errno
);
fstat
(
fileno
(
fp
),
&
st
);
if
(
S_ISDIR
(
st
.
st_mode
)
){
fstat
(
fileno
(
fp
),
&
st
);
if
(
S_ISDIR
(
st
.
st_mode
))
{
FreeFile
(
fp
);
elog
(
ERROR
,
"COPY: %s is a directory."
,
filename
);
elog
(
ERROR
,
"COPY: %s is a directory."
,
filename
);
}
}
CopyFrom
(
rel
,
binary
,
oids
,
fp
,
delim
,
null_print
);
...
...
@@ -387,10 +389,11 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
"effective uid %d, could not open file '%s' for "
"writing. Errno = %s (%d)."
,
(
int
)
geteuid
(),
filename
,
strerror
(
errno
),
errno
);
fstat
(
fileno
(
fp
),
&
st
);
if
(
S_ISDIR
(
st
.
st_mode
)
){
fstat
(
fileno
(
fp
),
&
st
);
if
(
S_ISDIR
(
st
.
st_mode
))
{
FreeFile
(
fp
);
elog
(
ERROR
,
"COPY: %s is a directory."
,
filename
);
elog
(
ERROR
,
"COPY: %s is a directory."
,
filename
);
}
}
CopyTo
(
rel
,
binary
,
oids
,
fp
,
delim
,
null_print
);
...
...
@@ -1097,25 +1100,25 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline, char *null_
if
(
ISOCTAL
(
c
))
{
val
=
(
val
<<
3
)
+
OCTVALUE
(
c
);
CopyDonePeek
(
fp
,
c
,
true
/*
pick up*/
);
CopyDonePeek
(
fp
,
c
,
true
/*
pick up */
);
c
=
CopyPeekChar
(
fp
);
if
(
ISOCTAL
(
c
))
{
val
=
(
val
<<
3
)
+
OCTVALUE
(
c
);
CopyDonePeek
(
fp
,
c
,
true
/*
pick up*/
);
CopyDonePeek
(
fp
,
c
,
true
/*
pick up */
);
}
else
{
if
(
c
==
EOF
)
goto
endOfFile
;
CopyDonePeek
(
fp
,
c
,
false
/*
put back*/
);
CopyDonePeek
(
fp
,
c
,
false
/*
put back */
);
}
}
else
{
if
(
c
==
EOF
)
goto
endOfFile
;
CopyDonePeek
(
fp
,
c
,
false
/*
put back*/
);
CopyDonePeek
(
fp
,
c
,
false
/*
put back */
);
}
c
=
val
&
0377
;
}
...
...
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