Re: [BUGS] Function trunc() behaves in unexpected manner with different data types

2011-02-24 Thread Greg Stark
On Thu, Feb 24, 2011 at 7:31 PM, Merlin Moncure wrote: > the root issue I think here is that the string version of the double > precision math is approximated: No, it's simpler than that, all double precision math is approximated. The root issue is that 2183.67 is not representable in a floating

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Jonathan Brinkman
Well, here is the CREATE TABLE if that's what you mean: CREATE TABLE "clientdata"."general_comments" ( "commentid" INTEGER DEFAULT nextval('general_comments_seq'::regclass) NOT NULL, "commentvalue" VARCHAR(255) NOT NULL, "personid" INTEGER, "userid" INTEGER NOT NULL, "commentdatetime

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Jonathan Brinkman
postgres@Cloud-DB1:~$ psql beta_cms_main -c "show timezone;" TimeZone -- EST (1 row) postgres@Cloud-DB1:~$ psql beta_cms_main -c "select now();" now --- 2011-02-24 17:42:40.023498-05 (1 row) postgres@Cloud-DB1:~$ psql beta_cms_main -c "select l

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Tom Lane
"Jonathan Brinkman" writes: > postgres@Cloud-DB1:~$ psql beta_cms_main -c "show timezone;" > TimeZone > -- > EST > (1 row) Hmmm ... you do realize that that setting will result in EST (GMT-5) all year round? It's more likely that you want America/New_York. That's not your immediate pro

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Kevin Grittner
"Jonathan Brinkman" wrote: > "createddatetime" TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT now(), What happens if you use TIMESTAMP WITH TIME ZONE? Can you provide a more complete, self-contained example, like this?: test=# drop table if exists show_ts_issue; DROP TABLE test=# CREATE TABLE "

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Tom Lane
"Kevin Grittner" writes: > "Jonathan Brinkman" wrote: >> My default timestamps in my database all are +5 hours in the future > Can you copy paste actual statements and results? In particular, let's see the result of these commands in psql: show timezone; select now();

Re: [BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Kevin Grittner
"Jonathan Brinkman" wrote: > My default timestamps in my database all are +5 hours in the future Can you copy paste actual statements and results? -Kevin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

[BUGS] LOCALTIMESTAMP has wrong time zone

2011-02-24 Thread Jonathan Brinkman
Greetings I'm in Florida (Eastern Time Zone / New York), using Ubuntu 10.04LTS / Postgresql 8.4.7. My default timestamps in my database all are +5 hours in the future (probably GMT), unless I code the 'EST' time zone into the field's default (timezone('EST'::text, now())).If I use now() it is +5 h

Re: [BUGS] Function trunc() behaves in unexpected manner with different data types

2011-02-24 Thread Merlin Moncure
On Thu, Feb 24, 2011 at 1:01 PM, Nathan M. Davalos wrote: > I ran into something interesting with using trunc() and different data > types: > > The following is a simplified from the statement we’re using and produces > the same results: > > select trunc( ((cast(2183.68 as numeric) - cast(1 as num

[BUGS] Function trunc() behaves in unexpected manner with different data types

2011-02-24 Thread Nathan M. Davalos
I ran into something interesting with using trunc() and different data types: The following is a simplified from the statement we're using and produces the same results: select trunc( ((cast(2183.68 as numeric) - cast(1 as numeric)) )*100) /100 yields 2184.68 select trunc(((cast(2183.6

[BUGS] BUG #5899: Memory corruption when running psql

2011-02-24 Thread Ross Barrett
The following bug has been logged online: Bug reference: 5899 Logged by: Ross Barrett Email address: ross_barr...@rapid7.com PostgreSQL version: 9.0.3 Operating system: Ubuntu 9.10 Description:Memory corruption when running psql Details: Attempting to run psql compl

Re: [BUGS]

2011-02-24 Thread Kevin Grittner
MANISH GOYAL wrote: > I have installed postgre on my computer ,but since morning i am > trying to connect to server through localhost > > everytime it is showing me some error ?permission denied or > connection timed out ,i don't understand what is the reason?Please > tell me how to rectify it

[BUGS]

2011-02-24 Thread MANISH GOYAL
hello sir I have installed postgre on my computer ,but since morning i am trying to connect to server through localhost everytime it is showing me some error ?permission denied or connection timed out ,i don't understand what is the reason?Please tell me how to rectify it