|
1 |
| -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.226 2003/05/30 08:39:01 meskes Exp $ */ |
| 1 | +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.227 2003/05/30 13:22:02 meskes Exp $ */ |
2 | 2 |
|
3 | 3 | /* Copyright comment */
|
4 | 4 | %{
|
@@ -438,18 +438,17 @@ create_questionmarks(char *name, bool array)
|
438 | 438 | %type <str> ECPGFree ECPGDeclare ECPGVar opt_at enum_definition
|
439 | 439 | %type <str> struct_union_type s_struct_union vt_declarations
|
440 | 440 | %type <str> var_declaration type_declaration single_vt_declaration
|
441 |
| -%type <str> ECPGSetAutocommit on_off variable_declarations |
| 441 | +%type <str> ECPGSetAutocommit on_off variable_declarations ECPGDescribe |
442 | 442 | %type <str> ECPGAllocateDescr ECPGDeallocateDescr symbol opt_output
|
443 | 443 | %type <str> ECPGGetDescriptorHeader ECPGColLabel single_var_declaration
|
444 | 444 | %type <str> reserved_keyword unreserved_keyword ecpg_interval
|
445 | 445 | %type <str> col_name_keyword func_name_keyword precision opt_scale
|
446 | 446 | %type <str> ECPGTypeName variablelist ECPGColLabelCommon c_variable
|
447 |
| -%type <str> inf_val_list inf_col_list using_descriptor ECPGDescribe |
448 |
| -%type <str> into_descriptor |
| 447 | +%type <str> inf_val_list inf_col_list using_descriptor into_descriptor |
449 | 448 |
|
450 | 449 | %type <struct_union> s_struct_union_symbol
|
451 | 450 |
|
452 |
| -%type <descriptor> ECPGGetDescriptor |
| 451 | +%type <descriptor> ECPGGetDescriptor |
453 | 452 |
|
454 | 453 | %type <type_enum> simple_type signed_type unsigned_type
|
455 | 454 |
|
@@ -617,10 +616,12 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
|
617 | 616 | }
|
618 | 617 | | ECPGDescribe
|
619 | 618 | {
|
620 |
| - if (connection) |
621 |
| - mmerror(PARSE_ERROR, ET_ERROR, "no at option for describe statement.\n"); |
622 |
| - |
623 |
| - fprintf(yyout, "{ /* ECPGdescribe(__LINE__, %s) */;", $1); |
| 619 | + fprintf(yyout, "{ ECPGdescribe(__LINE__, %s,", $1); |
| 620 | + dump_variables(argsresult, 1); |
| 621 | + fputs("ECPGt_EORT);", yyout); |
| 622 | + fprintf(yyout, "}"); |
| 623 | + output_line_number(); |
| 624 | + |
624 | 625 | /* whenever_action(2); */
|
625 | 626 | free($1);
|
626 | 627 | }
|
@@ -5186,18 +5187,18 @@ ECPGPrepare: PREPARE name FROM execstring
|
5186 | 5187 | */
|
5187 | 5188 | ECPGDescribe: SQL_DESCRIBE INPUT_P name using_descriptor
|
5188 | 5189 | {
|
5189 |
| - mmerror(PARSE_ERROR, ET_ERROR, "using unsupported describe statement.\n"); |
5190 |
| - $$ = cat_str(3, make_str("input"), $3, $4); |
| 5190 | + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); |
| 5191 | + $$ = cat_str(3, make_str("1, ECPGprepared_statement(\""), $3, make_str("\")")); |
5191 | 5192 | }
|
5192 | 5193 | | SQL_DESCRIBE opt_output name using_descriptor
|
5193 | 5194 | {
|
5194 |
| - mmerror(PARSE_ERROR, ET_ERROR, "using unsupported describe statement.\n"); |
5195 |
| - $$ = cat_str(3, $2, $3, $4); |
| 5195 | + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); |
| 5196 | + $$ = cat_str(3, make_str("0, ECPGprepared_statement(\""), $3, make_str("\")")); |
5196 | 5197 | }
|
5197 | 5198 | | SQL_DESCRIBE opt_output name into_descriptor
|
5198 | 5199 | {
|
5199 |
| - mmerror(PARSE_ERROR, ET_ERROR, "using unsupported describe statement.\n"); |
5200 |
| - $$ = cat_str(3, $2, $3, $4); |
| 5200 | + mmerror(PARSE_ERROR, ET_WARNING, "using unsupported describe statement.\n"); |
| 5201 | + $$ = cat_str(3, make_str("0, ECPGprepared_statement(\""), $3, make_str("\")")); |
5201 | 5202 | }
|
5202 | 5203 | ;
|
5203 | 5204 |
|
|
0 commit comments