logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

german decimal / locale: msg#00318

db.postgresql.novice

Subject: german decimal / locale

How to perform an german-style numeric output like: '1.234,56' with psql?

I use the SuSE 8.0 standard RPM for postgresql:

postgresql-libs-7.2-70
postgresql-7.2-70
postgresql-docs-7.2-70
postgresql-odbc-7.2-70
postgresql-server-7.2-70
postgresql-tcl-7.2-70
postgresql-tk-7.2-70

This is my enviroment:

version:
========
psql (PostgreSQL) 7.2
contains support for: readline, history, multibyte
Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
Portions Copyright (c) 1996, Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.

locale (for user and postgres):
===============================

user@laptop:~> locale

LANG=de_DE@euro
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE=POSIX
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL=

postgres@laptop:~> locale

LANG=de_DE@euro
LC_CTYPE="de_DE@euro"
LC_NUMERIC="de_DE@euro"
LC_TIME="de_DE@euro"
LC_COLLATE=POSIX
LC_MONETARY="de_DE@euro"
LC_MESSAGES="de_DE@euro"
LC_PAPER="de_DE@euro"
LC_NAME="de_DE@euro"
LC_ADDRESS="de_DE@euro"
LC_TELEPHONE="de_DE@euro"
LC_MEASUREMENT="de_DE@euro"
LC_IDENTIFICATION="de_DE@euro"
LC_ALL=


encoding:
=========

List of databases
Name | Owner | Encoding
-----------+----------+----------
db1 | vroehl | LATIN1
db2 | vroehl | LATIN1
template0 | postgres | LATIN1
template1 | postgres | LATIN1
(4 rows)

SHOW DateStyle:
===============

NOTICE: DateStyle is German with European conventions
SHOW VARIABLE

Table with Numeric-Typ (price):
===============================

Table "kh"
Column | Type | Modifiers
--------+-----------------------+-----------
artbez | character varying(80) |
artnum | character(8) |
laenge | integer |
br500 | numeric(6,2) |

Select-Statement:
=================

select artbez,artnum,laenge,br500 from kh;

-[ RECORD 1 ]--------------------
artbez | Kaminhaube (Abdeckwelle)
artnum | 461.000
laenge | 500
br500 | 108.60

Problem:
========

The german correct output need a decimal comma, like "108,60".
The function to_char(br500, '9G990D00') return the same result: "108.60".







---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo