Subject Re: [firebird-support] Reserved Words
Author Helen Borrie
At 11:55 AM 21/01/2004 +0000, you wrote:
>Helen Borrie wrote:
>
> >>OK I have a pile of documents, but I've not as yet found a
> >>definitive guide to the current list of 'reserved words'.
> >>
> >>In particular I am being told that 'OUTPUT' is a reserved
> >>word, it's not listed in "SQL Statement and Function
> >>Reference" and I can't find a copy of "ibp_reserved.html" at
> >>present.
>
>OK I've found my copy of "ibp_reserved.html"
>
> > Humm, it's a command in isql and it's been a reserved word as long as I
> can
> > recall. There's a list in the IB 6 LangRef and the updated lists for Fb
>
>Found it in the IB5.0 book now - it was not in the index!

Ah, yes, those IB manual indexes. They should be lined up on the walls of
the city and shot at dawn. But you should be able to find it under
"Keywords". I chucked my IB 5 manuals when I got the IB 5.5 media kit so I
can't check back on that.

> > 1.0 and Fb 1.5 are in the respective release notes. (Some from Fb 1.0
> were
> > "unreserved" in Fb 1.5, too).
>
>And I've marked "ibp_reserved.html" up with the latest notes
> and called it firebird_reserved :)
>Couple of questions -
>We are adding ABS, but the SQL92 list ABSOLUTE - are these
>the same?

I think almost certainly not. I think ABS is there (as a future possible
reserved word) because Claudio planned to implement the numeric function
ABS() internally at some point. SQL-92 ABSOLUTE does something totally
different and has to do with scrollable cursors (the keyword RELATIVE is
its bedfellow).

>The non-reserved keywords could be used as field names, but
>its probably better treating them as reserved?

That was the idea of the "reserved for future use" ones but actually
several reserved keywords got "de-reserved" in 1.5 as a matter of policy to
reduce the number of gotcha-words. The problem is, you can't really guess
at this point which ones will be reserved and which not. My advice would
be at least to keep clear of the "earmarked" SQL-92 and SQL-92 keywords.


> >>I probably need to stop using it as a field name, but can
> >>someone confirm that please :)
> >
> > Yep. Or you could decorate it with double-quotes. :-))
>
>Haven't had to yet, but it is funny, this particular
>database has been around for 5 years+, so I presume it's a
>dialect 1 thing that is only now biting?

More likely an "ODS thing".

/heLen