Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fwwbr-0007Xp-LY for pgsql-general@arkaria.postgresql.org; Mon, 03 Sep 2018 21:42:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fwwbp-0005in-Qg for pgsql-general@arkaria.postgresql.org; Mon, 03 Sep 2018 21:42:09 +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.89) (envelope-from ) id 1fwwbp-0005ig-Fb for pgsql-general@lists.postgresql.org; Mon, 03 Sep 2018 21:42:09 +0000 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fwwbl-0000cH-LN for pgsql-general@lists.postgresql.org; Mon, 03 Sep 2018 21:42:09 +0000 Received: by mail-qt0-x242.google.com with SMTP id j7-v6so1931467qtp.2 for ; Mon, 03 Sep 2018 14:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=67wWGWeqmzYJ5CJjDfjKmtBjUaFWiu+uwO2mFthZqw8=; b=1ovHBZdInF4oSRdmYp8I3A55AniQUhCHYppG8U2NqwteNaqWGAe/DorWXTIFRP3Tqf vqcxspzYMOZ74wz7NQf5dZf8ZxY06hR0JNQ1VzAtu6uhK9oVvVxsEnUZ36tokmreRntR Xx71oew1Vgez7/qMsTEFN6pYeI+i4SjbAA5eunNCulu5/gNQYK6Yfh7WjKSQUuTQs/0i fU6SLe/nChECEv7oU7qhsXH5j1jev8MWSlc2SsOD+b60AHmS4Yqok+6hYpiAuwZG1uk4 SrYiQaEuVwmx/I782365DWqHGZ/vIsu7xJeRmBpe/a7+xtnEpj/GVyQWiBpJMqfOWgTv VbzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=67wWGWeqmzYJ5CJjDfjKmtBjUaFWiu+uwO2mFthZqw8=; b=l0XYnHUBwqvPbEK+YjNW8gPwCSYbwb4X0i+K2Thr2HL7ftK1jeYuVnPa5XQdA+h65F kze9xT96spVneR/X4x4pUUFitkSIPIBrLB8lx0wf7tFMKss1EqvNgraFTP/Njjbjug7f OVEtPwQievx/y1vzQE7YCHAsxsJ9IMKolYsHe0LcInSiuO3DmBYf6edAhwMw/VfubXsz soWyTXABOYqozUAvCX4zha7n/wv12WbtZlyD/R3bNO68T0EP93+rQccE29no9FGmao4h G2v9KZMq9hGMjFN3hEUNd3wkx4k28SAbYVD6SRCXgU0rcPY8ymk5BS3CyuAOCZ0axaQ8 PFQA== X-Gm-Message-State: APzg51DcrOX67TGGdehBGpCKSkU7faVp8OXN7yBm0MLxYcUUjNunduG1 5jFKSlax6TYNonz1QidFMB/ryj5tVh4hSuxTMmnQdL3yYgiVGQv0zcHCz/Xn+XoqDsLWfyAfnhd HA0ssAKHVWCp/Uas3lLiC5NoXgQMV2AhykWZLjvyRBg6qcus6uJTC0o5YEaBH669ooyChB3o5aS 6uymYAZwcgJsmg1g== X-Google-Smtp-Source: ANB0VdagtynQZ7JvZW+KgPAzCN+lK78MQGi4y+6Koy0LOxL7ZTbTYpChf2Wcw1WJeK+9z/TLLS6vMw== X-Received: by 2002:a0c:885b:: with SMTP id 27-v6mr26998994qvm.115.1536010923738; Mon, 03 Sep 2018 14:42:03 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id d67-v6sm9301890qkc.90.2018.09.03.14.42.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Sep 2018 14:42:03 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 7EA9D7D0; Mon, 3 Sep 2018 18:42:01 -0300 (-03) Date: Mon, 3 Sep 2018 18:42:01 -0300 From: Alvaro Herrera To: Andreas Joseph Krogh Cc: pgsql-general@lists.postgresql.org Subject: Re: Sv: Re: How to get shorter SERVER_VERSION in psql-prompt? Message-ID: <20180903214201.q4heutmvdr6hlble@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-03, Andreas Joseph Krogh wrote: > select setting as server_version from pg_settings where name = > 'server_version'; > ┌──────────────────────────────────┐ > │          server_version          │ > ├──────────────────────────────────┤ > │ 10.5 (Ubuntu 10.5-1.pgdg18.04+1) │ > └──────────────────────────────────┘ Ugh. (So this is coming from "configure --with-extra-version" stuff) I guess you could just split it out at the first whitespace ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services