varchar length... PHP

From: Constantin Khatsckevich <c(at)const(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: varchar length... PHP
Date: 2004-07-13 11:29:58
Message-ID: 40F3C7B6.9070807@const.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

Can I get ordered length of the varchar field? I need it in PHP script.

For example,
CREATE TABLE t1
(
id int,
str varchar(40)
);

PHP function pg_FieldSize() returns me -1 for field str, because this is
variable length field, but I need got 40 (in the my example). May be
like sizeof() ?????

--
Best regards,
Constantin Khatskevich.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Markus Wollny 2004-07-13 11:30:29 Tuning random_page_cost
Previous Message Najib Abi Fadel 2004-07-13 10:07:17 function returning a readable representation of a number