Explanation of pg_column_size

From: Steve Baldwin <steve(dot)baldwin(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Explanation of pg_column_size
Date: 2016-08-01 21:46:24
Message-ID: CAKE1Aia-zWD+DxEMU_CFOHFz=G8vPCgTrGdgNuPzk_kK=FsaEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi all,

Can someone please explain the following to me:

mse=# with l as (select 0.1::numeric as numlit) select
pg_column_size(numlit) as sz_numlit, pg_column_size(0.1::numeric) as
sz_expr from l;
sz_numlit | sz_expr
-----------+---------
5 | 8
(1 row)

It looks as though the expression is being cast to double precision, but
maybe it is invalid to use pg_column_size in this way.

I'm using 9.5.3 on OS X.

Thanks,

Steve

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2016-08-01 22:13:18 Re: Explanation of pg_column_size
Previous Message gk chinna 2016-07-27 23:47:41 SUB # How to configure / calculate the semaphore related values while making changes to max_connections