Re: COPY statement REAL vs VARCHAR precision issue

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: COPY statement REAL vs VARCHAR precision issue
Дата
Msg-id 4D543FEF.5030904@iol.ie
обсуждение исходный текст
Ответ на COPY statement REAL vs VARCHAR precision issue  (Samuel Gilbert <samuel.gilbert@ec.gc.ca>)
Список pgsql-general
On 10/02/2011 17:13, Samuel Gilbert wrote:
> Hello all,
>
>    I'm using a COPY statement to load data into a PostGIS.  The issue I am
> facing is that if I define fields with the REAL type, the COPY will only
> preserve 4 decimals which is not sufficient for my application.

If you use NUMERIC, you can define the precision you need, and be sure
of accurate calculations:

http://www.postgresql.org/docs/9.0/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: finding bogus UTF-8
Следующее
От: Royce Ausburn
Дата:
Сообщение: Schema version control