Thread: "text" type is java.sql.Types.varchar not longvarchar

"text" type is java.sql.Types.varchar not longvarchar

From
.
Date:
If you get the data type of a column defined as 'text', the driver maps this
type to java.sql.Types.VARCHAR with a column size of '-1'.

It wouldn't be better if the 'text' type, that, as its name says is not a mere
'varchar', was mapped to java.sql.Types.LONGVARCHAR?

Looks like *no* PostgreSQL type that fit into this java type, so why do it this
way?



Manel


Re: "text" type is java.sql.Types.varchar not longvarchar

From
Barry Lind
Date:
I personally use text instead of VARCHAR.  So for me the current mapping
makes sense. I generally am not conserned with the length restrictions
the VARCHAR type imposes even though they are all short.

thanks,
--Barry


. wrote:
> If you get the data type of a column defined as 'text', the driver maps this
> type to java.sql.Types.VARCHAR with a column size of '-1'.
>
> It wouldn't be better if the 'text' type, that, as its name says is not a mere
> 'varchar', was mapped to java.sql.Types.LONGVARCHAR?
>
> Looks like *no* PostgreSQL type that fit into this java type, so why do it this
> way?
>
>
>
> Manel
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>