Re: ESQL/C, Informix 7.3 - undocumented reserved word "ref"?
Posted in 1998
On 9 Jul 1998, William Harris wrote: > I'm trying to compile a program under Informix 7.3 that compiles okay under > Informix 7.14, and I am apparently having a problem with a particular column > name. The relevant parts of the statement are as follows: > > $select ref, jrnl_no, pst_date, pst_tn > into $vch_rec.ref, $vch_rec.jrnl_no, $vch_rec.pst_date, $vch_rec.pst_tm > from vch_rec > where vch_rec.ref = $vch_ref and vch_rec.jrnl_no = $vch_no; > > This statement gives the error: > > Error -33051: Syntax error on identifier or symbol ','. > > Changing the column name from "ref" to "blah" causes the ESQL/C error to go > away. Prefacing it with the table name (eg, vch_rec.ref) causes the error > to go away. It would seem, then, that the ESQL/C preprocessor is having some > problem with the column name "ref". I don't see anything in $INFORMIXDIR/incl > that might be causing ref to be redefined. I think that REF is keyword in Illustra databases, and it has presumably been added to the 7.30 syntax somehow, even though I cannot locate any references to REF types in the 9.1 docs (ESQL/C, Guide to SQL: Reference, Guide to SQL: Syntax). I'd use the table.ref (or alias.ref) notation to avoid the problem. Maybe you shoudl report this to the doc@informix.com alias? > I've looked at the Informix 7.3 Guide to SQL: Syntax, and while there are a > couple of words beginning with "ref" on the reserved words list, "ref" itself > isn't there. I've looked at the ESQL/C manual and haven't seen anything that > appears applicable. > > I can live with recoding the application if I have to, but I'd at least like > to hang the blame on a bug report or some rational explanation rather than > just a flat "that doesn't work; change it to this." > ----- > William Harris william@carsinfo.com > > Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix -- see http://www.perl.com/CPAN