Re: What's the prefix?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "jacktby(at)gmail(dot)com" <jacktby(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: What's the prefix?
Date: 2023-02-26 16:27:07
Message-ID: CAKFQuwYc81262fkoR+A2At6a0JOcHx4x_6SMjTUgj=19LD7D3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 26, 2023 at 9:16 AM jacktby(at)gmail(dot)com <jacktby(at)gmail(dot)com> wrote:

> use these sqls:
> create table t(a text);
> insert into t values('a');
> select lp,lp_len,t_data from heap_page_items(get_raw_page('t',0));
> lp | lp_len | t_data
> ----+--------+--------
> 1 | 26 | \x0561
> as you can see, the 61 is 'a', so what's the 05??? strange.
>

text is variable length so there is header information built into the
datatype representation that indicates how long the content is.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-02-26 17:54:25 Re: windows/meson cfbot warnings
Previous Message jacktby@gmail.com 2023-02-26 16:16:44 What's the prefix?