Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j69yu-0003K1-2b for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2020 09:24:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j69ys-0004rg-UB for pgsql-general@arkaria.postgresql.org; Mon, 24 Feb 2020 09:24:50 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j69ys-0004r8-K7 for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2020 09:24:50 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j69yo-0007jl-Pr for pgsql-general@lists.postgresql.org; Mon, 24 Feb 2020 09:24:50 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 3B008256A; Mon, 24 Feb 2020 10:24:45 +0100 (CET) Date: Mon, 24 Feb 2020 10:24:45 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Can I trigger an action from a coalesce ? Message-ID: <20200224092445.GA22700@hjp.at> References: <20200222210206.GA17445@panix.com> <20200223112148.GF12464@hjp.at> <510218283.7242058.1582521649818@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <510218283.7242058.1582521649818@mail.yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-02-24 05:20:49 +0000, sivapostgres@yahoo.com wrote: > It could also be done by putting those values in square bracket, if subst= ituted > with default values. > eg. [0] > 4 > 45 > [100] > Values within square brackets are default values. This would also work in many cases (especially if the values only have to be displayed and not processed further). In this case the OP wrote that "the default value is reasonable and could actually come from the source table". I assumed that he had a reason for this choice and wanted to preserve it. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl5TllgACgkQ8g5IURL+ KF2a2g//TCvn8JbrVZeFpSs33dKHY519WK+yvhu4MZdOKtc1nzyxVfO7GKl8+c+e Zp6Dw/074kHnslKtCZaT7vy9fFGBHrkYCRA0PjNEJM6U0+DI1V+SBI0aHrSM3RLj LiJ0rBKP+U5gIIn26xi68RUFUgDqUXfxkESP+f3/mi4w+t5a4WPS9mV772f4RiwC vo9zfiYdrZTqDng7xb4DdsRt9oCafv77lX2cGB5MxbYfyCXjueLWEOVvU7ktKtk3 JjoQ5vIrpIZplT4Xh//6i/+3jI9Gv7a0jHf50qArHenxEEZrFoaxwugfsZmloVas uUS9jlLcLqFYaVSHlmj8VW5jp6yxcfcNqCWy+9dFu+tgnpgckXQcsdmMtmyS1aqe vHCBZ2dbQw2kSOQY9pbjMYFw6UrGsWl0Iyxvu/5TBNY7taVIJ/8qwc9K+PhY/3O9 nyFoHSQedGaW4kqkEP6Rb5xFBWpSFh0EQpMmwAtEYfSqHpQWCTOS5LPxIPOCxHBy ugd8D5oeZN+312Qa30QzUHwOK7xUlg5MCcIumC3R2pt0bVIMrbxpH5+85ZNRApof 3SJ7QI9JYlsKIOFHyZjmi1zbxVmNqSoOR48vkqdl9kKiP2bx8gtxqV6yYYD3CF3s CuGj93sR/n+f6SGJ+QhadMaGGelJSaW/oLbITIyIQYi+xKT8GvA= =Wq4W -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH--