Обсуждение: Re: [GENERAL] Mapping PostgreSQL data types to DB2 Federated Server
The IBM people aren't being helpful so I thought I'd ask here.
Sent from my smartphone
----- Reply message -----
From: "John R Pierce" <pierce@hogranch.com>
To: <pgsql-general@postgresql.org>
Subject: [GENERAL] Mapping PostgreSQL data types to DB2 Federated Server
Date: Sun, Oct 14, 2012 8:05 pm
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.
>
> Also, the Postgres data is being extracted and inserted from the same > table using Optim Archive. Does this pose an additional challenge with > setting up the mapping?
>
I suggest you talk to your IBM support contacts for these issues, they really have little to do with Postgres and are completely beyond postgres' control.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Sent from my smartphone
----- Reply message -----
From: "John R Pierce" <pierce@hogranch.com>
To: <pgsql-general@postgresql.org>
Subject: [GENERAL] Mapping PostgreSQL data types to DB2 Federated Server
Date: Sun, Oct 14, 2012 8:05 pm
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.
>
> Also, the Postgres data is being extracted and inserted from the same > table using Optim Archive. Does this pose an additional challenge with > setting up the mapping?
>
I suggest you talk to your IBM support contacts for these issues, they really have little to do with Postgres and are completely beyond postgres' control.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 10/15/2012 09:37 AM, Alexander Gataric wrote: > The IBM people aren't being helpful so I thought I'd ask here. Try dba.stackexchange.com . -- Craig Ringer
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