Re: Issue with DataBaseMetaData.GetTypeInfo()

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Issue with DataBaseMetaData.GetTypeInfo()
Дата
Msg-id 47F11CA2.4040906@ejurka.com
обсуждение исходный текст
Ответ на Issue with DataBaseMetaData.GetTypeInfo()  ("Mats Ekelund" <mats.ekelund@zenon.se>)
Ответы Re: Issue with DataBaseMetaData.GetTypeInfo()  ("Mats Ekelund" <mats.ekelund@zenon.se>)
Список pgsql-jdbc
Mats Ekelund wrote:
>
> I have attached the patch.

Please keep the mailing list CCed so all can see/participate in the
discussion.

+             else if ( typname.equals("varchar") ||
typname.equals("char") || typname.equals("text") ||
+                     typname.equals("name") ||
typname.equals("timestamp") ||  typname.equals("timestamptz") )
+             {
+                 tuple[3] = connection.encodeString("'");
+                 tuple[4] = connection.encodeString("'");
+             }


Your patch hard codes this for a couple of types, but it doesn't seem to
be a general solution.  It seems impossible to enumerate all the
possible types that require quoting.  What about any user defined types,
  we can't possible know what those are in the driver?

If you were going to hardcode a list, you need to hardcode the list of
types that don't require quoting because that should at least be a fixed
list.  A more general solution would be to put this information into
TypeInfoCache so you could say something like
TypeInfoCache.requiresQuoting(typeOid).

Kris Jurka

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Documentation problem with LargeObjectManager
Следующее
От: David Goodenough
Дата:
Сообщение: Re: Documentation problem with LargeObjectManager