Re: uuid values as parameters
От | Florian Weimer |
---|---|
Тема | Re: uuid values as parameters |
Дата | |
Msg-id | 82eid76pl6.fsf@mid.bfk.de обсуждение исходный текст |
Ответ на | Re: uuid values as parameters (Lew <noone@lewscanon.com>) |
Список | pgsql-jdbc |
* Lew: > When you give the SQL parser a string literal, it knows that it might > have to convert to the column type, and at that can only do so for > column types that define a conversion for string literals. When you > give the parser a parameter to a prepared statement, you are adding > the feature of strong type safety. You are actually depending on the > parser to reject inputs of the wrong type. For it to accept a string > value for the parameter would be a violation of that trust. You usually can work around that by adding a type cast, as in "?::uuid". To get behavior which more closely matches those of other PostgreSQL bindings, add "?stringtype=unspecified" to the JDBC URL. -- Florian Weimer <fweimer@bfk.de> BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstraße 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99
В списке pgsql-jdbc по дате отправления: