mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Remove tabs after spaces in C comments
This was not changed in HEAD, but will be done later as part of a pgindent run. Future pgindent runs will also do this. Report by Tom Lane Backpatch through all supported branches, but not HEAD
This commit is contained in:
@@ -187,7 +187,7 @@ typedef struct CopyStateData
|
||||
|
||||
/*
|
||||
* Finally, raw_buf holds raw data read from the data source (file or
|
||||
* client connection). CopyReadLine parses this data sufficiently to
|
||||
* client connection). CopyReadLine parses this data sufficiently to
|
||||
* locate line boundaries, then transfers the data to line_buf and
|
||||
* converts it. Note: we guarantee that there is a \0 at
|
||||
* raw_buf[raw_buf_len].
|
||||
@@ -213,7 +213,7 @@ typedef struct
|
||||
* function call overhead in tight COPY loops.
|
||||
*
|
||||
* We must use "if (1)" because the usual "do {...} while(0)" wrapper would
|
||||
* prevent the continue/break processing from working. We end the "if (1)"
|
||||
* prevent the continue/break processing from working. We end the "if (1)"
|
||||
* with "else ((void) 0)" to ensure the "if" does not unintentionally match
|
||||
* any "else" in the calling code, and to avoid any compiler warnings about
|
||||
* empty statements. See http://www.cit.gu.edu.au/~anthony/info/C/C.macros.
|
||||
@@ -547,7 +547,7 @@ CopySendEndOfRow(CopyState cstate)
|
||||
* CopyGetData reads data from the source (file or frontend)
|
||||
*
|
||||
* We attempt to read at least minread, and at most maxread, bytes from
|
||||
* the source. The actual number of bytes read is returned; if this is
|
||||
* the source. The actual number of bytes read is returned; if this is
|
||||
* less than minread, EOF was detected.
|
||||
*
|
||||
* Note: when copying from the frontend, we expect a proper EOF mark per
|
||||
@@ -764,7 +764,7 @@ CopyLoadRawBuf(CopyState cstate)
|
||||
* we also support copying the output of an arbitrary SELECT query.
|
||||
*
|
||||
* If <pipe> is false, transfer is between the table and the file named
|
||||
* <filename>. Otherwise, transfer is between the table and our regular
|
||||
* <filename>. Otherwise, transfer is between the table and our regular
|
||||
* input/output stream. The latter could be either stdin/stdout or a
|
||||
* socket, depending on whether we're running under Postmaster control.
|
||||
*
|
||||
@@ -1271,7 +1271,7 @@ BeginCopy(bool is_from,
|
||||
errmsg("COPY (SELECT) WITH OIDS is not supported")));
|
||||
|
||||
/*
|
||||
* Run parse analysis and rewrite. Note this also acquires sufficient
|
||||
* Run parse analysis and rewrite. Note this also acquires sufficient
|
||||
* locks on the source table(s).
|
||||
*
|
||||
* Because the parser and planner tend to scribble on their input, we
|
||||
@@ -1681,7 +1681,7 @@ CopyTo(CopyState cstate)
|
||||
* Create a temporary memory context that we can reset once per row to
|
||||
* recover palloc'd memory. This avoids any problems with leaks inside
|
||||
* datatype output routines, and should be faster than retail pfree's
|
||||
* anyway. (We don't need a whole econtext as CopyFrom does.)
|
||||
* anyway. (We don't need a whole econtext as CopyFrom does.)
|
||||
*/
|
||||
cstate->rowcontext = AllocSetContextCreate(CurrentMemoryContext,
|
||||
"COPY TO",
|
||||
@@ -2837,7 +2837,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext,
|
||||
* if client chooses to send that now.
|
||||
*
|
||||
* Note that we MUST NOT try to read more data in an old-protocol
|
||||
* copy, since there is no protocol-level EOF marker then. We
|
||||
* copy, since there is no protocol-level EOF marker then. We
|
||||
* could go either way for copy from file, but choose to throw
|
||||
* error if there's data after the EOF marker, for consistency
|
||||
* with the new-protocol case.
|
||||
@@ -2899,7 +2899,7 @@ NextCopyFrom(CopyState cstate, ExprContext *econtext,
|
||||
|
||||
/*
|
||||
* Now compute and insert any defaults available for the columns not
|
||||
* provided by the input data. Anything not processed here or above will
|
||||
* provided by the input data. Anything not processed here or above will
|
||||
* remain NULL.
|
||||
*/
|
||||
for (i = 0; i < num_defaults; i++)
|
||||
@@ -2934,7 +2934,7 @@ EndCopyFrom(CopyState cstate)
|
||||
* server encoding.
|
||||
*
|
||||
* Result is true if read was terminated by EOF, false if terminated
|
||||
* by newline. The terminating newline or EOF marker is not included
|
||||
* by newline. The terminating newline or EOF marker is not included
|
||||
* in the final value of line_buf.
|
||||
*/
|
||||
static bool
|
||||
@@ -3090,7 +3090,7 @@ CopyReadLineText(CopyState cstate)
|
||||
* of read-ahead and avoid the many calls to
|
||||
* IF_NEED_REFILL_AND_NOT_EOF_CONTINUE(), but the COPY_OLD_FE protocol
|
||||
* does not allow us to read too far ahead or we might read into the
|
||||
* next data, so we read-ahead only as far we know we can. One
|
||||
* next data, so we read-ahead only as far we know we can. One
|
||||
* optimization would be to read-ahead four byte here if
|
||||
* cstate->copy_dest != COPY_OLD_FE, but it hardly seems worth it,
|
||||
* considering the size of the buffer.
|
||||
@@ -3100,7 +3100,7 @@ CopyReadLineText(CopyState cstate)
|
||||
REFILL_LINEBUF;
|
||||
|
||||
/*
|
||||
* Try to read some more data. This will certainly reset
|
||||
* Try to read some more data. This will certainly reset
|
||||
* raw_buf_index to zero, and raw_buf_ptr must go with it.
|
||||
*/
|
||||
if (!CopyLoadRawBuf(cstate))
|
||||
@@ -3158,7 +3158,7 @@ CopyReadLineText(CopyState cstate)
|
||||
/*
|
||||
* Updating the line count for embedded CR and/or LF chars is
|
||||
* necessarily a little fragile - this test is probably about the
|
||||
* best we can do. (XXX it's arguable whether we should do this
|
||||
* best we can do. (XXX it's arguable whether we should do this
|
||||
* at all --- is cur_lineno a physical or logical count?)
|
||||
*/
|
||||
if (in_quote && c == (cstate->eol_type == EOL_NL ? '\n' : '\r'))
|
||||
@@ -3337,7 +3337,7 @@ CopyReadLineText(CopyState cstate)
|
||||
* after a backslash is special, so we skip over that second
|
||||
* character too. If we didn't do that \\. would be
|
||||
* considered an eof-of copy, while in non-CSV mode it is a
|
||||
* literal backslash followed by a period. In CSV mode,
|
||||
* literal backslash followed by a period. In CSV mode,
|
||||
* backslashes are not special, so we want to process the
|
||||
* character after the backslash just like a normal character,
|
||||
* so we don't increment in those cases.
|
||||
@@ -3440,7 +3440,7 @@ CopyReadAttributesText(CopyState cstate)
|
||||
/*
|
||||
* The de-escaped attributes will certainly not be longer than the input
|
||||
* data line, so we can just force attribute_buf to be large enough and
|
||||
* then transfer data without any checks for enough space. We need to do
|
||||
* then transfer data without any checks for enough space. We need to do
|
||||
* it this way because enlarging attribute_buf mid-stream would invalidate
|
||||
* pointers already stored into cstate->raw_fields[].
|
||||
*/
|
||||
@@ -3670,7 +3670,7 @@ CopyReadAttributesCSV(CopyState cstate)
|
||||
/*
|
||||
* The de-escaped attributes will certainly not be longer than the input
|
||||
* data line, so we can just force attribute_buf to be large enough and
|
||||
* then transfer data without any checks for enough space. We need to do
|
||||
* then transfer data without any checks for enough space. We need to do
|
||||
* it this way because enlarging attribute_buf mid-stream would invalidate
|
||||
* pointers already stored into cstate->raw_fields[].
|
||||
*/
|
||||
@@ -3885,7 +3885,7 @@ CopyAttributeOutText(CopyState cstate, char *string)
|
||||
/*
|
||||
* We have to grovel through the string searching for control characters
|
||||
* and instances of the delimiter character. In most cases, though, these
|
||||
* are infrequent. To avoid overhead from calling CopySendData once per
|
||||
* are infrequent. To avoid overhead from calling CopySendData once per
|
||||
* character, we dump out all characters between escaped characters in a
|
||||
* single call. The loop invariant is that the data from "start" to "ptr"
|
||||
* can be sent literally, but hasn't yet been.
|
||||
|
Reference in New Issue
Block a user