pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: lsliang <lsliang@pconline.com.cn>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: about value storage
Date: Tue, 06 Sep 2011 11:52:32 -0400
Message-ID: <7708.1315324352@sss.pgh.pa.us> (raw)
In-Reply-To: <201109061043572514728@pconline.com.cn>
References: <201109061043572514728@pconline.com.cn>

"lsliang" <lsliang@pconline.com.cn> writes:
> http://www.postgresql.org/docs/9.0/interactive/typeconv-query.html 
> example shows: 

> CREATE TABLE vv (v character(20));
> INSERT INTO vv SELECT 'abc' || 'def';
> SELECT v, length(v) FROM vv;

>           v           | length
> ----------------------+--------
>  abcdef               |     20
> (1 row)

> but  my test show not like this :

Hmm, looks like that example was overlooked when we changed the behavior
years ago:
http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=f27976c85b1fb9002727cce65b...

Given the context, we should change it to use octet_length().
Will fix, thanks.

			regards, tom lane



view thread (2+ messages)

Message-ID: <7708.1315324352@sss.pgh.pa.us>
Permalink:  ../7708.1315324352@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7708.1315324352@sss.pgh.pa.us

 · 

reply

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, lsliang@pconline.com.cn
  Subject: Re: about value storage
  In-Reply-To: <7708.1315324352@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