Re: Column quoting in result set getters
От | Kris Jurka |
---|---|
Тема | Re: Column quoting in result set getters |
Дата | |
Msg-id | Pine.BSO.4.56.0406070242210.29634@leary.csoft.net обсуждение исходный текст |
Ответ на | Column quoting in result set getters (Manuel Sugawara <masm@fciencias.unam.mx>) |
Список | pgsql-jdbc |
On Wed, 2 Jun 2004, Manuel Sugawara wrote: > When I try to get the value of a column by name, using quotes the > driver throws an exception telling me that that column does not > exists. The column name has accents: > > int val = res.getInt("\"última\""); > > Since quote_ident() quotes the names containing accents I think the > driver should accept the quoted version as well or am I missing > something? I'm using pg74.1jdbc3.jar. > I'm not sure what connection you are making between quote_ident and the ResultSet methods, why should these act the same? It certainly is possible to have column names with quotes, for example: jurka=# create table quote ("""a""" int); CREATE TABLE jurka=# \d quote Table "public.quote" Column | Type | Modifiers --------+---------+----------- "a" | integer | In this case ResultSet.getInt("\"a\"") would be correct, what are you suggesting should be used in this case? ResultSet.getInt("\"\"\"a\"\"\"") Kris Jurka
В списке pgsql-jdbc по дате отправления: