Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 830D19F9F75 for ; Fri, 8 Dec 2006 11:17:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 36514-06 for ; Fri, 8 Dec 2006 11:17:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id BED3D9FA040 for ; Fri, 8 Dec 2006 11:17:11 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kB8FGsOL005038; Fri, 8 Dec 2006 10:16:54 -0500 (EST) To: "Rajesh Kumar Mallah" cc: "Adam Radlowski" , "Lista Postgres" Subject: Re: Should clients warn in case of server version mismatch ? In-reply-to: References: <45790F91.4090404@informatyka.gdansk.pl> Comments: In-reply-to "Rajesh Kumar Mallah" message dated "Fri, 08 Dec 2006 13:00:54 +0530" Date: Fri, 08 Dec 2006 10:16:53 -0500 Message-ID: <5037.1165591013@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/73 X-Sequence-Number: 23865 "Rajesh Kumar Mallah" writes: > IMHO for major version mismatch psql should not present the > user with a prompt at all as certain commands are most likely > not work. The analogy you're drawing with pg_dump is faulty. There are at least three good reasons for psql to be more forgiving of version mismatches than pg_dump is: 1. pg_dump is commonly run noninteractively (eg, from a cron job) where any mere warning will likely go unnoticed. So it has to raise a hard error to get the DBA's attention. psql's backslash commands are far less likely to be used noninteractively, and a failure is usually pretty obvious to a human user. 2. pg_dump is critical: if it dumps an unusable backup due to not understanding the system catalogs of a newer server, the DBA who needs that backup later will be badly screwed. psql's backslash commands, again, are not so critical. 3. psql offers a pretty decent amount of functionality even if some of its backslash commands don't work, whereas a dump that is wrong is worse than useless. So the use-case for operating with a version mismatch is much wider for psql. So I think we have the right tradeoffs in this regard now. regards, tom lane