* Detect data format * used to set file extension on S3 in gpwriter. */
| 111 | * used to set file extension on S3 in gpwriter. |
| 112 | */ |
| 113 | static const char *getFormatStr(FunctionCallInfo fcinfo) { |
| 114 | Relation rel = EXTPROTOCOL_GET_RELATION(fcinfo); |
| 115 | ExtTableEntry *exttbl = GetExtTableEntry(rel->rd_id); |
| 116 | char fmtcode = exttbl->fmtcode; |
| 117 | |
| 118 | if (fmttype_is_text(fmtcode)) return "txt"; |
| 119 | if (fmttype_is_csv(fmtcode)) return "csv"; |
| 120 | return S3_DEFAULT_FORMAT; |
| 121 | } |
| 122 | |
| 123 | bool hasHeader = false; |
| 124 |
no test coverage detected