Re: varchar length... PHP

Поиск
Список
Период
Сортировка
От mike g
Тема Re: varchar length... PHP
Дата
Msg-id 1090038964.14010.42.camel@localhost.localdomain
обсуждение исходный текст
Ответ на varchar length... PHP  (Constantin Khatsckevich <c@const.ru>)
Список pgsql-general
Hello,

Varchar by default will truncate extra space at the end.  If the table
column is defined as char or you cast the varchar to a char data type it
will have a fixed size of 40 characters.

Mike

On Tue, 2004-07-13 at 06:29, Constantin Khatsckevich wrote:
> 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() ?????
>

В списке pgsql-general по дате отправления:

Предыдущее
От: mike g
Дата:
Сообщение: Re: Problem Report
Следующее
От: mike g
Дата:
Сообщение: Re: server closed the connection unexpectedly