Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1urI4F-003gN2-8c for pgsql-general@arkaria.postgresql.org; Wed, 27 Aug 2025 15:28:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1urI4E-00GBtw-NE for pgsql-general@arkaria.postgresql.org; Wed, 27 Aug 2025 15:28:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1urI4E-00GBto-CY for pgsql-general@lists.postgresql.org; Wed, 27 Aug 2025 15:28:07 +0000 Received: from mail-oa1-x29.google.com ([2001:4860:4864:20::29]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1urI4C-002ABU-0l for pgsql-general@postgresql.org; Wed, 27 Aug 2025 15:28:06 +0000 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-30ccebcc7e4so2983355fac.3 for ; Wed, 27 Aug 2025 08:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756308482; x=1756913282; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=3TMdfJiXsM+JcJIuABI621rf3L9PwfTQSBPhoyi6g04=; b=THZQq3vRjvZsim2+D0Bw9G5vcKNRDhFJDmX1zRd09lDRZXzPPWb/y4T9puLaXkvfb6 BXqrBZtEZJSu52ocOdMrVv88VA0hp63v4VbOX9PhaHcXUC0AFEkDcjLy9LCut7NhZVrP hFvXoR8MhjpAV3jb48IBlK1OaN1TYzNA3pJ/KrCSnOam5ooT+nOxbqMV6O5ur5XLLMva Oux6Z3AofPaljONfSEqRdmTYscODtT8clYTUIrBbG+W0X22n4zVT8nbX2yBZ5oMa+36G A3B6Zw50ThK+AskP0XcVTV5/JaG9Ag9cCZUEIXrzgQkP9dwy+H+bXtDjJgg+7+NuoN2+ ZIMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756308482; x=1756913282; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3TMdfJiXsM+JcJIuABI621rf3L9PwfTQSBPhoyi6g04=; b=EezXUjziOM9WIhrZ7wMuA3CSys/m9kVsDW5jG93LvI9VBRb3okigJBARD2WGmlbzLg nmRuNIpn6Q9aUWC37P6yk92W3kpZT5gnBvkgbW43YXu5gVLBR92GZSH3nSDvv1aWooE7 NdPrHqBZZjQAFZYtNb0ZuTKwm1hr+juMBrbF+tdm2k4ZOMSmS9Ar6CoLe4287hnlqx0/ xBdDmdzHXocb2qwPqCg4B5erqCerdetUPulnbF9zESHPLIdak3zOVxtKgp1YCEXYjqSq 7atJetNlzr2H4MvTOfPkyGhEyg6wPO8qLP/zw2GxnNuYu7HwQh+5S+apBj80mvQAY5jb UbJw== X-Gm-Message-State: AOJu0YznFyh13ZCZG/R0wl753IYUI7XMS+snVi3QgeeA+dBFXsN6Qoo1 rQesiYJqP52pPmu/O1MzIt1v893iSfFYXvJMg2kHc6U7ZQdxKUSq2WAmzUKq+/KjbvZYAh4V/Lo M9me+chA72Sm6A8PSE8QGHABdDVxz5cqQBIMQ X-Gm-Gg: ASbGncvMDs0+R/+UPzhdrd7xfuJyengFuq5BiXiUPFysHop4/bcs6p4Is36oT/PUwOy RrLDq5YrQ6GO8krWJqiTcsOzPb80UadbiL7rt+rq/7EsmhHaVC84NYKCF10BMoblwAkIVWlzSwE l3fUGGer5EVCQeNLTFGc91OkjVwbw1ABi2N8/cuch5DgluTk42vQ5o9JjGKniA/K69iE0Ks0p9P lImPDn66Lb0wt8Wyzo= X-Google-Smtp-Source: AGHT+IGeIv0gVt9Q/VU23YRISZ3Mb333CX/6kxNUwqlzn6iSZTHOvDuXDU+JjvbjNFewlpBIzfyeMGtJ28t3tRrwXpc= X-Received: by 2002:a05:6808:66cb:b0:437:b028:f426 with SMTP id 5614622812f47-437b028fbbcmr5651002b6e.17.1756308482201; Wed, 27 Aug 2025 08:28:02 -0700 (PDT) MIME-Version: 1.0 From: Ron Johnson Date: Wed, 27 Aug 2025 11:27:51 -0400 X-Gm-Features: Ac12FXzTz3sS5k6AsVXYpsq8CVw8dhp5cqs0fJwyloCAzXYvxcZ2PPyUvuFcop4 Message-ID: Subject: psql --html and to_char() To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000329bc8063d5a6fe4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000329bc8063d5a6fe4 Content-Type: text/plain; charset="UTF-8" PG 17, if relevant. It's great that "psql --html" adds align="right" to numeric fields. But... psql understandably forgets that when the numeric field is passed to to_char(). Is there a way around this, other than writing my own HTMLifier? -- Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --000000000000329bc8063d5a6fe4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
PG 17, if relevant.

It's= great that "psql --html" adds=C2=A0align=3D"right" to = numeric fields.=C2=A0 But... psql understandably forgets that when the nume= ric field is passed to to_char().

Is there a way a= round this, other than writing my own HTMLifier?

--
Death to= <Redacted>, and butter sauce.
Don't boil me, I'm still a= live.
<Redacted> lobster!
<= /div> --000000000000329bc8063d5a6fe4--