some info about char(1)

From: "And(dot) Andruikhanov" <andy(at)euinf(dot)dp(dot)ua>
To: pgsql-bugs(at)postgresql(dot)org
Subject: some info about char(1)
Date: 2001-02-01 16:49:53
Message-ID: Pine.BSF.3.96.1010201181904.21730A-100000@euinf.dp.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Good day.

It's some differences in results, then I inserted char(1) type:

create table ku(n_pp int4, col char(1));

insert into ku values(1, '\000');
insert into ku values(2, '\040');
insert into ku values(3, ichar(0));
insert into ku values(4, ichar(32));

select n_pp, ascii(col) from ku ;
n_pp | ascii
------+-------
1 | 32
2 | 32
3 | 0
4 | 32
(4 rows)

Look at the strings where n_pp equal 1 and 2. "Col" column always equals to 32
(decimal), but I inserted as '\000' and '\040'.
If I use ichar() function, then "col" column has another values.
Is it right ?
Locales for "postgres" user adjust properly (if it's necessary).
Postgresql version: 7.0.2 on FreeBSD 4.2-stable.

ps. I use some function from list, which generated by "\df" command from psql
console. But I didn't found them in pgsql documentation. Is it possible that
this function will be removed in future version of postgresql ?
pps. Can I take description of this function ?
sorry for my bad english ;)

Regards..
--

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-02-02 05:01:33 JDBC ResultSet.getObject() fails for type INTERVAL
Previous Message Hiroshi Inoue 2001-02-01 09:58:58 Re: Re: DB crash on "drop table" interruption