From: | "And(dot) Andruikhanov" <andy(at)euinf(dot)dp(dot)ua> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | insert char(1) type by different ways. |
Date: | 2001-02-02 09:30:50 |
Message-ID: | Pine.BSF.3.96.1010202111341.14688A-100000@euinf.dp.ua |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Good day.
System Configuration
---------------------
Architecture: Intel Pentium
Operating System: 4.2-STABLE FreeBSD
PostgreSQL version: PostgreSQL-7.0.2
Compiler used: gcc 2.95.2
Description of problem
----------------------
It's some differences in results, then I inserted char(1) type. I introduce one
example:
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'. (It is first way).
In second way, If I use ichar() function, then "col" column has another
values. This result is correct (I think).
Is it right ?
Locales for "postgres" user adjust properly (if it's necessary).
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..
--
From | Date | Subject | |
---|---|---|---|
Next Message | Tilo Levante | 2001-02-02 23:23:53 | Bug and Bugfix for the jdbc-driver |
Previous Message | pgsql-bugs | 2001-02-02 05:01:33 | JDBC ResultSet.getObject() fails for type INTERVAL |