duckdb 0.3.3-dev351.0 → 0.3.3-dev379.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 +1 -1
- package/src/duckdb.cpp +410 -375
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +30956 -30956
package/src/duckdb.cpp
CHANGED
|
@@ -4206,7 +4206,9 @@ static DefaultMacro internal_macros[] = {
|
|
|
4206
4206
|
{DEFAULT_SCHEMA, "fmod", {"x", "y", nullptr}, "(x-y*floor(x/y))"},
|
|
4207
4207
|
{nullptr, nullptr, {nullptr}, nullptr}};
|
|
4208
4208
|
|
|
4209
|
-
static unique_ptr<CreateFunctionInfo> GetDefaultFunction(const string &
|
|
4209
|
+
static unique_ptr<CreateFunctionInfo> GetDefaultFunction(const string &input_schema, const string &input_name) {
|
|
4210
|
+
auto schema = StringUtil::Lower(input_schema);
|
|
4211
|
+
auto name = StringUtil::Lower(input_name);
|
|
4210
4212
|
for (idx_t index = 0; internal_macros[index].name != nullptr; index++) {
|
|
4211
4213
|
if (internal_macros[index].schema == schema && internal_macros[index].name == name) {
|
|
4212
4214
|
// parse the expression
|
|
@@ -4258,6 +4260,7 @@ vector<string> DefaultFunctionGenerator::GetDefaultEntries() {
|
|
|
4258
4260
|
|
|
4259
4261
|
|
|
4260
4262
|
|
|
4263
|
+
|
|
4261
4264
|
namespace duckdb {
|
|
4262
4265
|
|
|
4263
4266
|
struct DefaultSchema {
|
|
@@ -4266,7 +4269,8 @@ struct DefaultSchema {
|
|
|
4266
4269
|
|
|
4267
4270
|
static DefaultSchema internal_schemas[] = {{"information_schema"}, {"pg_catalog"}, {nullptr}};
|
|
4268
4271
|
|
|
4269
|
-
static bool GetDefaultSchema(const string &
|
|
4272
|
+
static bool GetDefaultSchema(const string &input_schema) {
|
|
4273
|
+
auto schema = StringUtil::Lower(input_schema);
|
|
4270
4274
|
for (idx_t index = 0; internal_schemas[index].name != nullptr; index++) {
|
|
4271
4275
|
if (internal_schemas[index].name == schema) {
|
|
4272
4276
|
return true;
|
|
@@ -4280,7 +4284,7 @@ DefaultSchemaGenerator::DefaultSchemaGenerator(Catalog &catalog) : DefaultGenera
|
|
|
4280
4284
|
|
|
4281
4285
|
unique_ptr<CatalogEntry> DefaultSchemaGenerator::CreateDefaultEntry(ClientContext &context, const string &entry_name) {
|
|
4282
4286
|
if (GetDefaultSchema(entry_name)) {
|
|
4283
|
-
return make_unique_base<CatalogEntry, SchemaCatalogEntry>(&catalog, entry_name, true);
|
|
4287
|
+
return make_unique_base<CatalogEntry, SchemaCatalogEntry>(&catalog, StringUtil::Lower(entry_name), true);
|
|
4284
4288
|
}
|
|
4285
4289
|
return nullptr;
|
|
4286
4290
|
}
|
|
@@ -4301,6 +4305,7 @@ vector<string> DefaultSchemaGenerator::GetDefaultEntries() {
|
|
|
4301
4305
|
|
|
4302
4306
|
|
|
4303
4307
|
|
|
4308
|
+
|
|
4304
4309
|
namespace duckdb {
|
|
4305
4310
|
|
|
4306
4311
|
struct DefaultView {
|
|
@@ -4344,7 +4349,9 @@ static DefaultView internal_views[] = {
|
|
|
4344
4349
|
{"information_schema", "tables", "SELECT NULL table_catalog, schema_name table_schema, table_name, CASE WHEN temporary THEN 'LOCAL TEMPORARY' ELSE 'BASE TABLE' END table_type, NULL self_referencing_column_name, NULL reference_generation, NULL user_defined_type_catalog, NULL user_defined_type_schema, NULL user_defined_type_name, 'YES' is_insertable_into, 'NO' is_typed, CASE WHEN temporary THEN 'PRESERVE' ELSE NULL END commit_action FROM duckdb_tables() UNION ALL SELECT NULL table_catalog, schema_name table_schema, view_name table_name, 'VIEW' table_type, NULL self_referencing_column_name, NULL reference_generation, NULL user_defined_type_catalog, NULL user_defined_type_schema, NULL user_defined_type_name, 'NO' is_insertable_into, 'NO' is_typed, NULL commit_action FROM duckdb_views;"},
|
|
4345
4350
|
{nullptr, nullptr, nullptr}};
|
|
4346
4351
|
|
|
4347
|
-
static unique_ptr<CreateViewInfo> GetDefaultView(const string &
|
|
4352
|
+
static unique_ptr<CreateViewInfo> GetDefaultView(const string &input_schema, const string &input_name) {
|
|
4353
|
+
auto schema = StringUtil::Lower(input_schema);
|
|
4354
|
+
auto name = StringUtil::Lower(input_name);
|
|
4348
4355
|
for (idx_t index = 0; internal_views[index].name != nullptr; index++) {
|
|
4349
4356
|
if (internal_views[index].schema == schema && internal_views[index].name == name) {
|
|
4350
4357
|
auto result = make_unique<CreateViewInfo>();
|
|
@@ -89196,14 +89203,18 @@ parse_bracket : {
|
|
|
89196
89203
|
}
|
|
89197
89204
|
}
|
|
89198
89205
|
|
|
89206
|
+
static char GetEscapeChar(string_t escape) {
|
|
89207
|
+
// Only one escape character should be allowed
|
|
89208
|
+
if (escape.GetSize() > 1) {
|
|
89209
|
+
throw SyntaxException("Invalid escape string. Escape string must be empty or one character.");
|
|
89210
|
+
}
|
|
89211
|
+
return escape.GetSize() == 0 ? '\0' : *escape.GetDataUnsafe();
|
|
89212
|
+
}
|
|
89213
|
+
|
|
89199
89214
|
struct LikeEscapeOperator {
|
|
89200
89215
|
template <class TA, class TB, class TC>
|
|
89201
89216
|
static inline bool Operation(TA str, TB pattern, TC escape) {
|
|
89202
|
-
|
|
89203
|
-
if (escape.GetSize() > 1) {
|
|
89204
|
-
throw SyntaxException("Invalid escape string. Escape string must be empty or one character.");
|
|
89205
|
-
}
|
|
89206
|
-
char escape_char = escape.GetSize() == 0 ? '\0' : *escape.GetDataUnsafe();
|
|
89217
|
+
char escape_char = GetEscapeChar(escape);
|
|
89207
89218
|
return LikeOperatorFunction(str.GetDataUnsafe(), str.GetSize(), pattern.GetDataUnsafe(), pattern.GetSize(),
|
|
89208
89219
|
escape_char);
|
|
89209
89220
|
}
|
|
@@ -89223,24 +89234,44 @@ struct LikeOperator {
|
|
|
89223
89234
|
}
|
|
89224
89235
|
};
|
|
89225
89236
|
|
|
89237
|
+
bool ILikeOperatorFunction(string_t &str, string_t &pattern, char escape = '\0') {
|
|
89238
|
+
auto str_data = str.GetDataUnsafe();
|
|
89239
|
+
auto str_size = str.GetSize();
|
|
89240
|
+
auto pat_data = pattern.GetDataUnsafe();
|
|
89241
|
+
auto pat_size = pattern.GetSize();
|
|
89242
|
+
|
|
89243
|
+
// lowercase both the str and the pattern
|
|
89244
|
+
idx_t str_llength = LowerFun::LowerLength(str_data, str_size);
|
|
89245
|
+
auto str_ldata = unique_ptr<char[]>(new char[str_llength]);
|
|
89246
|
+
LowerFun::LowerCase(str_data, str_size, str_ldata.get());
|
|
89247
|
+
|
|
89248
|
+
idx_t pat_llength = LowerFun::LowerLength(pat_data, pat_size);
|
|
89249
|
+
auto pat_ldata = unique_ptr<char[]>(new char[pat_llength]);
|
|
89250
|
+
LowerFun::LowerCase(pat_data, pat_size, pat_ldata.get());
|
|
89251
|
+
string_t str_lcase(str_ldata.get(), str_llength);
|
|
89252
|
+
string_t pat_lcase(pat_ldata.get(), pat_llength);
|
|
89253
|
+
return LikeOperatorFunction(str_lcase, pat_lcase, escape);
|
|
89254
|
+
}
|
|
89255
|
+
|
|
89256
|
+
struct ILikeEscapeOperator {
|
|
89257
|
+
template <class TA, class TB, class TC>
|
|
89258
|
+
static inline bool Operation(TA str, TB pattern, TC escape) {
|
|
89259
|
+
char escape_char = GetEscapeChar(escape);
|
|
89260
|
+
return ILikeOperatorFunction(str, pattern, escape_char);
|
|
89261
|
+
}
|
|
89262
|
+
};
|
|
89263
|
+
|
|
89264
|
+
struct NotILikeEscapeOperator {
|
|
89265
|
+
template <class TA, class TB, class TC>
|
|
89266
|
+
static inline bool Operation(TA str, TB pattern, TC escape) {
|
|
89267
|
+
return !ILikeEscapeOperator::Operation(str, pattern, escape);
|
|
89268
|
+
}
|
|
89269
|
+
};
|
|
89270
|
+
|
|
89226
89271
|
struct ILikeOperator {
|
|
89227
89272
|
template <class TA, class TB, class TR>
|
|
89228
89273
|
static inline TR Operation(TA str, TB pattern) {
|
|
89229
|
-
|
|
89230
|
-
auto str_size = str.GetSize();
|
|
89231
|
-
auto pat_data = pattern.GetDataUnsafe();
|
|
89232
|
-
auto pat_size = pattern.GetSize();
|
|
89233
|
-
// lowercase both the str and the pattern
|
|
89234
|
-
idx_t str_llength = LowerFun::LowerLength(str_data, str_size);
|
|
89235
|
-
auto str_ldata = unique_ptr<char[]>(new char[str_llength]);
|
|
89236
|
-
LowerFun::LowerCase(str_data, str_size, str_ldata.get());
|
|
89237
|
-
|
|
89238
|
-
idx_t pat_llength = LowerFun::LowerLength(pat_data, pat_size);
|
|
89239
|
-
auto pat_ldata = unique_ptr<char[]>(new char[pat_llength]);
|
|
89240
|
-
LowerFun::LowerCase(pat_data, pat_size, pat_ldata.get());
|
|
89241
|
-
string_t str_lcase(str_ldata.get(), str_llength);
|
|
89242
|
-
string_t pat_lcase(pat_ldata.get(), pat_llength);
|
|
89243
|
-
return LikeOperatorFunction(str_lcase, pat_lcase);
|
|
89274
|
+
return ILikeOperatorFunction(str, pattern);
|
|
89244
89275
|
}
|
|
89245
89276
|
};
|
|
89246
89277
|
|
|
@@ -89348,6 +89379,12 @@ void LikeEscapeFun::RegisterFunction(BuiltinFunctions &set) {
|
|
|
89348
89379
|
set.AddFunction({"not_like_escape"},
|
|
89349
89380
|
ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR},
|
|
89350
89381
|
LogicalType::BOOLEAN, LikeEscapeFunction<NotLikeEscapeOperator>));
|
|
89382
|
+
|
|
89383
|
+
set.AddFunction({"ilike_escape"}, ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR},
|
|
89384
|
+
LogicalType::BOOLEAN, LikeEscapeFunction<ILikeEscapeOperator>));
|
|
89385
|
+
set.AddFunction({"not_ilike_escape"},
|
|
89386
|
+
ScalarFunction({LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR},
|
|
89387
|
+
LogicalType::BOOLEAN, LikeEscapeFunction<NotILikeEscapeOperator>));
|
|
89351
89388
|
}
|
|
89352
89389
|
} // namespace duckdb
|
|
89353
89390
|
|
|
@@ -232136,38 +232173,38 @@ static const yytype_uint16 yyrline[] =
|
|
|
232136
232173
|
1706, 1714, 1729, 1731, 1733, 1735, 1737, 1739, 1741, 1743,
|
|
232137
232174
|
1745, 1747, 1749, 1751, 1753, 1755, 1758, 1760, 1762, 1765,
|
|
232138
232175
|
1767, 1769, 1771, 1774, 1779, 1784, 1791, 1796, 1803, 1808,
|
|
232139
|
-
|
|
232140
|
-
|
|
232141
|
-
|
|
232142
|
-
|
|
232143
|
-
2148, 2150, 2152, 2154, 2156, 2158, 2160, 2162, 2164,
|
|
232144
|
-
2168, 2170, 2172, 2174, 2176, 2178,
|
|
232145
|
-
|
|
232146
|
-
|
|
232147
|
-
|
|
232148
|
-
|
|
232149
|
-
|
|
232150
|
-
|
|
232151
|
-
|
|
232152
|
-
|
|
232153
|
-
|
|
232154
|
-
|
|
232155
|
-
2873, 2874, 2875,
|
|
232156
|
-
2896, 2898, 2900, 2902, 2904, 2906,
|
|
232157
|
-
|
|
232158
|
-
|
|
232159
|
-
|
|
232160
|
-
|
|
232161
|
-
|
|
232162
|
-
|
|
232163
|
-
|
|
232164
|
-
|
|
232165
|
-
|
|
232166
|
-
|
|
232167
|
-
|
|
232168
|
-
|
|
232169
|
-
|
|
232170
|
-
|
|
232176
|
+
1815, 1820, 1828, 1836, 1844, 1852, 1870, 1878, 1886, 1894,
|
|
232177
|
+
1902, 1910, 1914, 1918, 1922, 1930, 1938, 1954, 1962, 1970,
|
|
232178
|
+
1978, 1986, 1994, 2002, 2006, 2010, 2014, 2018, 2026, 2034,
|
|
232179
|
+
2042, 2050, 2070, 2092, 2103, 2110, 2124, 2140, 2142, 2144,
|
|
232180
|
+
2146, 2148, 2150, 2152, 2154, 2156, 2158, 2160, 2162, 2164,
|
|
232181
|
+
2166, 2168, 2170, 2172, 2174, 2176, 2178, 2182, 2186, 2190,
|
|
232182
|
+
2204, 2205, 2206, 2213, 2225, 2240, 2252, 2254, 2266, 2277,
|
|
232183
|
+
2301, 2312, 2321, 2325, 2332, 2340, 2348, 2359, 2367, 2395,
|
|
232184
|
+
2431, 2442, 2443, 2450, 2456, 2460, 2464, 2468, 2472, 2476,
|
|
232185
|
+
2480, 2484, 2488, 2492, 2496, 2500, 2504, 2508, 2512, 2516,
|
|
232186
|
+
2518, 2520, 2524, 2533, 2538, 2545, 2560, 2567, 2571, 2575,
|
|
232187
|
+
2579, 2583, 2597, 2598, 2602, 2603, 2607, 2608, 2615, 2616,
|
|
232188
|
+
2620, 2621, 2626, 2634, 2636, 2650, 2653, 2680, 2681, 2684,
|
|
232189
|
+
2685, 2696, 2702, 2709, 2718, 2735, 2780, 2788, 2796, 2804,
|
|
232190
|
+
2812, 2833, 2834, 2837, 2838, 2842, 2852, 2853, 2855, 2856,
|
|
232191
|
+
2857, 2860, 2861, 2864, 2865, 2866, 2867, 2868, 2869, 2870,
|
|
232192
|
+
2871, 2872, 2873, 2874, 2875, 2878, 2880, 2885, 2887, 2892,
|
|
232193
|
+
2894, 2896, 2898, 2900, 2902, 2904, 2906, 2920, 2922, 2926,
|
|
232194
|
+
2930, 2937, 2942, 2949, 2953, 2959, 2963, 2972, 2983, 2984,
|
|
232195
|
+
2988, 2992, 2999, 3000, 3001, 3002, 3003, 3004, 3005, 3006,
|
|
232196
|
+
3007, 3008, 3018, 3022, 3029, 3036, 3037, 3053, 3057, 3062,
|
|
232197
|
+
3066, 3081, 3086, 3090, 3093, 3096, 3097, 3098, 3101, 3108,
|
|
232198
|
+
3118, 3132, 3133, 3137, 3148, 3149, 3152, 3153, 3156, 3160,
|
|
232199
|
+
3167, 3171, 3179, 3190, 3191, 3195, 3196, 3200, 3201, 3204,
|
|
232200
|
+
3205, 3215, 3216, 3220, 3221, 3224, 3240, 3248, 3256, 3271,
|
|
232201
|
+
3289, 3290, 3293, 3294, 3297, 3301, 3302, 3305, 3306, 3307,
|
|
232202
|
+
3317, 3318, 3329, 3333, 3360, 3362, 3367, 3369, 3379, 3382,
|
|
232203
|
+
3393, 3397, 3401, 3413, 3417, 3426, 3433, 3471, 3475, 3479,
|
|
232204
|
+
3483, 3487, 3491, 3495, 3501, 3502, 3518, 3519, 3520, 3523,
|
|
232205
|
+
3524, 3530, 3531, 3532, 3535, 3536, 3537, 3540, 3541, 3542,
|
|
232206
|
+
3545, 3546, 3549, 3551, 3556, 3557, 3560, 3568, 3569, 3570,
|
|
232207
|
+
3571, 3574, 3575, 7, 18, 19, 23, 24, 25, 26,
|
|
232171
232208
|
7, 16, 34, 41, 46, 47, 48, 49, 8, 33,
|
|
232172
232209
|
62, 66, 67, 72, 73, 78, 79, 83, 84, 89,
|
|
232173
232210
|
90, 7, 16, 25, 34, 43, 52, 5, 11, 7,
|
|
@@ -250986,16 +251023,15 @@ yyreduce:
|
|
|
250986
251023
|
case 779:
|
|
250987
251024
|
#line 1809 "third_party/libpg_query/grammar/statements/select.y"
|
|
250988
251025
|
{
|
|
250989
|
-
PGFuncCall *n = makeFuncCall(SystemFuncName("
|
|
250990
|
-
|
|
251026
|
+
PGFuncCall *n = makeFuncCall(SystemFuncName("ilike_escape"),
|
|
251027
|
+
list_make3((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].node), (yyvsp[(5) - (5)].node)),
|
|
250991
251028
|
(yylsp[(2) - (5)]));
|
|
250992
|
-
(yyval.node) = (PGNode *)
|
|
250993
|
-
(yyvsp[(1) - (5)].node), (PGNode *) n, (yylsp[(2) - (5)]));
|
|
251029
|
+
(yyval.node) = (PGNode *) n;
|
|
250994
251030
|
;}
|
|
250995
251031
|
break;
|
|
250996
251032
|
|
|
250997
251033
|
case 780:
|
|
250998
|
-
#line
|
|
251034
|
+
#line 1816 "third_party/libpg_query/grammar/statements/select.y"
|
|
250999
251035
|
{
|
|
251000
251036
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_ILIKE, "!~~*",
|
|
251001
251037
|
(yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(2) - (4)]));
|
|
@@ -251003,18 +251039,17 @@ yyreduce:
|
|
|
251003
251039
|
break;
|
|
251004
251040
|
|
|
251005
251041
|
case 781:
|
|
251006
|
-
#line
|
|
251042
|
+
#line 1821 "third_party/libpg_query/grammar/statements/select.y"
|
|
251007
251043
|
{
|
|
251008
|
-
PGFuncCall *n = makeFuncCall(SystemFuncName("
|
|
251009
|
-
|
|
251044
|
+
PGFuncCall *n = makeFuncCall(SystemFuncName("not_ilike_escape"),
|
|
251045
|
+
list_make3((yyvsp[(1) - (6)].node), (yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node)),
|
|
251010
251046
|
(yylsp[(2) - (6)]));
|
|
251011
|
-
(yyval.node) = (PGNode *)
|
|
251012
|
-
(yyvsp[(1) - (6)].node), (PGNode *) n, (yylsp[(2) - (6)]));
|
|
251047
|
+
(yyval.node) = (PGNode *) n;
|
|
251013
251048
|
;}
|
|
251014
251049
|
break;
|
|
251015
251050
|
|
|
251016
251051
|
case 782:
|
|
251017
|
-
#line
|
|
251052
|
+
#line 1829 "third_party/libpg_query/grammar/statements/select.y"
|
|
251018
251053
|
{
|
|
251019
251054
|
PGFuncCall *n = makeFuncCall(SystemFuncName("similar_escape"),
|
|
251020
251055
|
list_make2((yyvsp[(4) - (4)].node), makeNullAConst(-1)),
|
|
@@ -251025,7 +251060,7 @@ yyreduce:
|
|
|
251025
251060
|
break;
|
|
251026
251061
|
|
|
251027
251062
|
case 783:
|
|
251028
|
-
#line
|
|
251063
|
+
#line 1837 "third_party/libpg_query/grammar/statements/select.y"
|
|
251029
251064
|
{
|
|
251030
251065
|
PGFuncCall *n = makeFuncCall(SystemFuncName("similar_escape"),
|
|
251031
251066
|
list_make2((yyvsp[(4) - (6)].node), (yyvsp[(6) - (6)].node)),
|
|
@@ -251036,7 +251071,7 @@ yyreduce:
|
|
|
251036
251071
|
break;
|
|
251037
251072
|
|
|
251038
251073
|
case 784:
|
|
251039
|
-
#line
|
|
251074
|
+
#line 1845 "third_party/libpg_query/grammar/statements/select.y"
|
|
251040
251075
|
{
|
|
251041
251076
|
PGFuncCall *n = makeFuncCall(SystemFuncName("similar_escape"),
|
|
251042
251077
|
list_make2((yyvsp[(5) - (5)].node), makeNullAConst(-1)),
|
|
@@ -251047,7 +251082,7 @@ yyreduce:
|
|
|
251047
251082
|
break;
|
|
251048
251083
|
|
|
251049
251084
|
case 785:
|
|
251050
|
-
#line
|
|
251085
|
+
#line 1853 "third_party/libpg_query/grammar/statements/select.y"
|
|
251051
251086
|
{
|
|
251052
251087
|
PGFuncCall *n = makeFuncCall(SystemFuncName("similar_escape"),
|
|
251053
251088
|
list_make2((yyvsp[(5) - (7)].node), (yyvsp[(7) - (7)].node)),
|
|
@@ -251058,7 +251093,7 @@ yyreduce:
|
|
|
251058
251093
|
break;
|
|
251059
251094
|
|
|
251060
251095
|
case 786:
|
|
251061
|
-
#line
|
|
251096
|
+
#line 1871 "third_party/libpg_query/grammar/statements/select.y"
|
|
251062
251097
|
{
|
|
251063
251098
|
PGNullTest *n = makeNode(PGNullTest);
|
|
251064
251099
|
n->arg = (PGExpr *) (yyvsp[(1) - (3)].node);
|
|
@@ -251069,7 +251104,7 @@ yyreduce:
|
|
|
251069
251104
|
break;
|
|
251070
251105
|
|
|
251071
251106
|
case 787:
|
|
251072
|
-
#line
|
|
251107
|
+
#line 1879 "third_party/libpg_query/grammar/statements/select.y"
|
|
251073
251108
|
{
|
|
251074
251109
|
PGNullTest *n = makeNode(PGNullTest);
|
|
251075
251110
|
n->arg = (PGExpr *) (yyvsp[(1) - (2)].node);
|
|
@@ -251080,7 +251115,7 @@ yyreduce:
|
|
|
251080
251115
|
break;
|
|
251081
251116
|
|
|
251082
251117
|
case 788:
|
|
251083
|
-
#line
|
|
251118
|
+
#line 1887 "third_party/libpg_query/grammar/statements/select.y"
|
|
251084
251119
|
{
|
|
251085
251120
|
PGNullTest *n = makeNode(PGNullTest);
|
|
251086
251121
|
n->arg = (PGExpr *) (yyvsp[(1) - (4)].node);
|
|
@@ -251091,7 +251126,7 @@ yyreduce:
|
|
|
251091
251126
|
break;
|
|
251092
251127
|
|
|
251093
251128
|
case 789:
|
|
251094
|
-
#line
|
|
251129
|
+
#line 1895 "third_party/libpg_query/grammar/statements/select.y"
|
|
251095
251130
|
{
|
|
251096
251131
|
PGNullTest *n = makeNode(PGNullTest);
|
|
251097
251132
|
n->arg = (PGExpr *) (yyvsp[(1) - (3)].node);
|
|
@@ -251102,7 +251137,7 @@ yyreduce:
|
|
|
251102
251137
|
break;
|
|
251103
251138
|
|
|
251104
251139
|
case 790:
|
|
251105
|
-
#line
|
|
251140
|
+
#line 1903 "third_party/libpg_query/grammar/statements/select.y"
|
|
251106
251141
|
{
|
|
251107
251142
|
PGNullTest *n = makeNode(PGNullTest);
|
|
251108
251143
|
n->arg = (PGExpr *) (yyvsp[(1) - (2)].node);
|
|
@@ -251113,7 +251148,7 @@ yyreduce:
|
|
|
251113
251148
|
break;
|
|
251114
251149
|
|
|
251115
251150
|
case 791:
|
|
251116
|
-
#line
|
|
251151
|
+
#line 1910 "third_party/libpg_query/grammar/statements/select.y"
|
|
251117
251152
|
{
|
|
251118
251153
|
PGFuncCall *n = makeFuncCall(SystemFuncName("row"), (yyvsp[(1) - (1)].list), (yylsp[(1) - (1)]));
|
|
251119
251154
|
(yyval.node) = (PGNode *) n;
|
|
@@ -251121,7 +251156,7 @@ yyreduce:
|
|
|
251121
251156
|
break;
|
|
251122
251157
|
|
|
251123
251158
|
case 792:
|
|
251124
|
-
#line
|
|
251159
|
+
#line 1914 "third_party/libpg_query/grammar/statements/select.y"
|
|
251125
251160
|
{
|
|
251126
251161
|
PGFuncCall *n = makeFuncCall(SystemFuncName("struct_pack"), (yyvsp[(2) - (3)].list), (yylsp[(2) - (3)]));
|
|
251127
251162
|
(yyval.node) = (PGNode *) n;
|
|
@@ -251129,7 +251164,7 @@ yyreduce:
|
|
|
251129
251164
|
break;
|
|
251130
251165
|
|
|
251131
251166
|
case 793:
|
|
251132
|
-
#line
|
|
251167
|
+
#line 1918 "third_party/libpg_query/grammar/statements/select.y"
|
|
251133
251168
|
{
|
|
251134
251169
|
PGFuncCall *n = makeFuncCall(SystemFuncName("list_value"), (yyvsp[(2) - (3)].list), (yylsp[(2) - (3)]));
|
|
251135
251170
|
(yyval.node) = (PGNode *) n;
|
|
@@ -251137,7 +251172,7 @@ yyreduce:
|
|
|
251137
251172
|
break;
|
|
251138
251173
|
|
|
251139
251174
|
case 794:
|
|
251140
|
-
#line
|
|
251175
|
+
#line 1923 "third_party/libpg_query/grammar/statements/select.y"
|
|
251141
251176
|
{
|
|
251142
251177
|
PGLambdaFunction *n = makeNode(PGLambdaFunction);
|
|
251143
251178
|
n->parameters = (yyvsp[(1) - (3)].list);
|
|
@@ -251148,7 +251183,7 @@ yyreduce:
|
|
|
251148
251183
|
break;
|
|
251149
251184
|
|
|
251150
251185
|
case 795:
|
|
251151
|
-
#line
|
|
251186
|
+
#line 1931 "third_party/libpg_query/grammar/statements/select.y"
|
|
251152
251187
|
{
|
|
251153
251188
|
PGLambdaFunction *n = makeNode(PGLambdaFunction);
|
|
251154
251189
|
n->parameters = list_make1((yyvsp[(1) - (3)].node));
|
|
@@ -251159,7 +251194,7 @@ yyreduce:
|
|
|
251159
251194
|
break;
|
|
251160
251195
|
|
|
251161
251196
|
case 796:
|
|
251162
|
-
#line
|
|
251197
|
+
#line 1939 "third_party/libpg_query/grammar/statements/select.y"
|
|
251163
251198
|
{
|
|
251164
251199
|
if (list_length((yyvsp[(1) - (3)].list)) != 2)
|
|
251165
251200
|
ereport(ERROR,
|
|
@@ -251178,7 +251213,7 @@ yyreduce:
|
|
|
251178
251213
|
break;
|
|
251179
251214
|
|
|
251180
251215
|
case 797:
|
|
251181
|
-
#line
|
|
251216
|
+
#line 1955 "third_party/libpg_query/grammar/statements/select.y"
|
|
251182
251217
|
{
|
|
251183
251218
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251184
251219
|
b->arg = (PGExpr *) (yyvsp[(1) - (3)].node);
|
|
@@ -251189,7 +251224,7 @@ yyreduce:
|
|
|
251189
251224
|
break;
|
|
251190
251225
|
|
|
251191
251226
|
case 798:
|
|
251192
|
-
#line
|
|
251227
|
+
#line 1963 "third_party/libpg_query/grammar/statements/select.y"
|
|
251193
251228
|
{
|
|
251194
251229
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251195
251230
|
b->arg = (PGExpr *) (yyvsp[(1) - (4)].node);
|
|
@@ -251200,7 +251235,7 @@ yyreduce:
|
|
|
251200
251235
|
break;
|
|
251201
251236
|
|
|
251202
251237
|
case 799:
|
|
251203
|
-
#line
|
|
251238
|
+
#line 1971 "third_party/libpg_query/grammar/statements/select.y"
|
|
251204
251239
|
{
|
|
251205
251240
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251206
251241
|
b->arg = (PGExpr *) (yyvsp[(1) - (3)].node);
|
|
@@ -251211,7 +251246,7 @@ yyreduce:
|
|
|
251211
251246
|
break;
|
|
251212
251247
|
|
|
251213
251248
|
case 800:
|
|
251214
|
-
#line
|
|
251249
|
+
#line 1979 "third_party/libpg_query/grammar/statements/select.y"
|
|
251215
251250
|
{
|
|
251216
251251
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251217
251252
|
b->arg = (PGExpr *) (yyvsp[(1) - (4)].node);
|
|
@@ -251222,7 +251257,7 @@ yyreduce:
|
|
|
251222
251257
|
break;
|
|
251223
251258
|
|
|
251224
251259
|
case 801:
|
|
251225
|
-
#line
|
|
251260
|
+
#line 1987 "third_party/libpg_query/grammar/statements/select.y"
|
|
251226
251261
|
{
|
|
251227
251262
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251228
251263
|
b->arg = (PGExpr *) (yyvsp[(1) - (3)].node);
|
|
@@ -251233,7 +251268,7 @@ yyreduce:
|
|
|
251233
251268
|
break;
|
|
251234
251269
|
|
|
251235
251270
|
case 802:
|
|
251236
|
-
#line
|
|
251271
|
+
#line 1995 "third_party/libpg_query/grammar/statements/select.y"
|
|
251237
251272
|
{
|
|
251238
251273
|
PGBooleanTest *b = makeNode(PGBooleanTest);
|
|
251239
251274
|
b->arg = (PGExpr *) (yyvsp[(1) - (4)].node);
|
|
@@ -251244,35 +251279,35 @@ yyreduce:
|
|
|
251244
251279
|
break;
|
|
251245
251280
|
|
|
251246
251281
|
case 803:
|
|
251247
|
-
#line
|
|
251282
|
+
#line 2003 "third_party/libpg_query/grammar/statements/select.y"
|
|
251248
251283
|
{
|
|
251249
251284
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)]));
|
|
251250
251285
|
;}
|
|
251251
251286
|
break;
|
|
251252
251287
|
|
|
251253
251288
|
case 804:
|
|
251254
|
-
#line
|
|
251289
|
+
#line 2007 "third_party/libpg_query/grammar/statements/select.y"
|
|
251255
251290
|
{
|
|
251256
251291
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_NOT_DISTINCT, "=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)]));
|
|
251257
251292
|
;}
|
|
251258
251293
|
break;
|
|
251259
251294
|
|
|
251260
251295
|
case 805:
|
|
251261
|
-
#line
|
|
251296
|
+
#line 2011 "third_party/libpg_query/grammar/statements/select.y"
|
|
251262
251297
|
{
|
|
251263
251298
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (PGNode *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)]));
|
|
251264
251299
|
;}
|
|
251265
251300
|
break;
|
|
251266
251301
|
|
|
251267
251302
|
case 806:
|
|
251268
|
-
#line
|
|
251303
|
+
#line 2015 "third_party/libpg_query/grammar/statements/select.y"
|
|
251269
251304
|
{
|
|
251270
251305
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (PGNode *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)]));
|
|
251271
251306
|
;}
|
|
251272
251307
|
break;
|
|
251273
251308
|
|
|
251274
251309
|
case 807:
|
|
251275
|
-
#line
|
|
251310
|
+
#line 2019 "third_party/libpg_query/grammar/statements/select.y"
|
|
251276
251311
|
{
|
|
251277
251312
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_BETWEEN,
|
|
251278
251313
|
"BETWEEN",
|
|
@@ -251283,7 +251318,7 @@ yyreduce:
|
|
|
251283
251318
|
break;
|
|
251284
251319
|
|
|
251285
251320
|
case 808:
|
|
251286
|
-
#line
|
|
251321
|
+
#line 2027 "third_party/libpg_query/grammar/statements/select.y"
|
|
251287
251322
|
{
|
|
251288
251323
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_NOT_BETWEEN,
|
|
251289
251324
|
"NOT BETWEEN",
|
|
@@ -251294,7 +251329,7 @@ yyreduce:
|
|
|
251294
251329
|
break;
|
|
251295
251330
|
|
|
251296
251331
|
case 809:
|
|
251297
|
-
#line
|
|
251332
|
+
#line 2035 "third_party/libpg_query/grammar/statements/select.y"
|
|
251298
251333
|
{
|
|
251299
251334
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_BETWEEN_SYM,
|
|
251300
251335
|
"BETWEEN SYMMETRIC",
|
|
@@ -251305,7 +251340,7 @@ yyreduce:
|
|
|
251305
251340
|
break;
|
|
251306
251341
|
|
|
251307
251342
|
case 810:
|
|
251308
|
-
#line
|
|
251343
|
+
#line 2043 "third_party/libpg_query/grammar/statements/select.y"
|
|
251309
251344
|
{
|
|
251310
251345
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_NOT_BETWEEN_SYM,
|
|
251311
251346
|
"NOT BETWEEN SYMMETRIC",
|
|
@@ -251316,7 +251351,7 @@ yyreduce:
|
|
|
251316
251351
|
break;
|
|
251317
251352
|
|
|
251318
251353
|
case 811:
|
|
251319
|
-
#line
|
|
251354
|
+
#line 2051 "third_party/libpg_query/grammar/statements/select.y"
|
|
251320
251355
|
{
|
|
251321
251356
|
/* in_expr returns a PGSubLink or a list of a_exprs */
|
|
251322
251357
|
if (IsA((yyvsp[(3) - (3)].node), PGSubLink))
|
|
@@ -251339,7 +251374,7 @@ yyreduce:
|
|
|
251339
251374
|
break;
|
|
251340
251375
|
|
|
251341
251376
|
case 812:
|
|
251342
|
-
#line
|
|
251377
|
+
#line 2071 "third_party/libpg_query/grammar/statements/select.y"
|
|
251343
251378
|
{
|
|
251344
251379
|
/* in_expr returns a PGSubLink or a list of a_exprs */
|
|
251345
251380
|
if (IsA((yyvsp[(4) - (4)].node), PGSubLink))
|
|
@@ -251364,7 +251399,7 @@ yyreduce:
|
|
|
251364
251399
|
break;
|
|
251365
251400
|
|
|
251366
251401
|
case 813:
|
|
251367
|
-
#line
|
|
251402
|
+
#line 2093 "third_party/libpg_query/grammar/statements/select.y"
|
|
251368
251403
|
{
|
|
251369
251404
|
PGSubLink *n = makeNode(PGSubLink);
|
|
251370
251405
|
n->subLinkType = (yyvsp[(3) - (4)].subquerytype);
|
|
@@ -251378,7 +251413,7 @@ yyreduce:
|
|
|
251378
251413
|
break;
|
|
251379
251414
|
|
|
251380
251415
|
case 814:
|
|
251381
|
-
#line
|
|
251416
|
+
#line 2104 "third_party/libpg_query/grammar/statements/select.y"
|
|
251382
251417
|
{
|
|
251383
251418
|
if ((yyvsp[(3) - (6)].subquerytype) == PG_ANY_SUBLINK)
|
|
251384
251419
|
(yyval.node) = (PGNode *) makeAExpr(PG_AEXPR_OP_ANY, (yyvsp[(2) - (6)].list), (yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(2) - (6)]));
|
|
@@ -251388,7 +251423,7 @@ yyreduce:
|
|
|
251388
251423
|
break;
|
|
251389
251424
|
|
|
251390
251425
|
case 815:
|
|
251391
|
-
#line
|
|
251426
|
+
#line 2111 "third_party/libpg_query/grammar/statements/select.y"
|
|
251392
251427
|
{
|
|
251393
251428
|
/*
|
|
251394
251429
|
* The SQL spec only allows DEFAULT in "contextually typed
|
|
@@ -251405,7 +251440,7 @@ yyreduce:
|
|
|
251405
251440
|
break;
|
|
251406
251441
|
|
|
251407
251442
|
case 816:
|
|
251408
|
-
#line
|
|
251443
|
+
#line 2124 "third_party/libpg_query/grammar/statements/select.y"
|
|
251409
251444
|
{
|
|
251410
251445
|
PGList *func_name = list_make1(makeString("construct_array"));
|
|
251411
251446
|
PGFuncCall *n = makeFuncCall(func_name, (yyvsp[(3) - (4)].list), (yylsp[(1) - (4)]));
|
|
@@ -251414,140 +251449,140 @@ yyreduce:
|
|
|
251414
251449
|
break;
|
|
251415
251450
|
|
|
251416
251451
|
case 817:
|
|
251417
|
-
#line
|
|
251452
|
+
#line 2141 "third_party/libpg_query/grammar/statements/select.y"
|
|
251418
251453
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251419
251454
|
break;
|
|
251420
251455
|
|
|
251421
251456
|
case 818:
|
|
251422
|
-
#line
|
|
251457
|
+
#line 2143 "third_party/libpg_query/grammar/statements/select.y"
|
|
251423
251458
|
{ (yyval.node) = makeTypeCast((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].typnam), 0, (yylsp[(2) - (3)])); ;}
|
|
251424
251459
|
break;
|
|
251425
251460
|
|
|
251426
251461
|
case 819:
|
|
251427
|
-
#line
|
|
251462
|
+
#line 2145 "third_party/libpg_query/grammar/statements/select.y"
|
|
251428
251463
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "+", NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); ;}
|
|
251429
251464
|
break;
|
|
251430
251465
|
|
|
251431
251466
|
case 820:
|
|
251432
|
-
#line
|
|
251467
|
+
#line 2147 "third_party/libpg_query/grammar/statements/select.y"
|
|
251433
251468
|
{ (yyval.node) = doNegate((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); ;}
|
|
251434
251469
|
break;
|
|
251435
251470
|
|
|
251436
251471
|
case 821:
|
|
251437
|
-
#line
|
|
251472
|
+
#line 2149 "third_party/libpg_query/grammar/statements/select.y"
|
|
251438
251473
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "+", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251439
251474
|
break;
|
|
251440
251475
|
|
|
251441
251476
|
case 822:
|
|
251442
|
-
#line
|
|
251477
|
+
#line 2151 "third_party/libpg_query/grammar/statements/select.y"
|
|
251443
251478
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "-", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251444
251479
|
break;
|
|
251445
251480
|
|
|
251446
251481
|
case 823:
|
|
251447
|
-
#line
|
|
251482
|
+
#line 2153 "third_party/libpg_query/grammar/statements/select.y"
|
|
251448
251483
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "*", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251449
251484
|
break;
|
|
251450
251485
|
|
|
251451
251486
|
case 824:
|
|
251452
|
-
#line
|
|
251487
|
+
#line 2155 "third_party/libpg_query/grammar/statements/select.y"
|
|
251453
251488
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "/", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251454
251489
|
break;
|
|
251455
251490
|
|
|
251456
251491
|
case 825:
|
|
251457
|
-
#line
|
|
251492
|
+
#line 2157 "third_party/libpg_query/grammar/statements/select.y"
|
|
251458
251493
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "%", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251459
251494
|
break;
|
|
251460
251495
|
|
|
251461
251496
|
case 826:
|
|
251462
|
-
#line
|
|
251497
|
+
#line 2159 "third_party/libpg_query/grammar/statements/select.y"
|
|
251463
251498
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "^", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251464
251499
|
break;
|
|
251465
251500
|
|
|
251466
251501
|
case 827:
|
|
251467
|
-
#line
|
|
251502
|
+
#line 2161 "third_party/libpg_query/grammar/statements/select.y"
|
|
251468
251503
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "<", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251469
251504
|
break;
|
|
251470
251505
|
|
|
251471
251506
|
case 828:
|
|
251472
|
-
#line
|
|
251507
|
+
#line 2163 "third_party/libpg_query/grammar/statements/select.y"
|
|
251473
251508
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, ">", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251474
251509
|
break;
|
|
251475
251510
|
|
|
251476
251511
|
case 829:
|
|
251477
|
-
#line
|
|
251512
|
+
#line 2165 "third_party/libpg_query/grammar/statements/select.y"
|
|
251478
251513
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251479
251514
|
break;
|
|
251480
251515
|
|
|
251481
251516
|
case 830:
|
|
251482
|
-
#line
|
|
251517
|
+
#line 2167 "third_party/libpg_query/grammar/statements/select.y"
|
|
251483
251518
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "<=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251484
251519
|
break;
|
|
251485
251520
|
|
|
251486
251521
|
case 831:
|
|
251487
|
-
#line
|
|
251522
|
+
#line 2169 "third_party/libpg_query/grammar/statements/select.y"
|
|
251488
251523
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, ">=", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251489
251524
|
break;
|
|
251490
251525
|
|
|
251491
251526
|
case 832:
|
|
251492
|
-
#line
|
|
251527
|
+
#line 2171 "third_party/libpg_query/grammar/statements/select.y"
|
|
251493
251528
|
{ (yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OP, "<>", (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251494
251529
|
break;
|
|
251495
251530
|
|
|
251496
251531
|
case 833:
|
|
251497
|
-
#line
|
|
251532
|
+
#line 2173 "third_party/libpg_query/grammar/statements/select.y"
|
|
251498
251533
|
{ (yyval.node) = (PGNode *) makeAExpr(PG_AEXPR_OP, (yyvsp[(2) - (3)].list), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(2) - (3)])); ;}
|
|
251499
251534
|
break;
|
|
251500
251535
|
|
|
251501
251536
|
case 834:
|
|
251502
|
-
#line
|
|
251537
|
+
#line 2175 "third_party/libpg_query/grammar/statements/select.y"
|
|
251503
251538
|
{ (yyval.node) = (PGNode *) makeAExpr(PG_AEXPR_OP, (yyvsp[(1) - (2)].list), NULL, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)])); ;}
|
|
251504
251539
|
break;
|
|
251505
251540
|
|
|
251506
251541
|
case 835:
|
|
251507
|
-
#line
|
|
251542
|
+
#line 2177 "third_party/libpg_query/grammar/statements/select.y"
|
|
251508
251543
|
{ (yyval.node) = (PGNode *) makeAExpr(PG_AEXPR_OP, (yyvsp[(2) - (2)].list), (yyvsp[(1) - (2)].node), NULL, (yylsp[(2) - (2)])); ;}
|
|
251509
251544
|
break;
|
|
251510
251545
|
|
|
251511
251546
|
case 836:
|
|
251512
|
-
#line
|
|
251547
|
+
#line 2179 "third_party/libpg_query/grammar/statements/select.y"
|
|
251513
251548
|
{
|
|
251514
251549
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_DISTINCT, "=", (yyvsp[(1) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(2) - (5)]));
|
|
251515
251550
|
;}
|
|
251516
251551
|
break;
|
|
251517
251552
|
|
|
251518
251553
|
case 837:
|
|
251519
|
-
#line
|
|
251554
|
+
#line 2183 "third_party/libpg_query/grammar/statements/select.y"
|
|
251520
251555
|
{
|
|
251521
251556
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_NOT_DISTINCT, "=", (yyvsp[(1) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(2) - (6)]));
|
|
251522
251557
|
;}
|
|
251523
251558
|
break;
|
|
251524
251559
|
|
|
251525
251560
|
case 838:
|
|
251526
|
-
#line
|
|
251561
|
+
#line 2187 "third_party/libpg_query/grammar/statements/select.y"
|
|
251527
251562
|
{
|
|
251528
251563
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OF, "=", (yyvsp[(1) - (6)].node), (PGNode *) (yyvsp[(5) - (6)].list), (yylsp[(2) - (6)]));
|
|
251529
251564
|
;}
|
|
251530
251565
|
break;
|
|
251531
251566
|
|
|
251532
251567
|
case 839:
|
|
251533
|
-
#line
|
|
251568
|
+
#line 2191 "third_party/libpg_query/grammar/statements/select.y"
|
|
251534
251569
|
{
|
|
251535
251570
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_OF, "<>", (yyvsp[(1) - (7)].node), (PGNode *) (yyvsp[(6) - (7)].list), (yylsp[(2) - (7)]));
|
|
251536
251571
|
;}
|
|
251537
251572
|
break;
|
|
251538
251573
|
|
|
251539
251574
|
case 840:
|
|
251540
|
-
#line
|
|
251575
|
+
#line 2204 "third_party/libpg_query/grammar/statements/select.y"
|
|
251541
251576
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251542
251577
|
break;
|
|
251543
251578
|
|
|
251544
251579
|
case 841:
|
|
251545
|
-
#line
|
|
251580
|
+
#line 2205 "third_party/libpg_query/grammar/statements/select.y"
|
|
251546
251581
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251547
251582
|
break;
|
|
251548
251583
|
|
|
251549
251584
|
case 842:
|
|
251550
|
-
#line
|
|
251585
|
+
#line 2207 "third_party/libpg_query/grammar/statements/select.y"
|
|
251551
251586
|
{
|
|
251552
251587
|
PGPositionalReference *n = makeNode(PGPositionalReference);
|
|
251553
251588
|
n->position = (yyvsp[(2) - (2)].ival);
|
|
@@ -251557,7 +251592,7 @@ yyreduce:
|
|
|
251557
251592
|
break;
|
|
251558
251593
|
|
|
251559
251594
|
case 843:
|
|
251560
|
-
#line
|
|
251595
|
+
#line 2214 "third_party/libpg_query/grammar/statements/select.y"
|
|
251561
251596
|
{
|
|
251562
251597
|
if ((yyvsp[(2) - (2)].list))
|
|
251563
251598
|
{
|
|
@@ -251572,7 +251607,7 @@ yyreduce:
|
|
|
251572
251607
|
break;
|
|
251573
251608
|
|
|
251574
251609
|
case 844:
|
|
251575
|
-
#line
|
|
251610
|
+
#line 2226 "third_party/libpg_query/grammar/statements/select.y"
|
|
251576
251611
|
{
|
|
251577
251612
|
PGParamRef *p = makeNode(PGParamRef);
|
|
251578
251613
|
p->number = (yyvsp[(1) - (2)].ival);
|
|
@@ -251590,7 +251625,7 @@ yyreduce:
|
|
|
251590
251625
|
break;
|
|
251591
251626
|
|
|
251592
251627
|
case 845:
|
|
251593
|
-
#line
|
|
251628
|
+
#line 2241 "third_party/libpg_query/grammar/statements/select.y"
|
|
251594
251629
|
{
|
|
251595
251630
|
if ((yyvsp[(4) - (4)].list))
|
|
251596
251631
|
{
|
|
@@ -251605,12 +251640,12 @@ yyreduce:
|
|
|
251605
251640
|
break;
|
|
251606
251641
|
|
|
251607
251642
|
case 846:
|
|
251608
|
-
#line
|
|
251643
|
+
#line 2253 "third_party/libpg_query/grammar/statements/select.y"
|
|
251609
251644
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251610
251645
|
break;
|
|
251611
251646
|
|
|
251612
251647
|
case 847:
|
|
251613
|
-
#line
|
|
251648
|
+
#line 2255 "third_party/libpg_query/grammar/statements/select.y"
|
|
251614
251649
|
{
|
|
251615
251650
|
if ((yyvsp[(2) - (2)].list)) {
|
|
251616
251651
|
PGAIndirection *n = makeNode(PGAIndirection);
|
|
@@ -251625,7 +251660,7 @@ yyreduce:
|
|
|
251625
251660
|
break;
|
|
251626
251661
|
|
|
251627
251662
|
case 848:
|
|
251628
|
-
#line
|
|
251663
|
+
#line 2267 "third_party/libpg_query/grammar/statements/select.y"
|
|
251629
251664
|
{
|
|
251630
251665
|
PGSubLink *n = makeNode(PGSubLink);
|
|
251631
251666
|
n->subLinkType = PG_EXPR_SUBLINK;
|
|
@@ -251639,7 +251674,7 @@ yyreduce:
|
|
|
251639
251674
|
break;
|
|
251640
251675
|
|
|
251641
251676
|
case 849:
|
|
251642
|
-
#line
|
|
251677
|
+
#line 2278 "third_party/libpg_query/grammar/statements/select.y"
|
|
251643
251678
|
{
|
|
251644
251679
|
/*
|
|
251645
251680
|
* Because the select_with_parens nonterminal is designed
|
|
@@ -251666,7 +251701,7 @@ yyreduce:
|
|
|
251666
251701
|
break;
|
|
251667
251702
|
|
|
251668
251703
|
case 850:
|
|
251669
|
-
#line
|
|
251704
|
+
#line 2302 "third_party/libpg_query/grammar/statements/select.y"
|
|
251670
251705
|
{
|
|
251671
251706
|
PGSubLink *n = makeNode(PGSubLink);
|
|
251672
251707
|
n->subLinkType = PG_EXISTS_SUBLINK;
|
|
@@ -251680,7 +251715,7 @@ yyreduce:
|
|
|
251680
251715
|
break;
|
|
251681
251716
|
|
|
251682
251717
|
case 851:
|
|
251683
|
-
#line
|
|
251718
|
+
#line 2313 "third_party/libpg_query/grammar/statements/select.y"
|
|
251684
251719
|
{
|
|
251685
251720
|
PGGroupingFunc *g = makeNode(PGGroupingFunc);
|
|
251686
251721
|
g->args = (yyvsp[(3) - (4)].list);
|
|
@@ -251690,14 +251725,14 @@ yyreduce:
|
|
|
251690
251725
|
break;
|
|
251691
251726
|
|
|
251692
251727
|
case 852:
|
|
251693
|
-
#line
|
|
251728
|
+
#line 2322 "third_party/libpg_query/grammar/statements/select.y"
|
|
251694
251729
|
{
|
|
251695
251730
|
(yyval.node) = (PGNode *) makeFuncCall((yyvsp[(1) - (3)].list), NIL, (yylsp[(1) - (3)]));
|
|
251696
251731
|
;}
|
|
251697
251732
|
break;
|
|
251698
251733
|
|
|
251699
251734
|
case 853:
|
|
251700
|
-
#line
|
|
251735
|
+
#line 2326 "third_party/libpg_query/grammar/statements/select.y"
|
|
251701
251736
|
{
|
|
251702
251737
|
PGFuncCall *n = makeFuncCall((yyvsp[(1) - (6)].list), (yyvsp[(3) - (6)].list), (yylsp[(1) - (6)]));
|
|
251703
251738
|
n->agg_order = (yyvsp[(4) - (6)].list);
|
|
@@ -251707,7 +251742,7 @@ yyreduce:
|
|
|
251707
251742
|
break;
|
|
251708
251743
|
|
|
251709
251744
|
case 854:
|
|
251710
|
-
#line
|
|
251745
|
+
#line 2333 "third_party/libpg_query/grammar/statements/select.y"
|
|
251711
251746
|
{
|
|
251712
251747
|
PGFuncCall *n = makeFuncCall((yyvsp[(1) - (7)].list), list_make1((yyvsp[(4) - (7)].node)), (yylsp[(1) - (7)]));
|
|
251713
251748
|
n->func_variadic = true;
|
|
@@ -251718,7 +251753,7 @@ yyreduce:
|
|
|
251718
251753
|
break;
|
|
251719
251754
|
|
|
251720
251755
|
case 855:
|
|
251721
|
-
#line
|
|
251756
|
+
#line 2341 "third_party/libpg_query/grammar/statements/select.y"
|
|
251722
251757
|
{
|
|
251723
251758
|
PGFuncCall *n = makeFuncCall((yyvsp[(1) - (9)].list), lappend((yyvsp[(3) - (9)].list), (yyvsp[(6) - (9)].node)), (yylsp[(1) - (9)]));
|
|
251724
251759
|
n->func_variadic = true;
|
|
@@ -251729,7 +251764,7 @@ yyreduce:
|
|
|
251729
251764
|
break;
|
|
251730
251765
|
|
|
251731
251766
|
case 856:
|
|
251732
|
-
#line
|
|
251767
|
+
#line 2349 "third_party/libpg_query/grammar/statements/select.y"
|
|
251733
251768
|
{
|
|
251734
251769
|
PGFuncCall *n = makeFuncCall((yyvsp[(1) - (7)].list), (yyvsp[(4) - (7)].list), (yylsp[(1) - (7)]));
|
|
251735
251770
|
n->agg_order = (yyvsp[(5) - (7)].list);
|
|
@@ -251743,7 +251778,7 @@ yyreduce:
|
|
|
251743
251778
|
break;
|
|
251744
251779
|
|
|
251745
251780
|
case 857:
|
|
251746
|
-
#line
|
|
251781
|
+
#line 2360 "third_party/libpg_query/grammar/statements/select.y"
|
|
251747
251782
|
{
|
|
251748
251783
|
PGFuncCall *n = makeFuncCall((yyvsp[(1) - (7)].list), (yyvsp[(4) - (7)].list), (yylsp[(1) - (7)]));
|
|
251749
251784
|
n->agg_order = (yyvsp[(5) - (7)].list);
|
|
@@ -251754,7 +251789,7 @@ yyreduce:
|
|
|
251754
251789
|
break;
|
|
251755
251790
|
|
|
251756
251791
|
case 858:
|
|
251757
|
-
#line
|
|
251792
|
+
#line 2368 "third_party/libpg_query/grammar/statements/select.y"
|
|
251758
251793
|
{
|
|
251759
251794
|
/*
|
|
251760
251795
|
* We consider AGGREGATE(*) to invoke a parameterless
|
|
@@ -251773,7 +251808,7 @@ yyreduce:
|
|
|
251773
251808
|
break;
|
|
251774
251809
|
|
|
251775
251810
|
case 859:
|
|
251776
|
-
#line
|
|
251811
|
+
#line 2396 "third_party/libpg_query/grammar/statements/select.y"
|
|
251777
251812
|
{
|
|
251778
251813
|
PGFuncCall *n = (PGFuncCall *) (yyvsp[(1) - (5)].node);
|
|
251779
251814
|
/*
|
|
@@ -251812,22 +251847,22 @@ yyreduce:
|
|
|
251812
251847
|
break;
|
|
251813
251848
|
|
|
251814
251849
|
case 860:
|
|
251815
|
-
#line
|
|
251850
|
+
#line 2432 "third_party/libpg_query/grammar/statements/select.y"
|
|
251816
251851
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251817
251852
|
break;
|
|
251818
251853
|
|
|
251819
251854
|
case 861:
|
|
251820
|
-
#line
|
|
251855
|
+
#line 2442 "third_party/libpg_query/grammar/statements/select.y"
|
|
251821
251856
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251822
251857
|
break;
|
|
251823
251858
|
|
|
251824
251859
|
case 862:
|
|
251825
|
-
#line
|
|
251860
|
+
#line 2443 "third_party/libpg_query/grammar/statements/select.y"
|
|
251826
251861
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
251827
251862
|
break;
|
|
251828
251863
|
|
|
251829
251864
|
case 863:
|
|
251830
|
-
#line
|
|
251865
|
+
#line 2451 "third_party/libpg_query/grammar/statements/select.y"
|
|
251831
251866
|
{
|
|
251832
251867
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("pg_collation_for"),
|
|
251833
251868
|
list_make1((yyvsp[(4) - (5)].node)),
|
|
@@ -251836,129 +251871,129 @@ yyreduce:
|
|
|
251836
251871
|
break;
|
|
251837
251872
|
|
|
251838
251873
|
case 864:
|
|
251839
|
-
#line
|
|
251874
|
+
#line 2457 "third_party/libpg_query/grammar/statements/select.y"
|
|
251840
251875
|
{
|
|
251841
251876
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_DATE, -1, (yylsp[(1) - (1)]));
|
|
251842
251877
|
;}
|
|
251843
251878
|
break;
|
|
251844
251879
|
|
|
251845
251880
|
case 865:
|
|
251846
|
-
#line
|
|
251881
|
+
#line 2461 "third_party/libpg_query/grammar/statements/select.y"
|
|
251847
251882
|
{
|
|
251848
251883
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_TIME, -1, (yylsp[(1) - (1)]));
|
|
251849
251884
|
;}
|
|
251850
251885
|
break;
|
|
251851
251886
|
|
|
251852
251887
|
case 866:
|
|
251853
|
-
#line
|
|
251888
|
+
#line 2465 "third_party/libpg_query/grammar/statements/select.y"
|
|
251854
251889
|
{
|
|
251855
251890
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_TIME_N, (yyvsp[(3) - (4)].ival), (yylsp[(1) - (4)]));
|
|
251856
251891
|
;}
|
|
251857
251892
|
break;
|
|
251858
251893
|
|
|
251859
251894
|
case 867:
|
|
251860
|
-
#line
|
|
251895
|
+
#line 2469 "third_party/libpg_query/grammar/statements/select.y"
|
|
251861
251896
|
{
|
|
251862
251897
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_TIMESTAMP, -1, (yylsp[(1) - (1)]));
|
|
251863
251898
|
;}
|
|
251864
251899
|
break;
|
|
251865
251900
|
|
|
251866
251901
|
case 868:
|
|
251867
|
-
#line
|
|
251902
|
+
#line 2473 "third_party/libpg_query/grammar/statements/select.y"
|
|
251868
251903
|
{
|
|
251869
251904
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_TIMESTAMP_N, (yyvsp[(3) - (4)].ival), (yylsp[(1) - (4)]));
|
|
251870
251905
|
;}
|
|
251871
251906
|
break;
|
|
251872
251907
|
|
|
251873
251908
|
case 869:
|
|
251874
|
-
#line
|
|
251909
|
+
#line 2477 "third_party/libpg_query/grammar/statements/select.y"
|
|
251875
251910
|
{
|
|
251876
251911
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_LOCALTIME, -1, (yylsp[(1) - (1)]));
|
|
251877
251912
|
;}
|
|
251878
251913
|
break;
|
|
251879
251914
|
|
|
251880
251915
|
case 870:
|
|
251881
|
-
#line
|
|
251916
|
+
#line 2481 "third_party/libpg_query/grammar/statements/select.y"
|
|
251882
251917
|
{
|
|
251883
251918
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_LOCALTIME_N, (yyvsp[(3) - (4)].ival), (yylsp[(1) - (4)]));
|
|
251884
251919
|
;}
|
|
251885
251920
|
break;
|
|
251886
251921
|
|
|
251887
251922
|
case 871:
|
|
251888
|
-
#line
|
|
251923
|
+
#line 2485 "third_party/libpg_query/grammar/statements/select.y"
|
|
251889
251924
|
{
|
|
251890
251925
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_LOCALTIMESTAMP, -1, (yylsp[(1) - (1)]));
|
|
251891
251926
|
;}
|
|
251892
251927
|
break;
|
|
251893
251928
|
|
|
251894
251929
|
case 872:
|
|
251895
|
-
#line
|
|
251930
|
+
#line 2489 "third_party/libpg_query/grammar/statements/select.y"
|
|
251896
251931
|
{
|
|
251897
251932
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_LOCALTIMESTAMP_N, (yyvsp[(3) - (4)].ival), (yylsp[(1) - (4)]));
|
|
251898
251933
|
;}
|
|
251899
251934
|
break;
|
|
251900
251935
|
|
|
251901
251936
|
case 873:
|
|
251902
|
-
#line
|
|
251937
|
+
#line 2493 "third_party/libpg_query/grammar/statements/select.y"
|
|
251903
251938
|
{
|
|
251904
251939
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_ROLE, -1, (yylsp[(1) - (1)]));
|
|
251905
251940
|
;}
|
|
251906
251941
|
break;
|
|
251907
251942
|
|
|
251908
251943
|
case 874:
|
|
251909
|
-
#line
|
|
251944
|
+
#line 2497 "third_party/libpg_query/grammar/statements/select.y"
|
|
251910
251945
|
{
|
|
251911
251946
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_USER, -1, (yylsp[(1) - (1)]));
|
|
251912
251947
|
;}
|
|
251913
251948
|
break;
|
|
251914
251949
|
|
|
251915
251950
|
case 875:
|
|
251916
|
-
#line
|
|
251951
|
+
#line 2501 "third_party/libpg_query/grammar/statements/select.y"
|
|
251917
251952
|
{
|
|
251918
251953
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_SESSION_USER, -1, (yylsp[(1) - (1)]));
|
|
251919
251954
|
;}
|
|
251920
251955
|
break;
|
|
251921
251956
|
|
|
251922
251957
|
case 876:
|
|
251923
|
-
#line
|
|
251958
|
+
#line 2505 "third_party/libpg_query/grammar/statements/select.y"
|
|
251924
251959
|
{
|
|
251925
251960
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_USER, -1, (yylsp[(1) - (1)]));
|
|
251926
251961
|
;}
|
|
251927
251962
|
break;
|
|
251928
251963
|
|
|
251929
251964
|
case 877:
|
|
251930
|
-
#line
|
|
251965
|
+
#line 2509 "third_party/libpg_query/grammar/statements/select.y"
|
|
251931
251966
|
{
|
|
251932
251967
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_CATALOG, -1, (yylsp[(1) - (1)]));
|
|
251933
251968
|
;}
|
|
251934
251969
|
break;
|
|
251935
251970
|
|
|
251936
251971
|
case 878:
|
|
251937
|
-
#line
|
|
251972
|
+
#line 2513 "third_party/libpg_query/grammar/statements/select.y"
|
|
251938
251973
|
{
|
|
251939
251974
|
(yyval.node) = makeSQLValueFunction(PG_SVFOP_CURRENT_SCHEMA, -1, (yylsp[(1) - (1)]));
|
|
251940
251975
|
;}
|
|
251941
251976
|
break;
|
|
251942
251977
|
|
|
251943
251978
|
case 879:
|
|
251944
|
-
#line
|
|
251979
|
+
#line 2517 "third_party/libpg_query/grammar/statements/select.y"
|
|
251945
251980
|
{ (yyval.node) = makeTypeCast((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].typnam), 0, (yylsp[(1) - (6)])); ;}
|
|
251946
251981
|
break;
|
|
251947
251982
|
|
|
251948
251983
|
case 880:
|
|
251949
|
-
#line
|
|
251984
|
+
#line 2519 "third_party/libpg_query/grammar/statements/select.y"
|
|
251950
251985
|
{ (yyval.node) = makeTypeCast((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].typnam), 1, (yylsp[(1) - (6)])); ;}
|
|
251951
251986
|
break;
|
|
251952
251987
|
|
|
251953
251988
|
case 881:
|
|
251954
|
-
#line
|
|
251989
|
+
#line 2521 "third_party/libpg_query/grammar/statements/select.y"
|
|
251955
251990
|
{
|
|
251956
251991
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("date_part"), (yyvsp[(3) - (4)].list), (yylsp[(1) - (4)]));
|
|
251957
251992
|
;}
|
|
251958
251993
|
break;
|
|
251959
251994
|
|
|
251960
251995
|
case 882:
|
|
251961
|
-
#line
|
|
251996
|
+
#line 2525 "third_party/libpg_query/grammar/statements/select.y"
|
|
251962
251997
|
{
|
|
251963
251998
|
/* overlay(A PLACING B FROM C FOR D) is converted to
|
|
251964
251999
|
* overlay(A, B, C, D)
|
|
@@ -251970,7 +252005,7 @@ yyreduce:
|
|
|
251970
252005
|
break;
|
|
251971
252006
|
|
|
251972
252007
|
case 883:
|
|
251973
|
-
#line
|
|
252008
|
+
#line 2534 "third_party/libpg_query/grammar/statements/select.y"
|
|
251974
252009
|
{
|
|
251975
252010
|
/* position(A in B) is converted to position(B, A) */
|
|
251976
252011
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("position"), (yyvsp[(3) - (4)].list), (yylsp[(1) - (4)]));
|
|
@@ -251978,7 +252013,7 @@ yyreduce:
|
|
|
251978
252013
|
break;
|
|
251979
252014
|
|
|
251980
252015
|
case 884:
|
|
251981
|
-
#line
|
|
252016
|
+
#line 2539 "third_party/libpg_query/grammar/statements/select.y"
|
|
251982
252017
|
{
|
|
251983
252018
|
/* substring(A from B for C) is converted to
|
|
251984
252019
|
* substring(A, B, C) - thomas 2000-11-28
|
|
@@ -251988,7 +252023,7 @@ yyreduce:
|
|
|
251988
252023
|
break;
|
|
251989
252024
|
|
|
251990
252025
|
case 885:
|
|
251991
|
-
#line
|
|
252026
|
+
#line 2546 "third_party/libpg_query/grammar/statements/select.y"
|
|
251992
252027
|
{
|
|
251993
252028
|
/* TREAT(expr AS target) converts expr of a particular type to target,
|
|
251994
252029
|
* which is defined to be a subtype of the original expression.
|
|
@@ -252006,7 +252041,7 @@ yyreduce:
|
|
|
252006
252041
|
break;
|
|
252007
252042
|
|
|
252008
252043
|
case 886:
|
|
252009
|
-
#line
|
|
252044
|
+
#line 2561 "third_party/libpg_query/grammar/statements/select.y"
|
|
252010
252045
|
{
|
|
252011
252046
|
/* various trim expressions are defined in SQL
|
|
252012
252047
|
* - thomas 1997-07-19
|
|
@@ -252016,35 +252051,35 @@ yyreduce:
|
|
|
252016
252051
|
break;
|
|
252017
252052
|
|
|
252018
252053
|
case 887:
|
|
252019
|
-
#line
|
|
252054
|
+
#line 2568 "third_party/libpg_query/grammar/statements/select.y"
|
|
252020
252055
|
{
|
|
252021
252056
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("ltrim"), (yyvsp[(4) - (5)].list), (yylsp[(1) - (5)]));
|
|
252022
252057
|
;}
|
|
252023
252058
|
break;
|
|
252024
252059
|
|
|
252025
252060
|
case 888:
|
|
252026
|
-
#line
|
|
252061
|
+
#line 2572 "third_party/libpg_query/grammar/statements/select.y"
|
|
252027
252062
|
{
|
|
252028
252063
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("rtrim"), (yyvsp[(4) - (5)].list), (yylsp[(1) - (5)]));
|
|
252029
252064
|
;}
|
|
252030
252065
|
break;
|
|
252031
252066
|
|
|
252032
252067
|
case 889:
|
|
252033
|
-
#line
|
|
252068
|
+
#line 2576 "third_party/libpg_query/grammar/statements/select.y"
|
|
252034
252069
|
{
|
|
252035
252070
|
(yyval.node) = (PGNode *) makeFuncCall(SystemFuncName("trim"), (yyvsp[(3) - (4)].list), (yylsp[(1) - (4)]));
|
|
252036
252071
|
;}
|
|
252037
252072
|
break;
|
|
252038
252073
|
|
|
252039
252074
|
case 890:
|
|
252040
|
-
#line
|
|
252075
|
+
#line 2580 "third_party/libpg_query/grammar/statements/select.y"
|
|
252041
252076
|
{
|
|
252042
252077
|
(yyval.node) = (PGNode *) makeSimpleAExpr(PG_AEXPR_NULLIF, "=", (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)]));
|
|
252043
252078
|
;}
|
|
252044
252079
|
break;
|
|
252045
252080
|
|
|
252046
252081
|
case 891:
|
|
252047
|
-
#line
|
|
252082
|
+
#line 2584 "third_party/libpg_query/grammar/statements/select.y"
|
|
252048
252083
|
{
|
|
252049
252084
|
PGCoalesceExpr *c = makeNode(PGCoalesceExpr);
|
|
252050
252085
|
c->args = (yyvsp[(3) - (4)].list);
|
|
@@ -252054,57 +252089,57 @@ yyreduce:
|
|
|
252054
252089
|
break;
|
|
252055
252090
|
|
|
252056
252091
|
case 892:
|
|
252057
|
-
#line
|
|
252092
|
+
#line 2597 "third_party/libpg_query/grammar/statements/select.y"
|
|
252058
252093
|
{ (yyval.list) = (yyvsp[(4) - (5)].list); ;}
|
|
252059
252094
|
break;
|
|
252060
252095
|
|
|
252061
252096
|
case 893:
|
|
252062
|
-
#line
|
|
252097
|
+
#line 2598 "third_party/libpg_query/grammar/statements/select.y"
|
|
252063
252098
|
{ (yyval.list) = NIL; ;}
|
|
252064
252099
|
break;
|
|
252065
252100
|
|
|
252066
252101
|
case 894:
|
|
252067
|
-
#line
|
|
252102
|
+
#line 2602 "third_party/libpg_query/grammar/statements/select.y"
|
|
252068
252103
|
{ (yyval.node) = (yyvsp[(4) - (5)].node); ;}
|
|
252069
252104
|
break;
|
|
252070
252105
|
|
|
252071
252106
|
case 895:
|
|
252072
|
-
#line
|
|
252107
|
+
#line 2603 "third_party/libpg_query/grammar/statements/select.y"
|
|
252073
252108
|
{ (yyval.node) = NULL; ;}
|
|
252074
252109
|
break;
|
|
252075
252110
|
|
|
252076
252111
|
case 896:
|
|
252077
|
-
#line
|
|
252112
|
+
#line 2607 "third_party/libpg_query/grammar/statements/select.y"
|
|
252078
252113
|
{ (yyval.boolean) = true; ;}
|
|
252079
252114
|
break;
|
|
252080
252115
|
|
|
252081
252116
|
case 897:
|
|
252082
|
-
#line
|
|
252117
|
+
#line 2608 "third_party/libpg_query/grammar/statements/select.y"
|
|
252083
252118
|
{ (yyval.boolean) = false; ;}
|
|
252084
252119
|
break;
|
|
252085
252120
|
|
|
252086
252121
|
case 898:
|
|
252087
|
-
#line
|
|
252122
|
+
#line 2615 "third_party/libpg_query/grammar/statements/select.y"
|
|
252088
252123
|
{ (yyval.list) = (yyvsp[(2) - (2)].list); ;}
|
|
252089
252124
|
break;
|
|
252090
252125
|
|
|
252091
252126
|
case 899:
|
|
252092
|
-
#line
|
|
252127
|
+
#line 2616 "third_party/libpg_query/grammar/statements/select.y"
|
|
252093
252128
|
{ (yyval.list) = NIL; ;}
|
|
252094
252129
|
break;
|
|
252095
252130
|
|
|
252096
252131
|
case 900:
|
|
252097
|
-
#line
|
|
252132
|
+
#line 2620 "third_party/libpg_query/grammar/statements/select.y"
|
|
252098
252133
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].windef)); ;}
|
|
252099
252134
|
break;
|
|
252100
252135
|
|
|
252101
252136
|
case 901:
|
|
252102
|
-
#line
|
|
252137
|
+
#line 2622 "third_party/libpg_query/grammar/statements/select.y"
|
|
252103
252138
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].windef)); ;}
|
|
252104
252139
|
break;
|
|
252105
252140
|
|
|
252106
252141
|
case 902:
|
|
252107
|
-
#line
|
|
252142
|
+
#line 2627 "third_party/libpg_query/grammar/statements/select.y"
|
|
252108
252143
|
{
|
|
252109
252144
|
PGWindowDef *n = (yyvsp[(3) - (3)].windef);
|
|
252110
252145
|
n->name = (yyvsp[(1) - (3)].str);
|
|
@@ -252113,12 +252148,12 @@ yyreduce:
|
|
|
252113
252148
|
break;
|
|
252114
252149
|
|
|
252115
252150
|
case 903:
|
|
252116
|
-
#line
|
|
252151
|
+
#line 2635 "third_party/libpg_query/grammar/statements/select.y"
|
|
252117
252152
|
{ (yyval.windef) = (yyvsp[(2) - (2)].windef); ;}
|
|
252118
252153
|
break;
|
|
252119
252154
|
|
|
252120
252155
|
case 904:
|
|
252121
|
-
#line
|
|
252156
|
+
#line 2637 "third_party/libpg_query/grammar/statements/select.y"
|
|
252122
252157
|
{
|
|
252123
252158
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252124
252159
|
n->name = (yyvsp[(2) - (2)].str);
|
|
@@ -252134,12 +252169,12 @@ yyreduce:
|
|
|
252134
252169
|
break;
|
|
252135
252170
|
|
|
252136
252171
|
case 905:
|
|
252137
|
-
#line
|
|
252172
|
+
#line 2650 "third_party/libpg_query/grammar/statements/select.y"
|
|
252138
252173
|
{ (yyval.windef) = NULL; ;}
|
|
252139
252174
|
break;
|
|
252140
252175
|
|
|
252141
252176
|
case 906:
|
|
252142
|
-
#line
|
|
252177
|
+
#line 2655 "third_party/libpg_query/grammar/statements/select.y"
|
|
252143
252178
|
{
|
|
252144
252179
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252145
252180
|
n->name = NULL;
|
|
@@ -252156,27 +252191,27 @@ yyreduce:
|
|
|
252156
252191
|
break;
|
|
252157
252192
|
|
|
252158
252193
|
case 907:
|
|
252159
|
-
#line
|
|
252194
|
+
#line 2680 "third_party/libpg_query/grammar/statements/select.y"
|
|
252160
252195
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
252161
252196
|
break;
|
|
252162
252197
|
|
|
252163
252198
|
case 908:
|
|
252164
|
-
#line
|
|
252199
|
+
#line 2681 "third_party/libpg_query/grammar/statements/select.y"
|
|
252165
252200
|
{ (yyval.str) = NULL; ;}
|
|
252166
252201
|
break;
|
|
252167
252202
|
|
|
252168
252203
|
case 909:
|
|
252169
|
-
#line
|
|
252204
|
+
#line 2684 "third_party/libpg_query/grammar/statements/select.y"
|
|
252170
252205
|
{ (yyval.list) = (yyvsp[(3) - (3)].list); ;}
|
|
252171
252206
|
break;
|
|
252172
252207
|
|
|
252173
252208
|
case 910:
|
|
252174
|
-
#line
|
|
252209
|
+
#line 2685 "third_party/libpg_query/grammar/statements/select.y"
|
|
252175
252210
|
{ (yyval.list) = NIL; ;}
|
|
252176
252211
|
break;
|
|
252177
252212
|
|
|
252178
252213
|
case 911:
|
|
252179
|
-
#line
|
|
252214
|
+
#line 2697 "third_party/libpg_query/grammar/statements/select.y"
|
|
252180
252215
|
{
|
|
252181
252216
|
PGWindowDef *n = (yyvsp[(2) - (2)].windef);
|
|
252182
252217
|
n->frameOptions |= FRAMEOPTION_NONDEFAULT | FRAMEOPTION_RANGE;
|
|
@@ -252185,7 +252220,7 @@ yyreduce:
|
|
|
252185
252220
|
break;
|
|
252186
252221
|
|
|
252187
252222
|
case 912:
|
|
252188
|
-
#line
|
|
252223
|
+
#line 2703 "third_party/libpg_query/grammar/statements/select.y"
|
|
252189
252224
|
{
|
|
252190
252225
|
PGWindowDef *n = (yyvsp[(2) - (2)].windef);
|
|
252191
252226
|
n->frameOptions |= FRAMEOPTION_NONDEFAULT | FRAMEOPTION_ROWS;
|
|
@@ -252194,7 +252229,7 @@ yyreduce:
|
|
|
252194
252229
|
break;
|
|
252195
252230
|
|
|
252196
252231
|
case 913:
|
|
252197
|
-
#line
|
|
252232
|
+
#line 2709 "third_party/libpg_query/grammar/statements/select.y"
|
|
252198
252233
|
{
|
|
252199
252234
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252200
252235
|
n->frameOptions = FRAMEOPTION_DEFAULTS;
|
|
@@ -252205,7 +252240,7 @@ yyreduce:
|
|
|
252205
252240
|
break;
|
|
252206
252241
|
|
|
252207
252242
|
case 914:
|
|
252208
|
-
#line
|
|
252243
|
+
#line 2719 "third_party/libpg_query/grammar/statements/select.y"
|
|
252209
252244
|
{
|
|
252210
252245
|
PGWindowDef *n = (yyvsp[(1) - (1)].windef);
|
|
252211
252246
|
/* reject invalid cases */
|
|
@@ -252225,7 +252260,7 @@ yyreduce:
|
|
|
252225
252260
|
break;
|
|
252226
252261
|
|
|
252227
252262
|
case 915:
|
|
252228
|
-
#line
|
|
252263
|
+
#line 2736 "third_party/libpg_query/grammar/statements/select.y"
|
|
252229
252264
|
{
|
|
252230
252265
|
PGWindowDef *n1 = (yyvsp[(2) - (4)].windef);
|
|
252231
252266
|
PGWindowDef *n2 = (yyvsp[(4) - (4)].windef);
|
|
@@ -252265,7 +252300,7 @@ yyreduce:
|
|
|
252265
252300
|
break;
|
|
252266
252301
|
|
|
252267
252302
|
case 916:
|
|
252268
|
-
#line
|
|
252303
|
+
#line 2781 "third_party/libpg_query/grammar/statements/select.y"
|
|
252269
252304
|
{
|
|
252270
252305
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252271
252306
|
n->frameOptions = FRAMEOPTION_START_UNBOUNDED_PRECEDING;
|
|
@@ -252276,7 +252311,7 @@ yyreduce:
|
|
|
252276
252311
|
break;
|
|
252277
252312
|
|
|
252278
252313
|
case 917:
|
|
252279
|
-
#line
|
|
252314
|
+
#line 2789 "third_party/libpg_query/grammar/statements/select.y"
|
|
252280
252315
|
{
|
|
252281
252316
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252282
252317
|
n->frameOptions = FRAMEOPTION_START_UNBOUNDED_FOLLOWING;
|
|
@@ -252287,7 +252322,7 @@ yyreduce:
|
|
|
252287
252322
|
break;
|
|
252288
252323
|
|
|
252289
252324
|
case 918:
|
|
252290
|
-
#line
|
|
252325
|
+
#line 2797 "third_party/libpg_query/grammar/statements/select.y"
|
|
252291
252326
|
{
|
|
252292
252327
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252293
252328
|
n->frameOptions = FRAMEOPTION_START_CURRENT_ROW;
|
|
@@ -252298,7 +252333,7 @@ yyreduce:
|
|
|
252298
252333
|
break;
|
|
252299
252334
|
|
|
252300
252335
|
case 919:
|
|
252301
|
-
#line
|
|
252336
|
+
#line 2805 "third_party/libpg_query/grammar/statements/select.y"
|
|
252302
252337
|
{
|
|
252303
252338
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252304
252339
|
n->frameOptions = FRAMEOPTION_START_VALUE_PRECEDING;
|
|
@@ -252309,7 +252344,7 @@ yyreduce:
|
|
|
252309
252344
|
break;
|
|
252310
252345
|
|
|
252311
252346
|
case 920:
|
|
252312
|
-
#line
|
|
252347
|
+
#line 2813 "third_party/libpg_query/grammar/statements/select.y"
|
|
252313
252348
|
{
|
|
252314
252349
|
PGWindowDef *n = makeNode(PGWindowDef);
|
|
252315
252350
|
n->frameOptions = FRAMEOPTION_START_VALUE_FOLLOWING;
|
|
@@ -252320,27 +252355,27 @@ yyreduce:
|
|
|
252320
252355
|
break;
|
|
252321
252356
|
|
|
252322
252357
|
case 921:
|
|
252323
|
-
#line
|
|
252358
|
+
#line 2833 "third_party/libpg_query/grammar/statements/select.y"
|
|
252324
252359
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
252325
252360
|
break;
|
|
252326
252361
|
|
|
252327
252362
|
case 922:
|
|
252328
|
-
#line
|
|
252363
|
+
#line 2834 "third_party/libpg_query/grammar/statements/select.y"
|
|
252329
252364
|
{ (yyval.list) = NIL; ;}
|
|
252330
252365
|
break;
|
|
252331
252366
|
|
|
252332
252367
|
case 923:
|
|
252333
|
-
#line
|
|
252368
|
+
#line 2837 "third_party/libpg_query/grammar/statements/select.y"
|
|
252334
252369
|
{ (yyval.list) = (yyvsp[(1) - (1)].list);;}
|
|
252335
252370
|
break;
|
|
252336
252371
|
|
|
252337
252372
|
case 924:
|
|
252338
|
-
#line
|
|
252373
|
+
#line 2838 "third_party/libpg_query/grammar/statements/select.y"
|
|
252339
252374
|
{ (yyval.list) = lappend((yyvsp[(2) - (5)].list), (yyvsp[(4) - (5)].node)); ;}
|
|
252340
252375
|
break;
|
|
252341
252376
|
|
|
252342
252377
|
case 925:
|
|
252343
|
-
#line
|
|
252378
|
+
#line 2842 "third_party/libpg_query/grammar/statements/select.y"
|
|
252344
252379
|
{
|
|
252345
252380
|
PGNamedArgExpr *na = makeNode(PGNamedArgExpr);
|
|
252346
252381
|
na->name = (yyvsp[(1) - (3)].str);
|
|
@@ -252352,221 +252387,221 @@ yyreduce:
|
|
|
252352
252387
|
break;
|
|
252353
252388
|
|
|
252354
252389
|
case 926:
|
|
252355
|
-
#line
|
|
252390
|
+
#line 2852 "third_party/libpg_query/grammar/statements/select.y"
|
|
252356
252391
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); ;}
|
|
252357
252392
|
break;
|
|
252358
252393
|
|
|
252359
252394
|
case 927:
|
|
252360
|
-
#line
|
|
252395
|
+
#line 2853 "third_party/libpg_query/grammar/statements/select.y"
|
|
252361
252396
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node)); ;}
|
|
252362
252397
|
break;
|
|
252363
252398
|
|
|
252364
252399
|
case 928:
|
|
252365
|
-
#line
|
|
252400
|
+
#line 2855 "third_party/libpg_query/grammar/statements/select.y"
|
|
252366
252401
|
{ (yyval.subquerytype) = PG_ANY_SUBLINK; ;}
|
|
252367
252402
|
break;
|
|
252368
252403
|
|
|
252369
252404
|
case 929:
|
|
252370
|
-
#line
|
|
252405
|
+
#line 2856 "third_party/libpg_query/grammar/statements/select.y"
|
|
252371
252406
|
{ (yyval.subquerytype) = PG_ANY_SUBLINK; ;}
|
|
252372
252407
|
break;
|
|
252373
252408
|
|
|
252374
252409
|
case 930:
|
|
252375
|
-
#line
|
|
252410
|
+
#line 2857 "third_party/libpg_query/grammar/statements/select.y"
|
|
252376
252411
|
{ (yyval.subquerytype) = PG_ALL_SUBLINK; ;}
|
|
252377
252412
|
break;
|
|
252378
252413
|
|
|
252379
252414
|
case 931:
|
|
252380
|
-
#line
|
|
252415
|
+
#line 2860 "third_party/libpg_query/grammar/statements/select.y"
|
|
252381
252416
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
252382
252417
|
break;
|
|
252383
252418
|
|
|
252384
252419
|
case 932:
|
|
252385
|
-
#line
|
|
252420
|
+
#line 2861 "third_party/libpg_query/grammar/statements/select.y"
|
|
252386
252421
|
{ (yyval.str) = (char*) (yyvsp[(1) - (1)].conststr); ;}
|
|
252387
252422
|
break;
|
|
252388
252423
|
|
|
252389
252424
|
case 933:
|
|
252390
|
-
#line
|
|
252425
|
+
#line 2864 "third_party/libpg_query/grammar/statements/select.y"
|
|
252391
252426
|
{ (yyval.conststr) = "+"; ;}
|
|
252392
252427
|
break;
|
|
252393
252428
|
|
|
252394
252429
|
case 934:
|
|
252395
|
-
#line
|
|
252430
|
+
#line 2865 "third_party/libpg_query/grammar/statements/select.y"
|
|
252396
252431
|
{ (yyval.conststr) = "-"; ;}
|
|
252397
252432
|
break;
|
|
252398
252433
|
|
|
252399
252434
|
case 935:
|
|
252400
|
-
#line
|
|
252435
|
+
#line 2866 "third_party/libpg_query/grammar/statements/select.y"
|
|
252401
252436
|
{ (yyval.conststr) = "*"; ;}
|
|
252402
252437
|
break;
|
|
252403
252438
|
|
|
252404
252439
|
case 936:
|
|
252405
|
-
#line
|
|
252440
|
+
#line 2867 "third_party/libpg_query/grammar/statements/select.y"
|
|
252406
252441
|
{ (yyval.conststr) = "/"; ;}
|
|
252407
252442
|
break;
|
|
252408
252443
|
|
|
252409
252444
|
case 937:
|
|
252410
|
-
#line
|
|
252445
|
+
#line 2868 "third_party/libpg_query/grammar/statements/select.y"
|
|
252411
252446
|
{ (yyval.conststr) = "%"; ;}
|
|
252412
252447
|
break;
|
|
252413
252448
|
|
|
252414
252449
|
case 938:
|
|
252415
|
-
#line
|
|
252450
|
+
#line 2869 "third_party/libpg_query/grammar/statements/select.y"
|
|
252416
252451
|
{ (yyval.conststr) = "^"; ;}
|
|
252417
252452
|
break;
|
|
252418
252453
|
|
|
252419
252454
|
case 939:
|
|
252420
|
-
#line
|
|
252455
|
+
#line 2870 "third_party/libpg_query/grammar/statements/select.y"
|
|
252421
252456
|
{ (yyval.conststr) = "<"; ;}
|
|
252422
252457
|
break;
|
|
252423
252458
|
|
|
252424
252459
|
case 940:
|
|
252425
|
-
#line
|
|
252460
|
+
#line 2871 "third_party/libpg_query/grammar/statements/select.y"
|
|
252426
252461
|
{ (yyval.conststr) = ">"; ;}
|
|
252427
252462
|
break;
|
|
252428
252463
|
|
|
252429
252464
|
case 941:
|
|
252430
|
-
#line
|
|
252465
|
+
#line 2872 "third_party/libpg_query/grammar/statements/select.y"
|
|
252431
252466
|
{ (yyval.conststr) = "="; ;}
|
|
252432
252467
|
break;
|
|
252433
252468
|
|
|
252434
252469
|
case 942:
|
|
252435
|
-
#line
|
|
252470
|
+
#line 2873 "third_party/libpg_query/grammar/statements/select.y"
|
|
252436
252471
|
{ (yyval.conststr) = "<="; ;}
|
|
252437
252472
|
break;
|
|
252438
252473
|
|
|
252439
252474
|
case 943:
|
|
252440
|
-
#line
|
|
252475
|
+
#line 2874 "third_party/libpg_query/grammar/statements/select.y"
|
|
252441
252476
|
{ (yyval.conststr) = ">="; ;}
|
|
252442
252477
|
break;
|
|
252443
252478
|
|
|
252444
252479
|
case 944:
|
|
252445
|
-
#line
|
|
252480
|
+
#line 2875 "third_party/libpg_query/grammar/statements/select.y"
|
|
252446
252481
|
{ (yyval.conststr) = "<>"; ;}
|
|
252447
252482
|
break;
|
|
252448
252483
|
|
|
252449
252484
|
case 945:
|
|
252450
|
-
#line
|
|
252485
|
+
#line 2879 "third_party/libpg_query/grammar/statements/select.y"
|
|
252451
252486
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
252452
252487
|
break;
|
|
252453
252488
|
|
|
252454
252489
|
case 946:
|
|
252455
|
-
#line
|
|
252490
|
+
#line 2881 "third_party/libpg_query/grammar/statements/select.y"
|
|
252456
252491
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
252457
252492
|
break;
|
|
252458
252493
|
|
|
252459
252494
|
case 947:
|
|
252460
|
-
#line
|
|
252495
|
+
#line 2886 "third_party/libpg_query/grammar/statements/select.y"
|
|
252461
252496
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
252462
252497
|
break;
|
|
252463
252498
|
|
|
252464
252499
|
case 948:
|
|
252465
|
-
#line
|
|
252500
|
+
#line 2888 "third_party/libpg_query/grammar/statements/select.y"
|
|
252466
252501
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
252467
252502
|
break;
|
|
252468
252503
|
|
|
252469
252504
|
case 949:
|
|
252470
|
-
#line
|
|
252505
|
+
#line 2893 "third_party/libpg_query/grammar/statements/select.y"
|
|
252471
252506
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
252472
252507
|
break;
|
|
252473
252508
|
|
|
252474
252509
|
case 950:
|
|
252475
|
-
#line
|
|
252510
|
+
#line 2895 "third_party/libpg_query/grammar/statements/select.y"
|
|
252476
252511
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
252477
252512
|
break;
|
|
252478
252513
|
|
|
252479
252514
|
case 951:
|
|
252480
|
-
#line
|
|
252515
|
+
#line 2897 "third_party/libpg_query/grammar/statements/select.y"
|
|
252481
252516
|
{ (yyval.list) = list_make1(makeString("~~")); ;}
|
|
252482
252517
|
break;
|
|
252483
252518
|
|
|
252484
252519
|
case 952:
|
|
252485
|
-
#line
|
|
252520
|
+
#line 2899 "third_party/libpg_query/grammar/statements/select.y"
|
|
252486
252521
|
{ (yyval.list) = list_make1(makeString("!~~")); ;}
|
|
252487
252522
|
break;
|
|
252488
252523
|
|
|
252489
252524
|
case 953:
|
|
252490
|
-
#line
|
|
252525
|
+
#line 2901 "third_party/libpg_query/grammar/statements/select.y"
|
|
252491
252526
|
{ (yyval.list) = list_make1(makeString("~~~")); ;}
|
|
252492
252527
|
break;
|
|
252493
252528
|
|
|
252494
252529
|
case 954:
|
|
252495
|
-
#line
|
|
252530
|
+
#line 2903 "third_party/libpg_query/grammar/statements/select.y"
|
|
252496
252531
|
{ (yyval.list) = list_make1(makeString("!~~~")); ;}
|
|
252497
252532
|
break;
|
|
252498
252533
|
|
|
252499
252534
|
case 955:
|
|
252500
|
-
#line
|
|
252535
|
+
#line 2905 "third_party/libpg_query/grammar/statements/select.y"
|
|
252501
252536
|
{ (yyval.list) = list_make1(makeString("~~*")); ;}
|
|
252502
252537
|
break;
|
|
252503
252538
|
|
|
252504
252539
|
case 956:
|
|
252505
|
-
#line
|
|
252540
|
+
#line 2907 "third_party/libpg_query/grammar/statements/select.y"
|
|
252506
252541
|
{ (yyval.list) = list_make1(makeString("!~~*")); ;}
|
|
252507
252542
|
break;
|
|
252508
252543
|
|
|
252509
252544
|
case 957:
|
|
252510
|
-
#line
|
|
252545
|
+
#line 2921 "third_party/libpg_query/grammar/statements/select.y"
|
|
252511
252546
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
252512
252547
|
break;
|
|
252513
252548
|
|
|
252514
252549
|
case 958:
|
|
252515
|
-
#line
|
|
252550
|
+
#line 2923 "third_party/libpg_query/grammar/statements/select.y"
|
|
252516
252551
|
{ (yyval.list) = lcons(makeString((yyvsp[(1) - (3)].str)), (yyvsp[(3) - (3)].list)); ;}
|
|
252517
252552
|
break;
|
|
252518
252553
|
|
|
252519
252554
|
case 959:
|
|
252520
|
-
#line
|
|
252555
|
+
#line 2927 "third_party/libpg_query/grammar/statements/select.y"
|
|
252521
252556
|
{
|
|
252522
252557
|
(yyval.list) = list_make1((yyvsp[(1) - (1)].node));
|
|
252523
252558
|
;}
|
|
252524
252559
|
break;
|
|
252525
252560
|
|
|
252526
252561
|
case 960:
|
|
252527
|
-
#line
|
|
252562
|
+
#line 2931 "third_party/libpg_query/grammar/statements/select.y"
|
|
252528
252563
|
{
|
|
252529
252564
|
(yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
|
|
252530
252565
|
;}
|
|
252531
252566
|
break;
|
|
252532
252567
|
|
|
252533
252568
|
case 961:
|
|
252534
|
-
#line
|
|
252569
|
+
#line 2938 "third_party/libpg_query/grammar/statements/select.y"
|
|
252535
252570
|
{
|
|
252536
252571
|
(yyval.list) = (yyvsp[(1) - (1)].list);
|
|
252537
252572
|
;}
|
|
252538
252573
|
break;
|
|
252539
252574
|
|
|
252540
252575
|
case 962:
|
|
252541
|
-
#line
|
|
252576
|
+
#line 2942 "third_party/libpg_query/grammar/statements/select.y"
|
|
252542
252577
|
{
|
|
252543
252578
|
(yyval.list) = NULL;
|
|
252544
252579
|
;}
|
|
252545
252580
|
break;
|
|
252546
252581
|
|
|
252547
252582
|
case 963:
|
|
252548
|
-
#line
|
|
252583
|
+
#line 2950 "third_party/libpg_query/grammar/statements/select.y"
|
|
252549
252584
|
{
|
|
252550
252585
|
(yyval.list) = list_make1((yyvsp[(1) - (1)].node));
|
|
252551
252586
|
;}
|
|
252552
252587
|
break;
|
|
252553
252588
|
|
|
252554
252589
|
case 964:
|
|
252555
|
-
#line
|
|
252590
|
+
#line 2954 "third_party/libpg_query/grammar/statements/select.y"
|
|
252556
252591
|
{
|
|
252557
252592
|
(yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].node));
|
|
252558
252593
|
;}
|
|
252559
252594
|
break;
|
|
252560
252595
|
|
|
252561
252596
|
case 965:
|
|
252562
|
-
#line
|
|
252597
|
+
#line 2960 "third_party/libpg_query/grammar/statements/select.y"
|
|
252563
252598
|
{
|
|
252564
252599
|
(yyval.node) = (yyvsp[(1) - (1)].node);
|
|
252565
252600
|
;}
|
|
252566
252601
|
break;
|
|
252567
252602
|
|
|
252568
252603
|
case 966:
|
|
252569
|
-
#line
|
|
252604
|
+
#line 2964 "third_party/libpg_query/grammar/statements/select.y"
|
|
252570
252605
|
{
|
|
252571
252606
|
PGNamedArgExpr *na = makeNode(PGNamedArgExpr);
|
|
252572
252607
|
na->name = (yyvsp[(1) - (3)].str);
|
|
@@ -252578,7 +252613,7 @@ yyreduce:
|
|
|
252578
252613
|
break;
|
|
252579
252614
|
|
|
252580
252615
|
case 967:
|
|
252581
|
-
#line
|
|
252616
|
+
#line 2973 "third_party/libpg_query/grammar/statements/select.y"
|
|
252582
252617
|
{
|
|
252583
252618
|
PGNamedArgExpr *na = makeNode(PGNamedArgExpr);
|
|
252584
252619
|
na->name = (yyvsp[(1) - (3)].str);
|
|
@@ -252590,115 +252625,115 @@ yyreduce:
|
|
|
252590
252625
|
break;
|
|
252591
252626
|
|
|
252592
252627
|
case 968:
|
|
252593
|
-
#line
|
|
252628
|
+
#line 2983 "third_party/libpg_query/grammar/statements/select.y"
|
|
252594
252629
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].typnam)); ;}
|
|
252595
252630
|
break;
|
|
252596
252631
|
|
|
252597
252632
|
case 969:
|
|
252598
|
-
#line
|
|
252633
|
+
#line 2984 "third_party/libpg_query/grammar/statements/select.y"
|
|
252599
252634
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].typnam)); ;}
|
|
252600
252635
|
break;
|
|
252601
252636
|
|
|
252602
252637
|
case 970:
|
|
252603
|
-
#line
|
|
252638
|
+
#line 2989 "third_party/libpg_query/grammar/statements/select.y"
|
|
252604
252639
|
{
|
|
252605
252640
|
(yyval.list) = list_make2(makeStringConst((yyvsp[(1) - (3)].str), (yylsp[(1) - (3)])), (yyvsp[(3) - (3)].node));
|
|
252606
252641
|
;}
|
|
252607
252642
|
break;
|
|
252608
252643
|
|
|
252609
252644
|
case 971:
|
|
252610
|
-
#line
|
|
252645
|
+
#line 2992 "third_party/libpg_query/grammar/statements/select.y"
|
|
252611
252646
|
{ (yyval.list) = NIL; ;}
|
|
252612
252647
|
break;
|
|
252613
252648
|
|
|
252614
252649
|
case 972:
|
|
252615
|
-
#line
|
|
252650
|
+
#line 2999 "third_party/libpg_query/grammar/statements/select.y"
|
|
252616
252651
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
252617
252652
|
break;
|
|
252618
252653
|
|
|
252619
252654
|
case 973:
|
|
252620
|
-
#line
|
|
252655
|
+
#line 3000 "third_party/libpg_query/grammar/statements/select.y"
|
|
252621
252656
|
{ (yyval.str) = (char*) "year"; ;}
|
|
252622
252657
|
break;
|
|
252623
252658
|
|
|
252624
252659
|
case 974:
|
|
252625
|
-
#line
|
|
252660
|
+
#line 3001 "third_party/libpg_query/grammar/statements/select.y"
|
|
252626
252661
|
{ (yyval.str) = (char*) "month"; ;}
|
|
252627
252662
|
break;
|
|
252628
252663
|
|
|
252629
252664
|
case 975:
|
|
252630
|
-
#line
|
|
252665
|
+
#line 3002 "third_party/libpg_query/grammar/statements/select.y"
|
|
252631
252666
|
{ (yyval.str) = (char*) "day"; ;}
|
|
252632
252667
|
break;
|
|
252633
252668
|
|
|
252634
252669
|
case 976:
|
|
252635
|
-
#line
|
|
252670
|
+
#line 3003 "third_party/libpg_query/grammar/statements/select.y"
|
|
252636
252671
|
{ (yyval.str) = (char*) "hour"; ;}
|
|
252637
252672
|
break;
|
|
252638
252673
|
|
|
252639
252674
|
case 977:
|
|
252640
|
-
#line
|
|
252675
|
+
#line 3004 "third_party/libpg_query/grammar/statements/select.y"
|
|
252641
252676
|
{ (yyval.str) = (char*) "minute"; ;}
|
|
252642
252677
|
break;
|
|
252643
252678
|
|
|
252644
252679
|
case 978:
|
|
252645
|
-
#line
|
|
252680
|
+
#line 3005 "third_party/libpg_query/grammar/statements/select.y"
|
|
252646
252681
|
{ (yyval.str) = (char*) "second"; ;}
|
|
252647
252682
|
break;
|
|
252648
252683
|
|
|
252649
252684
|
case 979:
|
|
252650
|
-
#line
|
|
252685
|
+
#line 3006 "third_party/libpg_query/grammar/statements/select.y"
|
|
252651
252686
|
{ (yyval.str) = (char*) "millisecond"; ;}
|
|
252652
252687
|
break;
|
|
252653
252688
|
|
|
252654
252689
|
case 980:
|
|
252655
|
-
#line
|
|
252690
|
+
#line 3007 "third_party/libpg_query/grammar/statements/select.y"
|
|
252656
252691
|
{ (yyval.str) = (char*) "microsecond"; ;}
|
|
252657
252692
|
break;
|
|
252658
252693
|
|
|
252659
252694
|
case 981:
|
|
252660
|
-
#line
|
|
252695
|
+
#line 3008 "third_party/libpg_query/grammar/statements/select.y"
|
|
252661
252696
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
252662
252697
|
break;
|
|
252663
252698
|
|
|
252664
252699
|
case 982:
|
|
252665
|
-
#line
|
|
252700
|
+
#line 3019 "third_party/libpg_query/grammar/statements/select.y"
|
|
252666
252701
|
{
|
|
252667
252702
|
(yyval.list) = list_make4((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node));
|
|
252668
252703
|
;}
|
|
252669
252704
|
break;
|
|
252670
252705
|
|
|
252671
252706
|
case 983:
|
|
252672
|
-
#line
|
|
252707
|
+
#line 3023 "third_party/libpg_query/grammar/statements/select.y"
|
|
252673
252708
|
{
|
|
252674
252709
|
(yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node));
|
|
252675
252710
|
;}
|
|
252676
252711
|
break;
|
|
252677
252712
|
|
|
252678
252713
|
case 984:
|
|
252679
|
-
#line
|
|
252714
|
+
#line 3030 "third_party/libpg_query/grammar/statements/select.y"
|
|
252680
252715
|
{ (yyval.node) = (yyvsp[(2) - (2)].node); ;}
|
|
252681
252716
|
break;
|
|
252682
252717
|
|
|
252683
252718
|
case 985:
|
|
252684
|
-
#line
|
|
252719
|
+
#line 3036 "third_party/libpg_query/grammar/statements/select.y"
|
|
252685
252720
|
{ (yyval.list) = list_make2((yyvsp[(3) - (3)].node), (yyvsp[(1) - (3)].node)); ;}
|
|
252686
252721
|
break;
|
|
252687
252722
|
|
|
252688
252723
|
case 986:
|
|
252689
|
-
#line
|
|
252724
|
+
#line 3037 "third_party/libpg_query/grammar/statements/select.y"
|
|
252690
252725
|
{ (yyval.list) = NIL; ;}
|
|
252691
252726
|
break;
|
|
252692
252727
|
|
|
252693
252728
|
case 987:
|
|
252694
|
-
#line
|
|
252729
|
+
#line 3054 "third_party/libpg_query/grammar/statements/select.y"
|
|
252695
252730
|
{
|
|
252696
252731
|
(yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].node));
|
|
252697
252732
|
;}
|
|
252698
252733
|
break;
|
|
252699
252734
|
|
|
252700
252735
|
case 988:
|
|
252701
|
-
#line
|
|
252736
|
+
#line 3058 "third_party/libpg_query/grammar/statements/select.y"
|
|
252702
252737
|
{
|
|
252703
252738
|
/* not legal per SQL99, but might as well allow it */
|
|
252704
252739
|
(yyval.list) = list_make3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].node));
|
|
@@ -252706,14 +252741,14 @@ yyreduce:
|
|
|
252706
252741
|
break;
|
|
252707
252742
|
|
|
252708
252743
|
case 989:
|
|
252709
|
-
#line
|
|
252744
|
+
#line 3063 "third_party/libpg_query/grammar/statements/select.y"
|
|
252710
252745
|
{
|
|
252711
252746
|
(yyval.list) = list_make2((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
|
|
252712
252747
|
;}
|
|
252713
252748
|
break;
|
|
252714
252749
|
|
|
252715
252750
|
case 990:
|
|
252716
|
-
#line
|
|
252751
|
+
#line 3067 "third_party/libpg_query/grammar/statements/select.y"
|
|
252717
252752
|
{
|
|
252718
252753
|
/*
|
|
252719
252754
|
* Since there are no cases where this syntax allows
|
|
@@ -252731,44 +252766,44 @@ yyreduce:
|
|
|
252731
252766
|
break;
|
|
252732
252767
|
|
|
252733
252768
|
case 991:
|
|
252734
|
-
#line
|
|
252769
|
+
#line 3082 "third_party/libpg_query/grammar/statements/select.y"
|
|
252735
252770
|
{
|
|
252736
252771
|
(yyval.list) = (yyvsp[(1) - (1)].list);
|
|
252737
252772
|
;}
|
|
252738
252773
|
break;
|
|
252739
252774
|
|
|
252740
252775
|
case 992:
|
|
252741
|
-
#line
|
|
252776
|
+
#line 3086 "third_party/libpg_query/grammar/statements/select.y"
|
|
252742
252777
|
{ (yyval.list) = NIL; ;}
|
|
252743
252778
|
break;
|
|
252744
252779
|
|
|
252745
252780
|
case 993:
|
|
252746
|
-
#line
|
|
252781
|
+
#line 3090 "third_party/libpg_query/grammar/statements/select.y"
|
|
252747
252782
|
{ (yyval.node) = (yyvsp[(2) - (2)].node); ;}
|
|
252748
252783
|
break;
|
|
252749
252784
|
|
|
252750
252785
|
case 994:
|
|
252751
|
-
#line
|
|
252786
|
+
#line 3093 "third_party/libpg_query/grammar/statements/select.y"
|
|
252752
252787
|
{ (yyval.node) = (yyvsp[(2) - (2)].node); ;}
|
|
252753
252788
|
break;
|
|
252754
252789
|
|
|
252755
252790
|
case 995:
|
|
252756
|
-
#line
|
|
252791
|
+
#line 3096 "third_party/libpg_query/grammar/statements/select.y"
|
|
252757
252792
|
{ (yyval.list) = lappend((yyvsp[(3) - (3)].list), (yyvsp[(1) - (3)].node)); ;}
|
|
252758
252793
|
break;
|
|
252759
252794
|
|
|
252760
252795
|
case 996:
|
|
252761
|
-
#line
|
|
252796
|
+
#line 3097 "third_party/libpg_query/grammar/statements/select.y"
|
|
252762
252797
|
{ (yyval.list) = (yyvsp[(2) - (2)].list); ;}
|
|
252763
252798
|
break;
|
|
252764
252799
|
|
|
252765
252800
|
case 997:
|
|
252766
|
-
#line
|
|
252801
|
+
#line 3098 "third_party/libpg_query/grammar/statements/select.y"
|
|
252767
252802
|
{ (yyval.list) = (yyvsp[(1) - (1)].list); ;}
|
|
252768
252803
|
break;
|
|
252769
252804
|
|
|
252770
252805
|
case 998:
|
|
252771
|
-
#line
|
|
252806
|
+
#line 3102 "third_party/libpg_query/grammar/statements/select.y"
|
|
252772
252807
|
{
|
|
252773
252808
|
PGSubLink *n = makeNode(PGSubLink);
|
|
252774
252809
|
n->subselect = (yyvsp[(1) - (1)].node);
|
|
@@ -252778,12 +252813,12 @@ yyreduce:
|
|
|
252778
252813
|
break;
|
|
252779
252814
|
|
|
252780
252815
|
case 999:
|
|
252781
|
-
#line
|
|
252816
|
+
#line 3108 "third_party/libpg_query/grammar/statements/select.y"
|
|
252782
252817
|
{ (yyval.node) = (PGNode *)(yyvsp[(2) - (3)].list); ;}
|
|
252783
252818
|
break;
|
|
252784
252819
|
|
|
252785
252820
|
case 1000:
|
|
252786
|
-
#line
|
|
252821
|
+
#line 3119 "third_party/libpg_query/grammar/statements/select.y"
|
|
252787
252822
|
{
|
|
252788
252823
|
PGCaseExpr *c = makeNode(PGCaseExpr);
|
|
252789
252824
|
c->casetype = InvalidOid; /* not analyzed yet */
|
|
@@ -252796,17 +252831,17 @@ yyreduce:
|
|
|
252796
252831
|
break;
|
|
252797
252832
|
|
|
252798
252833
|
case 1001:
|
|
252799
|
-
#line
|
|
252834
|
+
#line 3132 "third_party/libpg_query/grammar/statements/select.y"
|
|
252800
252835
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); ;}
|
|
252801
252836
|
break;
|
|
252802
252837
|
|
|
252803
252838
|
case 1002:
|
|
252804
|
-
#line
|
|
252839
|
+
#line 3133 "third_party/libpg_query/grammar/statements/select.y"
|
|
252805
252840
|
{ (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); ;}
|
|
252806
252841
|
break;
|
|
252807
252842
|
|
|
252808
252843
|
case 1003:
|
|
252809
|
-
#line
|
|
252844
|
+
#line 3138 "third_party/libpg_query/grammar/statements/select.y"
|
|
252810
252845
|
{
|
|
252811
252846
|
PGCaseWhen *w = makeNode(PGCaseWhen);
|
|
252812
252847
|
w->expr = (PGExpr *) (yyvsp[(2) - (4)].node);
|
|
@@ -252817,48 +252852,48 @@ yyreduce:
|
|
|
252817
252852
|
break;
|
|
252818
252853
|
|
|
252819
252854
|
case 1004:
|
|
252820
|
-
#line
|
|
252855
|
+
#line 3148 "third_party/libpg_query/grammar/statements/select.y"
|
|
252821
252856
|
{ (yyval.node) = (yyvsp[(2) - (2)].node); ;}
|
|
252822
252857
|
break;
|
|
252823
252858
|
|
|
252824
252859
|
case 1005:
|
|
252825
|
-
#line
|
|
252860
|
+
#line 3149 "third_party/libpg_query/grammar/statements/select.y"
|
|
252826
252861
|
{ (yyval.node) = NULL; ;}
|
|
252827
252862
|
break;
|
|
252828
252863
|
|
|
252829
252864
|
case 1006:
|
|
252830
|
-
#line
|
|
252865
|
+
#line 3152 "third_party/libpg_query/grammar/statements/select.y"
|
|
252831
252866
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
252832
252867
|
break;
|
|
252833
252868
|
|
|
252834
252869
|
case 1007:
|
|
252835
|
-
#line
|
|
252870
|
+
#line 3153 "third_party/libpg_query/grammar/statements/select.y"
|
|
252836
252871
|
{ (yyval.node) = NULL; ;}
|
|
252837
252872
|
break;
|
|
252838
252873
|
|
|
252839
252874
|
case 1008:
|
|
252840
|
-
#line
|
|
252875
|
+
#line 3157 "third_party/libpg_query/grammar/statements/select.y"
|
|
252841
252876
|
{
|
|
252842
252877
|
(yyval.node) = makeColumnRef((yyvsp[(1) - (1)].str), NIL, (yylsp[(1) - (1)]), yyscanner);
|
|
252843
252878
|
;}
|
|
252844
252879
|
break;
|
|
252845
252880
|
|
|
252846
252881
|
case 1009:
|
|
252847
|
-
#line
|
|
252882
|
+
#line 3161 "third_party/libpg_query/grammar/statements/select.y"
|
|
252848
252883
|
{
|
|
252849
252884
|
(yyval.node) = makeColumnRef((yyvsp[(1) - (2)].str), (yyvsp[(2) - (2)].list), (yylsp[(1) - (2)]), yyscanner);
|
|
252850
252885
|
;}
|
|
252851
252886
|
break;
|
|
252852
252887
|
|
|
252853
252888
|
case 1010:
|
|
252854
|
-
#line
|
|
252889
|
+
#line 3168 "third_party/libpg_query/grammar/statements/select.y"
|
|
252855
252890
|
{
|
|
252856
252891
|
(yyval.node) = (PGNode *) makeString((yyvsp[(2) - (2)].str));
|
|
252857
252892
|
;}
|
|
252858
252893
|
break;
|
|
252859
252894
|
|
|
252860
252895
|
case 1011:
|
|
252861
|
-
#line
|
|
252896
|
+
#line 3172 "third_party/libpg_query/grammar/statements/select.y"
|
|
252862
252897
|
{
|
|
252863
252898
|
PGAIndices *ai = makeNode(PGAIndices);
|
|
252864
252899
|
ai->is_slice = false;
|
|
@@ -252869,7 +252904,7 @@ yyreduce:
|
|
|
252869
252904
|
break;
|
|
252870
252905
|
|
|
252871
252906
|
case 1012:
|
|
252872
|
-
#line
|
|
252907
|
+
#line 3180 "third_party/libpg_query/grammar/statements/select.y"
|
|
252873
252908
|
{
|
|
252874
252909
|
PGAIndices *ai = makeNode(PGAIndices);
|
|
252875
252910
|
ai->is_slice = true;
|
|
@@ -252880,57 +252915,57 @@ yyreduce:
|
|
|
252880
252915
|
break;
|
|
252881
252916
|
|
|
252882
252917
|
case 1013:
|
|
252883
|
-
#line
|
|
252918
|
+
#line 3190 "third_party/libpg_query/grammar/statements/select.y"
|
|
252884
252919
|
{ (yyval.node) = (yyvsp[(1) - (1)].node); ;}
|
|
252885
252920
|
break;
|
|
252886
252921
|
|
|
252887
252922
|
case 1014:
|
|
252888
|
-
#line
|
|
252923
|
+
#line 3191 "third_party/libpg_query/grammar/statements/select.y"
|
|
252889
252924
|
{ (yyval.node) = NULL; ;}
|
|
252890
252925
|
break;
|
|
252891
252926
|
|
|
252892
252927
|
case 1015:
|
|
252893
|
-
#line
|
|
252928
|
+
#line 3195 "third_party/libpg_query/grammar/statements/select.y"
|
|
252894
252929
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].node)); ;}
|
|
252895
252930
|
break;
|
|
252896
252931
|
|
|
252897
252932
|
case 1016:
|
|
252898
|
-
#line
|
|
252933
|
+
#line 3196 "third_party/libpg_query/grammar/statements/select.y"
|
|
252899
252934
|
{ (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); ;}
|
|
252900
252935
|
break;
|
|
252901
252936
|
|
|
252902
252937
|
case 1017:
|
|
252903
|
-
#line
|
|
252938
|
+
#line 3200 "third_party/libpg_query/grammar/statements/select.y"
|
|
252904
252939
|
{ (yyval.list) = NIL; ;}
|
|
252905
252940
|
break;
|
|
252906
252941
|
|
|
252907
252942
|
case 1018:
|
|
252908
|
-
#line
|
|
252943
|
+
#line 3201 "third_party/libpg_query/grammar/statements/select.y"
|
|
252909
252944
|
{ (yyval.list) = lappend((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].node)); ;}
|
|
252910
252945
|
break;
|
|
252911
252946
|
|
|
252912
252947
|
case 1021:
|
|
252913
|
-
#line
|
|
252948
|
+
#line 3215 "third_party/libpg_query/grammar/statements/select.y"
|
|
252914
252949
|
{ (yyval.list) = (yyvsp[(1) - (1)].list); ;}
|
|
252915
252950
|
break;
|
|
252916
252951
|
|
|
252917
252952
|
case 1022:
|
|
252918
|
-
#line
|
|
252953
|
+
#line 3216 "third_party/libpg_query/grammar/statements/select.y"
|
|
252919
252954
|
{ (yyval.list) = NIL; ;}
|
|
252920
252955
|
break;
|
|
252921
252956
|
|
|
252922
252957
|
case 1023:
|
|
252923
|
-
#line
|
|
252958
|
+
#line 3220 "third_party/libpg_query/grammar/statements/select.y"
|
|
252924
252959
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].target)); ;}
|
|
252925
252960
|
break;
|
|
252926
252961
|
|
|
252927
252962
|
case 1024:
|
|
252928
|
-
#line
|
|
252963
|
+
#line 3221 "third_party/libpg_query/grammar/statements/select.y"
|
|
252929
252964
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].target)); ;}
|
|
252930
252965
|
break;
|
|
252931
252966
|
|
|
252932
252967
|
case 1025:
|
|
252933
|
-
#line
|
|
252968
|
+
#line 3225 "third_party/libpg_query/grammar/statements/select.y"
|
|
252934
252969
|
{
|
|
252935
252970
|
(yyval.target) = makeNode(PGResTarget);
|
|
252936
252971
|
(yyval.target)->name = (yyvsp[(3) - (3)].str);
|
|
@@ -252941,7 +252976,7 @@ yyreduce:
|
|
|
252941
252976
|
break;
|
|
252942
252977
|
|
|
252943
252978
|
case 1026:
|
|
252944
|
-
#line
|
|
252979
|
+
#line 3241 "third_party/libpg_query/grammar/statements/select.y"
|
|
252945
252980
|
{
|
|
252946
252981
|
(yyval.target) = makeNode(PGResTarget);
|
|
252947
252982
|
(yyval.target)->name = (yyvsp[(2) - (2)].str);
|
|
@@ -252952,7 +252987,7 @@ yyreduce:
|
|
|
252952
252987
|
break;
|
|
252953
252988
|
|
|
252954
252989
|
case 1027:
|
|
252955
|
-
#line
|
|
252990
|
+
#line 3249 "third_party/libpg_query/grammar/statements/select.y"
|
|
252956
252991
|
{
|
|
252957
252992
|
(yyval.target) = makeNode(PGResTarget);
|
|
252958
252993
|
(yyval.target)->name = NULL;
|
|
@@ -252963,7 +252998,7 @@ yyreduce:
|
|
|
252963
252998
|
break;
|
|
252964
252999
|
|
|
252965
253000
|
case 1028:
|
|
252966
|
-
#line
|
|
253001
|
+
#line 3257 "third_party/libpg_query/grammar/statements/select.y"
|
|
252967
253002
|
{
|
|
252968
253003
|
PGColumnRef *n = makeNode(PGColumnRef);
|
|
252969
253004
|
PGAStar *star = makeNode(PGAStar);
|
|
@@ -252981,7 +253016,7 @@ yyreduce:
|
|
|
252981
253016
|
break;
|
|
252982
253017
|
|
|
252983
253018
|
case 1029:
|
|
252984
|
-
#line
|
|
253019
|
+
#line 3272 "third_party/libpg_query/grammar/statements/select.y"
|
|
252985
253020
|
{
|
|
252986
253021
|
PGColumnRef *n = makeNode(PGColumnRef);
|
|
252987
253022
|
PGAStar *star = makeNode(PGAStar);
|
|
@@ -253000,74 +253035,74 @@ yyreduce:
|
|
|
253000
253035
|
break;
|
|
253001
253036
|
|
|
253002
253037
|
case 1030:
|
|
253003
|
-
#line
|
|
253038
|
+
#line 3289 "third_party/libpg_query/grammar/statements/select.y"
|
|
253004
253039
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
253005
253040
|
break;
|
|
253006
253041
|
|
|
253007
253042
|
case 1031:
|
|
253008
|
-
#line
|
|
253043
|
+
#line 3290 "third_party/libpg_query/grammar/statements/select.y"
|
|
253009
253044
|
{ (yyval.list) = list_make1(makeString((yyvsp[(2) - (2)].str))); ;}
|
|
253010
253045
|
break;
|
|
253011
253046
|
|
|
253012
253047
|
case 1032:
|
|
253013
|
-
#line
|
|
253048
|
+
#line 3293 "third_party/libpg_query/grammar/statements/select.y"
|
|
253014
253049
|
{ (yyval.list) = (yyvsp[(1) - (1)].list); ;}
|
|
253015
253050
|
break;
|
|
253016
253051
|
|
|
253017
253052
|
case 1033:
|
|
253018
|
-
#line
|
|
253053
|
+
#line 3294 "third_party/libpg_query/grammar/statements/select.y"
|
|
253019
253054
|
{ (yyval.list) = NULL; ;}
|
|
253020
253055
|
break;
|
|
253021
253056
|
|
|
253022
253057
|
case 1034:
|
|
253023
|
-
#line
|
|
253058
|
+
#line 3297 "third_party/libpg_query/grammar/statements/select.y"
|
|
253024
253059
|
{ (yyval.list) = list_make2((yyvsp[(1) - (3)].node), makeString((yyvsp[(3) - (3)].str))); ;}
|
|
253025
253060
|
break;
|
|
253026
253061
|
|
|
253027
253062
|
case 1035:
|
|
253028
|
-
#line
|
|
253063
|
+
#line 3301 "third_party/libpg_query/grammar/statements/select.y"
|
|
253029
253064
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].list)); ;}
|
|
253030
253065
|
break;
|
|
253031
253066
|
|
|
253032
253067
|
case 1036:
|
|
253033
|
-
#line
|
|
253068
|
+
#line 3302 "third_party/libpg_query/grammar/statements/select.y"
|
|
253034
253069
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].list)); ;}
|
|
253035
253070
|
break;
|
|
253036
253071
|
|
|
253037
253072
|
case 1037:
|
|
253038
|
-
#line
|
|
253073
|
+
#line 3305 "third_party/libpg_query/grammar/statements/select.y"
|
|
253039
253074
|
{ (yyval.list) = (yyvsp[(3) - (4)].list); ;}
|
|
253040
253075
|
break;
|
|
253041
253076
|
|
|
253042
253077
|
case 1038:
|
|
253043
|
-
#line
|
|
253078
|
+
#line 3306 "third_party/libpg_query/grammar/statements/select.y"
|
|
253044
253079
|
{ (yyval.list) = list_make1((yyvsp[(2) - (2)].list)); ;}
|
|
253045
253080
|
break;
|
|
253046
253081
|
|
|
253047
253082
|
case 1039:
|
|
253048
|
-
#line
|
|
253083
|
+
#line 3307 "third_party/libpg_query/grammar/statements/select.y"
|
|
253049
253084
|
{ (yyval.list) = NULL; ;}
|
|
253050
253085
|
break;
|
|
253051
253086
|
|
|
253052
253087
|
case 1040:
|
|
253053
|
-
#line
|
|
253088
|
+
#line 3317 "third_party/libpg_query/grammar/statements/select.y"
|
|
253054
253089
|
{ (yyval.list) = list_make1((yyvsp[(1) - (1)].range)); ;}
|
|
253055
253090
|
break;
|
|
253056
253091
|
|
|
253057
253092
|
case 1041:
|
|
253058
|
-
#line
|
|
253093
|
+
#line 3318 "third_party/libpg_query/grammar/statements/select.y"
|
|
253059
253094
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].range)); ;}
|
|
253060
253095
|
break;
|
|
253061
253096
|
|
|
253062
253097
|
case 1042:
|
|
253063
|
-
#line
|
|
253098
|
+
#line 3330 "third_party/libpg_query/grammar/statements/select.y"
|
|
253064
253099
|
{
|
|
253065
253100
|
(yyval.range) = makeRangeVar(NULL, (yyvsp[(1) - (1)].str), (yylsp[(1) - (1)]));
|
|
253066
253101
|
;}
|
|
253067
253102
|
break;
|
|
253068
253103
|
|
|
253069
253104
|
case 1043:
|
|
253070
|
-
#line
|
|
253105
|
+
#line 3334 "third_party/libpg_query/grammar/statements/select.y"
|
|
253071
253106
|
{
|
|
253072
253107
|
check_qualified_name((yyvsp[(2) - (2)].list), yyscanner);
|
|
253073
253108
|
(yyval.range) = makeRangeVar(NULL, NULL, (yylsp[(1) - (2)]));
|
|
@@ -253095,32 +253130,32 @@ yyreduce:
|
|
|
253095
253130
|
break;
|
|
253096
253131
|
|
|
253097
253132
|
case 1044:
|
|
253098
|
-
#line
|
|
253133
|
+
#line 3361 "third_party/libpg_query/grammar/statements/select.y"
|
|
253099
253134
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
253100
253135
|
break;
|
|
253101
253136
|
|
|
253102
253137
|
case 1045:
|
|
253103
|
-
#line
|
|
253138
|
+
#line 3363 "third_party/libpg_query/grammar/statements/select.y"
|
|
253104
253139
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); ;}
|
|
253105
253140
|
break;
|
|
253106
253141
|
|
|
253107
253142
|
case 1046:
|
|
253108
|
-
#line
|
|
253143
|
+
#line 3367 "third_party/libpg_query/grammar/statements/select.y"
|
|
253109
253144
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253110
253145
|
break;
|
|
253111
253146
|
|
|
253112
253147
|
case 1047:
|
|
253113
|
-
#line
|
|
253148
|
+
#line 3369 "third_party/libpg_query/grammar/statements/select.y"
|
|
253114
253149
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253115
253150
|
break;
|
|
253116
253151
|
|
|
253117
253152
|
case 1048:
|
|
253118
|
-
#line
|
|
253153
|
+
#line 3380 "third_party/libpg_query/grammar/statements/select.y"
|
|
253119
253154
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
253120
253155
|
break;
|
|
253121
253156
|
|
|
253122
253157
|
case 1049:
|
|
253123
|
-
#line
|
|
253158
|
+
#line 3383 "third_party/libpg_query/grammar/statements/select.y"
|
|
253124
253159
|
{
|
|
253125
253160
|
(yyval.list) = check_func_name(lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)),
|
|
253126
253161
|
yyscanner);
|
|
@@ -253128,21 +253163,21 @@ yyreduce:
|
|
|
253128
253163
|
break;
|
|
253129
253164
|
|
|
253130
253165
|
case 1050:
|
|
253131
|
-
#line
|
|
253166
|
+
#line 3394 "third_party/libpg_query/grammar/statements/select.y"
|
|
253132
253167
|
{
|
|
253133
253168
|
(yyval.node) = makeIntConst((yyvsp[(1) - (1)].ival), (yylsp[(1) - (1)]));
|
|
253134
253169
|
;}
|
|
253135
253170
|
break;
|
|
253136
253171
|
|
|
253137
253172
|
case 1051:
|
|
253138
|
-
#line
|
|
253173
|
+
#line 3398 "third_party/libpg_query/grammar/statements/select.y"
|
|
253139
253174
|
{
|
|
253140
253175
|
(yyval.node) = makeFloatConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)]));
|
|
253141
253176
|
;}
|
|
253142
253177
|
break;
|
|
253143
253178
|
|
|
253144
253179
|
case 1052:
|
|
253145
|
-
#line
|
|
253180
|
+
#line 3402 "third_party/libpg_query/grammar/statements/select.y"
|
|
253146
253181
|
{
|
|
253147
253182
|
if ((yyvsp[(2) - (2)].list))
|
|
253148
253183
|
{
|
|
@@ -253157,14 +253192,14 @@ yyreduce:
|
|
|
253157
253192
|
break;
|
|
253158
253193
|
|
|
253159
253194
|
case 1053:
|
|
253160
|
-
#line
|
|
253195
|
+
#line 3414 "third_party/libpg_query/grammar/statements/select.y"
|
|
253161
253196
|
{
|
|
253162
253197
|
(yyval.node) = makeBitStringConst((yyvsp[(1) - (1)].str), (yylsp[(1) - (1)]));
|
|
253163
253198
|
;}
|
|
253164
253199
|
break;
|
|
253165
253200
|
|
|
253166
253201
|
case 1054:
|
|
253167
|
-
#line
|
|
253202
|
+
#line 3418 "third_party/libpg_query/grammar/statements/select.y"
|
|
253168
253203
|
{
|
|
253169
253204
|
/* This is a bit constant per SQL99:
|
|
253170
253205
|
* Without Feature F511, "BIT data type",
|
|
@@ -253176,7 +253211,7 @@ yyreduce:
|
|
|
253176
253211
|
break;
|
|
253177
253212
|
|
|
253178
253213
|
case 1055:
|
|
253179
|
-
#line
|
|
253214
|
+
#line 3427 "third_party/libpg_query/grammar/statements/select.y"
|
|
253180
253215
|
{
|
|
253181
253216
|
/* generic type 'literal' syntax */
|
|
253182
253217
|
PGTypeName *t = makeTypeNameFromNameList((yyvsp[(1) - (2)].list));
|
|
@@ -253186,7 +253221,7 @@ yyreduce:
|
|
|
253186
253221
|
break;
|
|
253187
253222
|
|
|
253188
253223
|
case 1056:
|
|
253189
|
-
#line
|
|
253224
|
+
#line 3434 "third_party/libpg_query/grammar/statements/select.y"
|
|
253190
253225
|
{
|
|
253191
253226
|
/* generic syntax with a type modifier */
|
|
253192
253227
|
PGTypeName *t = makeTypeNameFromNameList((yyvsp[(1) - (7)].list));
|
|
@@ -253227,191 +253262,191 @@ yyreduce:
|
|
|
253227
253262
|
break;
|
|
253228
253263
|
|
|
253229
253264
|
case 1057:
|
|
253230
|
-
#line
|
|
253265
|
+
#line 3472 "third_party/libpg_query/grammar/statements/select.y"
|
|
253231
253266
|
{
|
|
253232
253267
|
(yyval.node) = makeStringConstCast((yyvsp[(2) - (2)].str), (yylsp[(2) - (2)]), (yyvsp[(1) - (2)].typnam));
|
|
253233
253268
|
;}
|
|
253234
253269
|
break;
|
|
253235
253270
|
|
|
253236
253271
|
case 1058:
|
|
253237
|
-
#line
|
|
253272
|
+
#line 3476 "third_party/libpg_query/grammar/statements/select.y"
|
|
253238
253273
|
{
|
|
253239
253274
|
(yyval.node) = makeIntervalNode((yyvsp[(3) - (5)].node), (yylsp[(3) - (5)]), (yyvsp[(5) - (5)].list));
|
|
253240
253275
|
;}
|
|
253241
253276
|
break;
|
|
253242
253277
|
|
|
253243
253278
|
case 1059:
|
|
253244
|
-
#line
|
|
253279
|
+
#line 3480 "third_party/libpg_query/grammar/statements/select.y"
|
|
253245
253280
|
{
|
|
253246
253281
|
(yyval.node) = makeIntervalNode((yyvsp[(2) - (3)].ival), (yylsp[(2) - (3)]), (yyvsp[(3) - (3)].list));
|
|
253247
253282
|
;}
|
|
253248
253283
|
break;
|
|
253249
253284
|
|
|
253250
253285
|
case 1060:
|
|
253251
|
-
#line
|
|
253286
|
+
#line 3484 "third_party/libpg_query/grammar/statements/select.y"
|
|
253252
253287
|
{
|
|
253253
253288
|
(yyval.node) = makeIntervalNode((yyvsp[(2) - (3)].str), (yylsp[(2) - (3)]), (yyvsp[(3) - (3)].list));
|
|
253254
253289
|
;}
|
|
253255
253290
|
break;
|
|
253256
253291
|
|
|
253257
253292
|
case 1061:
|
|
253258
|
-
#line
|
|
253293
|
+
#line 3488 "third_party/libpg_query/grammar/statements/select.y"
|
|
253259
253294
|
{
|
|
253260
253295
|
(yyval.node) = makeBoolAConst(true, (yylsp[(1) - (1)]));
|
|
253261
253296
|
;}
|
|
253262
253297
|
break;
|
|
253263
253298
|
|
|
253264
253299
|
case 1062:
|
|
253265
|
-
#line
|
|
253300
|
+
#line 3492 "third_party/libpg_query/grammar/statements/select.y"
|
|
253266
253301
|
{
|
|
253267
253302
|
(yyval.node) = makeBoolAConst(false, (yylsp[(1) - (1)]));
|
|
253268
253303
|
;}
|
|
253269
253304
|
break;
|
|
253270
253305
|
|
|
253271
253306
|
case 1063:
|
|
253272
|
-
#line
|
|
253307
|
+
#line 3496 "third_party/libpg_query/grammar/statements/select.y"
|
|
253273
253308
|
{
|
|
253274
253309
|
(yyval.node) = makeNullAConst((yylsp[(1) - (1)]));
|
|
253275
253310
|
;}
|
|
253276
253311
|
break;
|
|
253277
253312
|
|
|
253278
253313
|
case 1064:
|
|
253279
|
-
#line
|
|
253314
|
+
#line 3501 "third_party/libpg_query/grammar/statements/select.y"
|
|
253280
253315
|
{ (yyval.ival) = (yyvsp[(1) - (1)].ival); ;}
|
|
253281
253316
|
break;
|
|
253282
253317
|
|
|
253283
253318
|
case 1065:
|
|
253284
|
-
#line
|
|
253319
|
+
#line 3502 "third_party/libpg_query/grammar/statements/select.y"
|
|
253285
253320
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253286
253321
|
break;
|
|
253287
253322
|
|
|
253288
253323
|
case 1066:
|
|
253289
|
-
#line
|
|
253324
|
+
#line 3518 "third_party/libpg_query/grammar/statements/select.y"
|
|
253290
253325
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253291
253326
|
break;
|
|
253292
253327
|
|
|
253293
253328
|
case 1067:
|
|
253294
|
-
#line
|
|
253329
|
+
#line 3519 "third_party/libpg_query/grammar/statements/select.y"
|
|
253295
253330
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253296
253331
|
break;
|
|
253297
253332
|
|
|
253298
253333
|
case 1068:
|
|
253299
|
-
#line
|
|
253334
|
+
#line 3520 "third_party/libpg_query/grammar/statements/select.y"
|
|
253300
253335
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253301
253336
|
break;
|
|
253302
253337
|
|
|
253303
253338
|
case 1069:
|
|
253304
|
-
#line
|
|
253339
|
+
#line 3523 "third_party/libpg_query/grammar/statements/select.y"
|
|
253305
253340
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253306
253341
|
break;
|
|
253307
253342
|
|
|
253308
253343
|
case 1070:
|
|
253309
|
-
#line
|
|
253344
|
+
#line 3524 "third_party/libpg_query/grammar/statements/select.y"
|
|
253310
253345
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253311
253346
|
break;
|
|
253312
253347
|
|
|
253313
253348
|
case 1071:
|
|
253314
|
-
#line
|
|
253349
|
+
#line 3530 "third_party/libpg_query/grammar/statements/select.y"
|
|
253315
253350
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253316
253351
|
break;
|
|
253317
253352
|
|
|
253318
253353
|
case 1072:
|
|
253319
|
-
#line
|
|
253354
|
+
#line 3531 "third_party/libpg_query/grammar/statements/select.y"
|
|
253320
253355
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253321
253356
|
break;
|
|
253322
253357
|
|
|
253323
253358
|
case 1073:
|
|
253324
|
-
#line
|
|
253359
|
+
#line 3532 "third_party/libpg_query/grammar/statements/select.y"
|
|
253325
253360
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253326
253361
|
break;
|
|
253327
253362
|
|
|
253328
253363
|
case 1074:
|
|
253329
|
-
#line
|
|
253364
|
+
#line 3535 "third_party/libpg_query/grammar/statements/select.y"
|
|
253330
253365
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253331
253366
|
break;
|
|
253332
253367
|
|
|
253333
253368
|
case 1075:
|
|
253334
|
-
#line
|
|
253369
|
+
#line 3536 "third_party/libpg_query/grammar/statements/select.y"
|
|
253335
253370
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253336
253371
|
break;
|
|
253337
253372
|
|
|
253338
253373
|
case 1076:
|
|
253339
|
-
#line
|
|
253374
|
+
#line 3537 "third_party/libpg_query/grammar/statements/select.y"
|
|
253340
253375
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253341
253376
|
break;
|
|
253342
253377
|
|
|
253343
253378
|
case 1077:
|
|
253344
|
-
#line
|
|
253379
|
+
#line 3540 "third_party/libpg_query/grammar/statements/select.y"
|
|
253345
253380
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253346
253381
|
break;
|
|
253347
253382
|
|
|
253348
253383
|
case 1078:
|
|
253349
|
-
#line
|
|
253384
|
+
#line 3541 "third_party/libpg_query/grammar/statements/select.y"
|
|
253350
253385
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253351
253386
|
break;
|
|
253352
253387
|
|
|
253353
253388
|
case 1079:
|
|
253354
|
-
#line
|
|
253389
|
+
#line 3542 "third_party/libpg_query/grammar/statements/select.y"
|
|
253355
253390
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253356
253391
|
break;
|
|
253357
253392
|
|
|
253358
253393
|
case 1080:
|
|
253359
|
-
#line
|
|
253394
|
+
#line 3545 "third_party/libpg_query/grammar/statements/select.y"
|
|
253360
253395
|
{ (yyval.list) = list_make1(makeString((yyvsp[(1) - (1)].str))); ;}
|
|
253361
253396
|
break;
|
|
253362
253397
|
|
|
253363
253398
|
case 1081:
|
|
253364
|
-
#line
|
|
253399
|
+
#line 3546 "third_party/libpg_query/grammar/statements/select.y"
|
|
253365
253400
|
{ (yyval.list) = lcons(makeString((yyvsp[(1) - (2)].str)), (yyvsp[(2) - (2)].list)); ;}
|
|
253366
253401
|
break;
|
|
253367
253402
|
|
|
253368
253403
|
case 1082:
|
|
253369
|
-
#line
|
|
253404
|
+
#line 3550 "third_party/libpg_query/grammar/statements/select.y"
|
|
253370
253405
|
{ (yyval.list) = list_make1(makeString((yyvsp[(2) - (2)].str))); ;}
|
|
253371
253406
|
break;
|
|
253372
253407
|
|
|
253373
253408
|
case 1083:
|
|
253374
|
-
#line
|
|
253409
|
+
#line 3552 "third_party/libpg_query/grammar/statements/select.y"
|
|
253375
253410
|
{ (yyval.list) = lappend((yyvsp[(1) - (3)].list), makeString((yyvsp[(3) - (3)].str))); ;}
|
|
253376
253411
|
break;
|
|
253377
253412
|
|
|
253378
253413
|
case 1084:
|
|
253379
|
-
#line
|
|
253414
|
+
#line 3556 "third_party/libpg_query/grammar/statements/select.y"
|
|
253380
253415
|
{ (yyval.list) = (yyvsp[(2) - (3)].list); ;}
|
|
253381
253416
|
break;
|
|
253382
253417
|
|
|
253383
253418
|
case 1085:
|
|
253384
|
-
#line
|
|
253419
|
+
#line 3557 "third_party/libpg_query/grammar/statements/select.y"
|
|
253385
253420
|
{ (yyval.list) = NIL; ;}
|
|
253386
253421
|
break;
|
|
253387
253422
|
|
|
253388
253423
|
case 1087:
|
|
253389
|
-
#line
|
|
253424
|
+
#line 3568 "third_party/libpg_query/grammar/statements/select.y"
|
|
253390
253425
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253391
253426
|
break;
|
|
253392
253427
|
|
|
253393
253428
|
case 1088:
|
|
253394
|
-
#line
|
|
253429
|
+
#line 3569 "third_party/libpg_query/grammar/statements/select.y"
|
|
253395
253430
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253396
253431
|
break;
|
|
253397
253432
|
|
|
253398
253433
|
case 1089:
|
|
253399
|
-
#line
|
|
253434
|
+
#line 3570 "third_party/libpg_query/grammar/statements/select.y"
|
|
253400
253435
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253401
253436
|
break;
|
|
253402
253437
|
|
|
253403
253438
|
case 1090:
|
|
253404
|
-
#line
|
|
253439
|
+
#line 3571 "third_party/libpg_query/grammar/statements/select.y"
|
|
253405
253440
|
{ (yyval.str) = pstrdup((yyvsp[(1) - (1)].keyword)); ;}
|
|
253406
253441
|
break;
|
|
253407
253442
|
|
|
253408
253443
|
case 1091:
|
|
253409
|
-
#line
|
|
253444
|
+
#line 3574 "third_party/libpg_query/grammar/statements/select.y"
|
|
253410
253445
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253411
253446
|
break;
|
|
253412
253447
|
|
|
253413
253448
|
case 1092:
|
|
253414
|
-
#line
|
|
253449
|
+
#line 3575 "third_party/libpg_query/grammar/statements/select.y"
|
|
253415
253450
|
{ (yyval.str) = (yyvsp[(1) - (1)].str); ;}
|
|
253416
253451
|
break;
|
|
253417
253452
|
|
|
@@ -254601,7 +254636,7 @@ yyreduce:
|
|
|
254601
254636
|
|
|
254602
254637
|
|
|
254603
254638
|
/* Line 1267 of yacc.c. */
|
|
254604
|
-
#line
|
|
254639
|
+
#line 24890 "third_party/libpg_query/grammar/grammar_out.cpp"
|
|
254605
254640
|
default: break;
|
|
254606
254641
|
}
|
|
254607
254642
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|