From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jay Levitt <jay.levitt@gmail.com>
Cc: pgsql-docs@postgresql.org <pgsql-docs@postgresql.org>
Subject: Re: [PATCH] Use idiomatic style for varlena structs
Date: Mon, 13 Feb 2012 10:51:51 -0500
Message-ID: <10780.1329148311@sss.pgh.pa.us> (raw)
In-Reply-To: <4F392203.2040907@gmail.com>
References: <4F392203.2040907@gmail.com>
Jay Levitt <jay.levitt@gmail.com> writes:
> I'm new to the codebase, but I think this patch reflects real-world usage;
> the PostgreSQL code itself always calls the length field "vl_len_", and I
> believe int32 is preferred over int4 (yes?)
The point of calling it vl_len_ is that it should never be referenced by
that name, so I'm not sure that propagating that name into user
documentation is a good idea. I do agree with the part of this patch
that recommends use of SET_VARSIZE.
For context, the issues you're concerned about only matter when dealing
with a toastable datatype (not all varlena types are toastable). The
particular bit of docs here doesn't pretend to be explaining how to
write toast-safe code. I think it might be better from an expository
standpoint to cover that separately, rather than try to work it into the
very first pass over the concepts.
regards, tom lane
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-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jay.levitt@gmail.com
Subject: Re: [PATCH] Use idiomatic style for varlena structs
In-Reply-To: <10780.1329148311@sss.pgh.pa.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