Re: how can I get the length of columns of a table by system tables/views

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For example:
CREATE TABLE tb(name varchar(32));

You can get this with System functions.

select pg_column_size(name) from tb;

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/



On Wed, Sep 7, 2011 at 8:50 PM, shuaixf <shuaixf@xxxxxxxxx> wrote:

According to pg_class, pg_attribute, pg_type, I can get the tablename,
column name, column type
however, how to get the length of columns of a table by system tables/views?
Thanks!

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-can-I-get-the-length-of-columns-of-a-table-by-system-tables-views-tp4778911p4778911.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux