foxpro, odbc, data types and unnecessary convertions

Поиск
Список
Период
Сортировка
От Fernando Moreno
Тема foxpro, odbc, data types and unnecessary convertions
Дата
Msg-id b1c45530902251340r6b62cd0u9da123e0d91e9356@mail.gmail.com
обсуждение исходный текст
Ответы Re: foxpro, odbc, data types and unnecessary convertions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: foxpro, odbc, data types and unnecessary convertions  (Justin <justin@emproshunts.com>)
Re: foxpro, odbc, data types and unnecessary convertions  (justin <justin@emproshunts.com>)
Список pgsql-general
Hi all, I'm using visual foxpro 9 -not my decision- for a client
application. Statements are writen as the typical sql string and sent
through ODBC.

For numbers, I have to convert them first to string and then remove
the spaces, the code looks like this: sql_string = "some sql" +
alltrim( str( some_number ) ) + " more sql"; I can combine alltrim and
str in a third function but it's still tricky. A shorter and
presumably better way to do the same is: sql_string = "some_column =
?foxpro_variable ". The problem with the last option is that, watching
the pgsql log, values are sent this way: '12345'::float(8), so for
every numeric value, no matter its type, I'm sending 12 characters
more and the server is doing convertions that I don't need.

Having a lot of foreign keys and other numeric data, I think this
behaviour is not so good for network (remote and poor connection) and
server performance. I'm almost decided to keep doing the trim/str
thing, but my question is: am I exaggerating? what would you do?

Thanks.

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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Warm standby failover mechanism
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Warm standby failover mechanism