Re: Re: PostgreSQL specific datatypes very confusing for beginners who use wrappers around JDBC

Поиск
Список
Период
Сортировка
On 01/29/2014 09:07 AM, Craig Ringer wrote:

> A challenge I've found when approaching this from the ORM side has been
> getting people to care. The sentiment has tended to be along the lines
> of: No other DBMS does this or requires this, why do we have to jump
> through hoops just to make PostgreSQL happy?

Is this true?  Can you use other JDBC drivers (except SQLite) to insert
Java Strings into NUMERIC columns and Java ints into text columns?

> Look at the example that started this thread, though. The stack is:
>
> PostgreSQL
>    PgJDBC
>      Java JDBC API
>        EBean ORM
>          Play! Framework
>
> and *every level* needs to have a clue about this or a way to pass the
> information trough transparently.
>
> Now think about Hibernate, Sequel ORM, Django ORM, ActiveRecord,
> EclipseLink, OpenJPA, DataMapper, Entity Framework, EBean, TopLink,
> iBatis/MyBatis, Doctrine, Propel, CakePHP, Zend, SQLAlchemy, ....
>
> Wouldn't it be nice if we could find a solution to this user pain point
> in one place?

What about using types on the PostgreSQL side which match the
application types?

In any case, use *can* use strings everywhere if you use the
stringtype=unspecified connection parameter:

<http://jdbc.postgresql.org/documentation/92/connect.html#connection-parameters>

--
Florian Weimer / Red Hat Product Security Team


В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Re: PostgreSQL specific datatypes very confusing for beginners who use wrappers around JDBC
Следующее
От: Pedro Salgueiro
Дата:
Сообщение: Continuous archiving and restore questions