inet type (PostgreSQL) data receiving (= lazarus / 16-Databases ---------------------------------------------------------------------- lynx · 2011-08-23 07:39 Hi! (= Using standart PQConnection with SQLQuery, DataSource and SQLTransaction I am trying to get data from PostgreSQL table. Everything's ok, but the column with inet type data, it returns just '()'. Even 'SELECT CAST(ip_adr AS VARCHAR) from ip_tbl' won't work. While Zeos tables work perfectly. Just want to know, it isn't supposed to behave like that, rigth? Then what I've missed in this case? Using v.0.9.30, FPC 2.4.2, WindowsXP SP3. ---------------------------------------------------------------------- Lacak2 · 2011-08-24 05:43 Yes, inet, cidr, macaddr are not supported ATM directly, but select with CAST to varchar should work (if such cast is supported by PostgreSQL) ---------------------------------------------------------------------- lynx · 2011-08-24 07:18 Thanks for explanation! (: I was afraid of missing just some option or property. I thought, that CAST is supported by PostgreSQL. Anyway, I'll use Zeos if not (: Thanks again (: ---------------------------------------------------------------------- goodname · 2011-08-30 21:03 CAST is supported by PostgreSQL. Try setting a length. 'SELECT CAST(ip_adr AS VARCHAR(255)) from ip_tbl' See about half way down page. http://www.postgresql.org/docs/8.4/interactive/sql-expressions.html