|
1 | | -/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.226 2003/05/3008:39:01 meskes Exp $*/ |
| 1 | +/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.227 2003/05/3013: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>ECPGFreeECPGDeclareECPGVaropt_atenum_definition |
439 | 439 | %type<str>struct_union_types_struct_unionvt_declarations |
440 | 440 | %type<str>var_declarationtype_declarationsingle_vt_declaration |
441 | | -%type<str>ECPGSetAutocommiton_offvariable_declarations |
| 441 | +%type<str>ECPGSetAutocommiton_offvariable_declarationsECPGDescribe |
442 | 442 | %type<str>ECPGAllocateDescrECPGDeallocateDescrsymbolopt_output |
443 | 443 | %type<str>ECPGGetDescriptorHeaderECPGColLabelsingle_var_declaration |
444 | 444 | %type<str>reserved_keywordunreserved_keywordecpg_interval |
445 | 445 | %type<str>col_name_keywordfunc_name_keywordprecisionopt_scale |
446 | 446 | %type<str>ECPGTypeNamevariablelistECPGColLabelCommonc_variable |
447 | | -%type<str>inf_val_listinf_col_listusing_descriptorECPGDescribe |
448 | | -%type<str>into_descriptor |
| 447 | +%type<str>inf_val_listinf_col_listusing_descriptorinto_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_typesigned_typeunsigned_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_DESCRIBEINPUT_Pnameusing_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_DESCRIBEopt_outputnameusing_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_DESCRIBEopt_outputnameinto_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 |
|
|