You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Scott Eade <se...@backstagetech.com.au> on 2003/10/14 05:55:36 UTC
PostegreSQL datatype mapping for LONGVARCHAR - bytea vs text
Is there a reason why LONGVARCHAR maps to "bytea" rahter than "text" for
PostgreSQL?
I am in the process of converting an application over from MySQL to
PostgreSQL and am finding that my application experiences a couple of
problems storing data into the columns defined as bytea (usually it just
hangs). I am attempting to make my application as database neutral as
possible (beween MySQL and PostgreSQL that is), and I am thus thinking
that the PostgreSQL text type would be a better mapping for
LONGVARCHAR. So should the PostgreSQL mapping for LONGVARCHAR be
updated to be "text" or should I switch to CLOB (which uses "text" for
PostgreSQL and "LONGTEXT" for MySQL)?
Is anyone using a column type that maps to bytea under PostgreSQL
successfully? This includes: LONGVARCHAR, BINARY, VARBINARY and
LONGVARBINARY.
The mapping for LONGVARCHAR looks wrong to my eyes - I'll change it to
"text" locally and see how things go.
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: PostegreSQL datatype mapping for LONGVARCHAR - bytea vs text
Posted by Scott Eade <se...@backstagetech.com.au>.
Scott Eade wrote:
> Is there a reason why LONGVARCHAR maps to "bytea" rahter than "text"
> for PostgreSQL?
>
> I am in the process of converting an application over from MySQL to
> PostgreSQL and am finding that my application experiences a couple of
> problems storing data into the columns defined as bytea (usually it
> just hangs). I am attempting to make my application as database
> neutral as possible (beween MySQL and PostgreSQL that is), and I am
> thus thinking that the PostgreSQL text type would be a better mapping
> for LONGVARCHAR. So should the PostgreSQL mapping for LONGVARCHAR be
> updated to be "text" or should I switch to CLOB (which uses "text" for
> PostgreSQL and "LONGTEXT" for MySQL)?
>
> Is anyone using a column type that maps to bytea under PostgreSQL
> successfully? This includes: LONGVARCHAR, BINARY, VARBINARY and
> LONGVARBINARY.
>
> The mapping for LONGVARCHAR looks wrong to my eyes - I'll change it to
> "text" locally and see how things go.
With "text" everything now seems to work as expected.
Unless somebody can give me any reason not to I will change the
PostgreSQL LONGVARCHAR mapping to "text".
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org