|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | CopyFromStateData |
Macros | |
| #define | INPUT_BUF_SIZE 65536 /* we palloc INPUT_BUF_SIZE+1 bytes */ |
| #define | INPUT_BUF_BYTES(cstate) ((cstate)->input_buf_len - (cstate)->input_buf_index) |
| #define | RAW_BUF_SIZE 65536 /* we palloc RAW_BUF_SIZE+1 bytes */ |
| #define | RAW_BUF_BYTES(cstate) ((cstate)->raw_buf_len - (cstate)->raw_buf_index) |
Typedefs | |
| typedef enum CopySource | CopySource |
| typedef enum EolType | EolType |
| typedef enum CopyInsertMethod | CopyInsertMethod |
| typedef struct CopyFromStateData | CopyFromStateData |
Enumerations | |
| enum | CopySource { COPY_FILE , COPY_FRONTEND , COPY_CALLBACK } |
| enum | EolType { EOL_UNKNOWN , EOL_NL , EOL_CR , EOL_CRNL } |
| enum | CopyInsertMethod { CIM_SINGLE , CIM_MULTI , CIM_MULTI_CONDITIONAL } |
Functions | |
| void | ReceiveCopyBegin (CopyFromState cstate) |
| void | ReceiveCopyBinaryHeader (CopyFromState cstate) |
| bool | CopyFromTextOneRow (CopyFromState cstate, ExprContext *econtext, Datum *values, bool *nulls) |
| bool | CopyFromCSVOneRow (CopyFromState cstate, ExprContext *econtext, Datum *values, bool *nulls) |
| bool | CopyFromBinaryOneRow (CopyFromState cstate, ExprContext *econtext, Datum *values, bool *nulls) |
| #define INPUT_BUF_BYTES | ( | cstate | ) | ((cstate)->input_buf_len - (cstate)->input_buf_index) |
Definition at line 167 of file copyfrom_internal.h.
| #define INPUT_BUF_SIZE 65536 /* we palloc INPUT_BUF_SIZE+1 bytes */ |
Definition at line 160 of file copyfrom_internal.h.
| #define RAW_BUF_BYTES | ( | cstate | ) | ((cstate)->raw_buf_len - (cstate)->raw_buf_index) |
Definition at line 181 of file copyfrom_internal.h.
| #define RAW_BUF_SIZE 65536 /* we palloc RAW_BUF_SIZE+1 bytes */ |
Definition at line 174 of file copyfrom_internal.h.
| typedef struct CopyFromStateData CopyFromStateData |
| typedef enum CopyInsertMethod CopyInsertMethod |
| typedef enum CopySource CopySource |
| enum CopyInsertMethod |
| Enumerator | |
|---|---|
| CIM_SINGLE | |
| CIM_MULTI | |
| CIM_MULTI_CONDITIONAL | |
Definition at line 46 of file copyfrom_internal.h.
| enum CopySource |
| Enumerator | |
|---|---|
| COPY_FILE | |
| COPY_FRONTEND | |
| COPY_CALLBACK | |
Definition at line 25 of file copyfrom_internal.h.
| enum EolType |
| Enumerator | |
|---|---|
| EOL_UNKNOWN | |
| EOL_NL | |
| EOL_CR | |
| EOL_CRNL | |
Definition at line 35 of file copyfrom_internal.h.
| bool CopyFromBinaryOneRow | ( | CopyFromState | cstate, |
| ExprContext * | econtext, | ||
| Datum * | values, | ||
| bool * | nulls | ||
| ) |
Definition at line 1095 of file copyfromparse.c.
References attnum, CopyFromStateData::attnumlist, CopyGetInt16(), CopyReadBinaryAttribute(), CopyReadBinaryData(), cur, CopyFromStateData::cur_attname, CopyFromStateData::cur_lineno, ereport, errcode(), errmsg(), ERROR, CopyFromStateData::in_functions, lfirst_int, list_length(), NameStr, CopyFromStateData::rel, RelationGetDescr, TupleDescAttr(), CopyFromStateData::typioparams, and values.
| bool CopyFromCSVOneRow | ( | CopyFromState | cstate, |
| ExprContext * | econtext, | ||
| Datum * | values, | ||
| bool * | nulls | ||
| ) |
Definition at line 933 of file copyfromparse.c.
References CopyFromTextLikeOneRow(), and values.
| bool CopyFromTextOneRow | ( | CopyFromState | cstate, |
| ExprContext * | econtext, | ||
| Datum * | values, | ||
| bool * | nulls | ||
| ) |
Definition at line 925 of file copyfromparse.c.
References CopyFromTextLikeOneRow(), and values.
| void ReceiveCopyBegin | ( | CopyFromState | cstate | ) |
Definition at line 170 of file copyfromparse.c.
References CopyFromStateData::attnumlist, CopyFormatOptions::binary, buf, COPY_FRONTEND, CopyFromStateData::copy_src, CopyFromStateData::fe_msgbuf, format, i, list_length(), makeStringInfo(), CopyFromStateData::opts, pq_beginmessage(), pq_endmessage(), pq_flush, pq_sendbyte(), pq_sendint16(), and PqMsg_CopyInResponse.
Referenced by BeginCopyFrom().
| void ReceiveCopyBinaryHeader | ( | CopyFromState | cstate | ) |
Definition at line 190 of file copyfromparse.c.
References BinarySignature, CopyGetInt32(), CopyReadBinaryData(), ereport, errcode(), errmsg(), and ERROR.
Referenced by CopyFromBinaryStart().