duckdb 0.6.2-dev1011.0 → 0.6.2-dev1015.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
|
2
|
-
#define DUCKDB_VERSION "0.6.2-
|
|
2
|
+
#define DUCKDB_VERSION "0.6.2-dev1015"
|
|
3
3
|
#endif
|
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
|
5
|
+
#define DUCKDB_SOURCE_ID "45de9afd71"
|
|
6
6
|
#endif
|
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
|
8
8
|
#include "duckdb/main/database.hpp"
|
|
@@ -164,6 +164,27 @@ LogicalType Transformer::TransformTypeName(duckdb_libpgquery::PGTypeName *type_n
|
|
|
164
164
|
result_type = LogicalType::USER(user_type_name);
|
|
165
165
|
break;
|
|
166
166
|
}
|
|
167
|
+
case LogicalTypeId::TIMESTAMP:
|
|
168
|
+
if (modifier_idx == 0) {
|
|
169
|
+
result_type = LogicalType::TIMESTAMP;
|
|
170
|
+
} else {
|
|
171
|
+
if (modifier_idx > 1) {
|
|
172
|
+
throw ParserException("TIMESTAMP only supports a single modifier");
|
|
173
|
+
}
|
|
174
|
+
if (width > 10) {
|
|
175
|
+
throw ParserException("TIMESTAMP only supports until nano-second precision (9)");
|
|
176
|
+
}
|
|
177
|
+
if (width == 0) {
|
|
178
|
+
result_type = LogicalType::TIMESTAMP_S;
|
|
179
|
+
} else if (width <= 3) {
|
|
180
|
+
result_type = LogicalType::TIMESTAMP_MS;
|
|
181
|
+
} else if (width <= 6) {
|
|
182
|
+
result_type = LogicalType::TIMESTAMP;
|
|
183
|
+
} else {
|
|
184
|
+
result_type = LogicalType::TIMESTAMP_NS;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
break;
|
|
167
188
|
default:
|
|
168
189
|
if (modifier_idx > 0) {
|
|
169
190
|
throw ParserException("Type %s does not support any modifiers!", LogicalType(base_type).ToString());
|