Re: Alias hstore's ? to ~ so that it works with JDBC
От | Merlin Moncure |
---|---|
Тема | Re: Alias hstore's ? to ~ so that it works with JDBC |
Дата | |
Msg-id | CAHyXU0xb00_C3hS686F_1NQ87kAGRAv_FKhZs8F1uhuNkQXKbQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Alias hstore's ? to ~ so that it works with JDBC (Seamus Abshere <seamus@abshere.net>) |
Ответы |
Re: Alias hstore's ? to ~ so that it works with JDBC
Re: Alias hstore's ? to ~ so that it works with JDBC |
Список | pgsql-hackers |
On Wed, Feb 6, 2013 at 11:20 AM, Seamus Abshere <seamus@abshere.net> wrote: > merlin, > > Yes, you're correct, my phrasing was bad: all I meant was that it was a > conflict, not a bug in Postgres or hstore. > > I personally don't know of any way around the conflict except changing JDBC > or hstore, and I don't think JDBC is gonna change. > > Deciding not to accommodate JDBC on the Postgres side, though, is going to > prevent hstore from being used properly with Java or any JVM-based language > like JRuby. > > Please let me know if my assumptions are wrong. This problem is not unique to ? character. Hibernate for example reserves the use of : character for name parameter insertion with similarly ridiculous results. Basically every language I know of except for the java stack seems to understand that when embedding constructs into a foreign language there must be some type of escaping mechanism (note they may in fact allow this in some level: via googling it isn't clear). The point is that Postgres should not introduce language constraints because of broken driver technology. To move forward in your particular case, consider: *) switching to 'hstore defined()' function: *) hacking pg_operator (carefully look up and change oprname for the specific hstore operator) merlin
В списке pgsql-hackers по дате отправления: