Return value of FUNCTIONs can contain UNSIGNED keyword, which the regular expression based parser did not expect. Fixes issue #2177.

This commit is contained in:
Ansgar Becker
2010-09-16 19:24:20 +00:00
parent 0e556a4346
commit a40c10b4c4

View File

@@ -2526,7 +2526,7 @@ begin
rx.Expression := '\bLANGUAGE SQL\b';
if rx.Exec(CreateCode) then
Delete(CreateCode, rx.MatchPos[0], rx.MatchLen[0]);
rx.Expression := '\bRETURNS\s+(\w+(\([^\)]*\))?)';
rx.Expression := '\bRETURNS\s+(\w+(\([^\)]*\))?(\s+UNSIGNED)?)';
if rx.Exec(CreateCode) then begin
Returns := rx.Match[1];
Delete(CreateCode, rx.MatchPos[0], rx.MatchLen[0]);