I wrote:
> I'm less clear on a reasonable way to detect a glibc platform
> from SQL. The best I can think of is to see if the string
> "linux" appears in the output of version(), and that's probably
> none too robust. Can we do anything based on the content of
> pg_collation? Probably not :-(.
Actually, scraping the buildfarm database suggests that checking
version() for "linux" or even "linux-gnu" would work very well.
regards, tom lane