| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bmomjian(at)gmail(dot)com> |
| Subject: | Re: Fix \crosstabview to honor \pset display_true/display_false |
| Date: | 2026-06-26 18:07:35 |
| Message-ID: | aj6_j2nbYUP3PlX2@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello,
On 2026-Jun-26, Chao Li wrote:
> I didn’t take this part from your proposal, so an empty cell still shows nothing:
> ```
> @@ -442,7 +421,7 @@ printCrosstab(const PGresult *result,
> for (i = 0; i < cont.cellsadded; i++)
> {
> if (cont.cells[i] == NULL)
> - cont.cells[i] = "";
> + cont.cells[i] = printDisplayValue(&popt, InvalidOid, NULL, "");
> }
> ```
Yeah, this particular hunk wasn't intended for commit, so leaving it out
was the right thing to do.
> Your proposed test has NULL in the row and column headers, but not in
> the value column. I added a NULL value too, so the test case
> explicitly demonstrates the display difference between a NULL value
> and an empty cell.
Yeah, that's perfect, thanks.
> PFA v4: addressed Álvaro's comments.
Pushed now, thanks.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-06-26 18:18:55 | Re: md5_password_warnings for password auth with MD5-encrypted passwords |
| Previous Message | Nathan Bossart | 2026-06-26 18:06:36 | Re: enhance wraparound warnings |