Alright, thanks guys! I'll start testing it out, see what happens. --- =========================== Samuel Nelson Consistent State www.consistentstate.com 303-955-0509 ===========================
On Thu, Apr 14, 2011 at 7:23 PM, Greg Sabino Mullane <greg@turnstep.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160
> alter function pg_catalog.version() rename to version_old; > > create function pg_catalog.version() returns text > as $$select 'fake version goes here'::text$$ language sql;;
Alternatively, you could create a public version and create a user that sees that public version (or some other schema) before the pg_catalog one:
CREATE FUNCTION public.version() RETURNS text LANGUAGE SQL IMMUTABLE AS $$ SELECT 'PostgreSQL 8.4.22, but really PgPlus 8.4.22'::text$$;
ALTER USER odbc_fakeout SET search_path = public, pg_catalog;
Also note that a change to pg_catalog will *not* survive a pg_dump and restore.
Other approaches:
* Ask EDB if there is a version that doesn't mangle version()
* Recompile it yourself after fixing version()
* Make a custom version() as above that actually parses the real version() string, so as to return the correct version even after you upgrade.
* Patch the standard ODBC driver to grep for just numbers in the version string, if they haven't already.