Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecDC5-00014g-Tx for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2018 16:37:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecDC5-0005rD-Ax for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2018 16:37:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ecDC5-0005r4-4W for pgsql-hackers@lists.postgresql.org; Thu, 18 Jan 2018 16:37:37 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecDC1-0000Vf-Iw for pgsql-hackers@lists.postgresql.org; Thu, 18 Jan 2018 16:37:36 +0000 Received: by mail-wm0-x232.google.com with SMTP id i11so24022442wmf.4 for ; Thu, 18 Jan 2018 08:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SqV5mmCe4BD2v5yvo560aSTKhA1dNuRZ5ugcAI1JcNs=; b=l5JdOetKvUBKegvfeBNi2cZn6XexgM8MYksNP+fmm7PXcGia10dBpPlsXdaDLdlGId n+6HEpAOEm8+PKc1PcMdcVXTKzF6FA9Ve5VOxgqHJQWDMQjlgLIOuiDWknsX80eH6kri hD6DtfAPFQNLqAMllay4bZE8fUFJlmTaZZFZRNuAbFEk7fquJozZCrA43IJeW9Kb763L 2LH1IKKzvpLSr6aaQgdTQQtuHCNtpWiu1CWO6n2xPRJrR+1YZRbjQRFwmzgxzZKkIS42 SgVi9bVQMROqPHVwn6zNCtIhFqbvqvy/l7u/UvpBYQrov/u+rY1wsfpw14C30Drs0lsm rYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=SqV5mmCe4BD2v5yvo560aSTKhA1dNuRZ5ugcAI1JcNs=; b=PPqjkCqQpum95qIsANblCpglPc/hrz6O7n6S1dgkCtEQT1sAQvJrFyVceL47JClnhW yLS5kAj7lHp3x7WEpiY1Qqg4ZGkQHdLJH2HQMVDZdX2tLmWhoy876SMFcVxlG4046oFC 9LzYVwTo6Jk7GNjacK7q1DeIQBVHkjHF/AAXnZUzz9gPe5inMzc0cCxTguL3ULe0a1KI q9zPYzhQZEVOG/LqV5UVpzXHtMPTye0MtwfrguKk2NesKvqx2eWWkkDtzV3BYMYIDsXH eVA6fdShZYyulicFsQzMw2WjUqr+5gFfF029XDc2t+QnLySuQPw8Dw0o15EOigQkYeKG wt2g== X-Gm-Message-State: AKwxytcSwTjhmvrNBVjTTLmFZUgq121dwzLH5zpqECKqaz/F/bGteXNu ZV7S+5QDBwDPIlmUbjCGh4sFKg== X-Google-Smtp-Source: ACJfBovqoUl+WMMMcTWH1zPJ8lJCDzRoixeePd28IM5xXyF+mOfH/y2vjJgGQM0gxerlAyWmiwo84g== X-Received: by 10.28.144.20 with SMTP id s20mr1836158wmd.149.1516293451840; Thu, 18 Jan 2018 08:37:31 -0800 (PST) Received: from ?IPv6:2a01:cb04:5db:6000:5db0:b42b:a6ca:ee8d? (2a01cb0405db60005db0b42ba6caee8d.ipv6.abo.wanadoo.fr. [2a01:cb04:5db:6000:5db0:b42b:a6ca:ee8d]) by smtp.gmail.com with ESMTPSA id a62sm5661168wmh.3.2018.01.18.08.37.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 08:37:31 -0800 (PST) Subject: Re: PATCH: psql tab completion for SELECT To: Tom Lane , Edmund Horner Cc: Andres Freund , pgsql-hackers@lists.postgresql.org, pgsql-hackers@postgresql.org References: <882D6617-FA16-4C56-8FE0-884BCBBE5A4C@anarazel.de> <2738.1516234038@sss.pgh.pa.us> From: Vik Fearing Organization: 2ndQuadrant France Message-ID: <3a919958-e508-3b66-686f-44a7937fb6e7@2ndquadrant.com> Date: Thu, 18 Jan 2018 17:37:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2738.1516234038@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 01/18/2018 01:07 AM, Tom Lane wrote: > Edmund Horner writes: >> On 15 January 2018 at 15:45, Andres Freund wrote: >>> All worries like this are supposed to check the server version. > >> In psql there are around 200 such tab completion queries, none of >> which checks the server version. Many would cause the user's >> transaction to abort if invoked on an older server. Identifying the >> appropriate server versions for each one would be quite a bit of work. > >> Is there a better way to make this more robust? > > Maybe it'd be worth the effort to wrap tab completion queries in > SAVEPOINT/RELEASE SAVEPOINT if we're inside a user transaction > (which we could detect from libpq's state, I believe). > > That seems like an independent patch, but it'd be a prerequisite > if you want to issue tab completion queries with version dependencies. > > A bigger point here is: do you really want SELECT tab completion > to work only against the latest and greatest server version? > That would become an argument against committing the feature at all; > maybe not enough to tip the scales against it, but still a demerit. I don't really want such a patch. I use new psql on old servers all the time. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support