From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: turon.david@seznam.cz
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16743: psql doesn't show whole expression in stored column
Date: Wed, 25 Nov 2020 11:42:40 -0500
Message-ID: <20201125164240.GA26300@momjian.us> (raw)
In-Reply-To: <464990.1606320939@sss.pgh.pa.us>
References: <16743-7b1bacc4af76e7ad@postgresql.org>
<286182.1606232817@sss.pgh.pa.us>
<7a1faa2c-d4d1-67fd-03fe-29ef7e240301@enterprisedb.com>
<426714.1606316633@sss.pgh.pa.us>
<464990.1606320939@sss.pgh.pa.us>
On Wed, Nov 25, 2020 at 11:15:39AM -0500, Tom Lane wrote:
> I wrote:
> > Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> >> I think we should get rid of the truncating. Otherwise, there is no way
> >> to actually get the full information, is there? (Other than pg_dump or
> >> manual catalog queries.)
>
> > That'd be okay with me. It's always seemed a little odd that we do that
> > for attrdefs but not anything else.
>
> Here's a proposed patch for that.
>
> After looking a bit closer, I saw that the memory leak I was worried
> about before is not real, because the code passes mustfree = true to
> printTableAddCell. However, I still don't like it one bit, because you
> need some undocumented and fragile assumptions about the relationship
> between attidentity and attgenerated to conclude that we won't instead
> have a false free() attempt on something that mustn't be free'd. So I
> think we should adjust the code to track mustfree explicitly, as done
> below.
>
> Should we back-patch this? I think that the truncation behavior became
> significantly more of a problem with the addition of the GENERATED
> feature; before that it was clearer what was going on. So I'm mildly
> inclined to back-patch to v12 where that came in.
Works for me.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, turon.david@seznam.cz, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16743: psql doesn't show whole expression in stored column
In-Reply-To: <20201125164240.GA26300@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox