Tom Lane wrote:
>Anyone have an opinion on the portability of the regular expression
>functions defined in POSIX 1003.2,
>http://www.opengroup.org/onlinepubs/007908799/xsh/regcomp.html
>? In particular, do you know of any platforms we support that don't
>have them?
>
>The reason I'm asking is that to convert pg_regress into C code
>we need some regex functionality, and the easiest way to get that
>would be to assume that the C library has it ;-). In Magnus's
>draft patch he assumed that we could link src/backend/regex/*
>into pg_regress, but I think that's a really bad way to go.
>Even though that code is mostly independent of the rest of the
>backend at the moment, it seems highly unlikely that we'll keep
>it so forever --- regc_locale.c in particular needs to tie into
>whatever solution we wind up using for general locale support.
>
>Plan B would be to kluge up some quick-and-dirty code to handle
>just the small subset of regex syntax that we actually use in
>resultmap ...
>
>
>
Does Windows come with POSIX regex libs? I would be a bit surprised.
When we discussed this at the conference I suggested to Magnus that he
not use regexes. When I did initdb I originally looked at using a regex
library, and realised that we really wouldn't need them, and the tiny
replacement routines I wrote would be sufficient.
So I would be tempted to go for Plan B.
Plan C might be to assume that we have sed available, just as we are
assuming we have diff available.
BTW, we I am pretty sure we *do* need MAX_CONNECTIONS it really
shouldn't be too hard to implement.
cheers
andrew