Search Postgresql Archives

Re: Re: [GENERAL] Mapping PostgreSQL data types to DB2 Federated Server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/14/12 6:37 PM, Alexander Gataric wrote:
On 10/14/12 5:52 PM, Alexander Gataric wrote:
>
> I'm on a project which requires adding PostgreSQL tables to DB2 > Federated Server. I'm getting an error with PostgreSQL data types > boolean, text, bytea, and XML. I believe this can be solved with the > CREATE TYPE MAPPING in Fed Server. Does anyone know which values to > use? I'm not that familiar with Fed Server.

I googled db2 data types.
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.intro%2Fsrc%2Ftpc%2Fdb2z_datatypes.htm

Postgres' TEXT would map to VARCHAR(n) but you'll have to decide on a suitable max length for you n value. ther's nothing like boolean, so probably mapping it either to a SMALLINT where 't' is 1 and 'f' is 0, or mapping it to a char(1) and just storing it as t/f for true/false. BYTEA is equivalent to a BLOB, whatever DB2 uses for that. and DB2 is supposed to have an XML type, but I suppose you could just map it to VARCHAR(n) again, as XML is really just a bunch of text formatted with html-like entities.





--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux