Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id DBED41337BD5 for ; Thu, 14 Apr 2011 22:23:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 76255-05 for ; Fri, 15 Apr 2011 01:23:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zql.com (zql.com [206.222.31.58]) by mail.postgresql.org (Postfix) with ESMTP id 35D471337BD7 for ; Thu, 14 Apr 2011 22:23:01 -0300 (ADT) Received: from localhost ([127.0.0.1]) by zql.com with smtp (Exim 4.68) (envelope-from ) id 1QAXkT-00007B-V8; Thu, 14 Apr 2011 21:23:02 -0400 From: "Greg Sabino Mullane" To: pgsql-admin@postgresql.org Cc: samn@consistentstate.com CC: samn@consistentstate.com Subject: Re: Version String X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <87y63cs9h6.fsf@comcast.net> Date: Fri, 15 Apr 2011 01:23:01 -0000 X-Mailer: JoyMail 2.4.0 Message-ID: <66dd44a2633314f04275526e3ed8228a@biglumber.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/146 X-Sequence-Number: 37327 -----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. - -- Greg Sabino Mullane greg@endpoint.com greg@turnstep.com End Point Corporation 610-983-9073 PGP Key: 0x14964AC8 201104142113 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAk2nncYACgkQvJuQZxSWSsgNTwCfZTMJzr+Y2hCXOibl/P5XyYlw twQAoKBcuq6OdXEFXVv/mCYGGn7r6LnR =NOEW -----END PGP SIGNATURE-----