Re: [BUGS] BUG #1630: Wrong conversion in to_date() function. See

2005-05-02 Thread Karel Zak
Karel PS. for volunteers for the work on new generation of to_char/date(): http://people.redhat.com/kzak/libfmt/libfmt-0.2-03262005.tar.gz -- Karel Zak <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [BUGS] select to_number('1,000', '999,999');

2004-11-23 Thread Karel Zak
ug add some other new... I already work on new version for next release. It will use unit-tests -- I hope it will prevent a lot of bugs like this. > Whatever your opinion is about the behavior of the non-FM format, surely > to_char and to_number should be inverses. Yes. Karel -- Karel Za

Re: [BUGS] Money type not gone?

2004-09-20 Thread Karel Zak
On Mon, 2004-09-20 at 08:36 +, Andreas Pflug wrote: > Karel Zak wrote: > > On Sun, 2004-09-19 at 15:29 -0400, Tom Lane wrote: > > > > > I want to rewrite it for 8.1 as numeric based datetype with some > > formatting extension probably with some internal st

Re: [BUGS] Money type not gone?

2004-09-20 Thread Karel Zak
as numeric based datetype with some formatting extension probably with some internal stuff from to_char() familly. Karel -- Karel Zak http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [BUGS] date validation problem

2004-01-05 Thread Karel Zak
t it ? > > I believe this is an acknowledged bug in to_date, which Karel hasn't > yet got around to fixing. This feature/bug will probably removed/fixed in 7.5. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcas

Re: [BUGS] is this my date problem

2003-10-02 Thread Karel Zak
On Thu, Oct 02, 2003 at 10:04:39AM -0400, Tom Lane wrote: > Karel Zak <[EMAIL PROTECTED]> writes: > > The to_timestamp() do nothing with date/time and use internal > > tm2timestamp() routine only. I don't think that check all date/time > > ranges in to_timestam

Re: [BUGS] is this my date problem

2003-10-02 Thread Karel Zak
se internal tm2timestamp() routine only. I don't think that check all date/time ranges in to_timestamp() is good idea if it's already implemented at the another place in our code. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [BUGS] Date 1973/06/03 Conversion Problem in 7.3.4 and 7.3.2.

2003-09-10 Thread Karel Zak
gt; to_date > > 1973-06-02 > > I test this statement with Postgres 7.3.2 and 7.3.4 packaged withMandrake 9.1 > and Mandrake 9.2RC1 and obtain the same result. > > Can anyone help me? What's happen if you try: test=# select '03/06/1973'

Re: [BUGS] to_timestamp not stable if date string shorter than

2003-09-03 Thread Karel Zak
esting: > > Build CVS tip on RHL 8.0 with --enable-cassert: no bug. > > Build CVS tip on RHL 8.0 without --enable-cassert: bug. It's seems like typical leak... I will try fix it today. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.

Re: [BUGS] No migration path for MONEY

2003-01-29 Thread Karel Zak
try and our currency. It must be very powerful, an example like strfmon() in libc. I think numeric and to_char() is useful already now. Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jcu.cz/~zakkr/ ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [BUGS] Bug #680: NOCREATETABLE

2002-05-28 Thread Karel Zak
to do with reality. I think he can saw it. It's my old patch for 7.0 and some people use it. I have it for 7.0.2 at ftp://ftp2.zf.jcu.cz/users/zakkr/pg/ But somebody else port to 7.1 and maybe fo 7.2 too -- try google or http://archives.postgresql.org. Karel -- Karel Za

Re: [BUGS] text(bool), text(numeric)

2001-11-28 Thread Karel Zak
lumn::text from table > > after :: comes the type you want. I mean original questioner has other problem: t=# SELECT 't'::bool::text; ERROR: Cannot cast type 'boolean' to 'text' test=# SELECT '123'::numeric::text; ERROR: Cannot cast type '

Re: [BUGS] to_date() month translation

2001-06-18 Thread Karel Zak
-mode)option: test=# select to_char(now(), 'Month DD'); to_char -- June 18 (1 row) test=# select to_char(now(), 'FMMonth DD'); to_char - June 18 (1 row) test=# select to_date('12-January-2001','DD-FMMonth-'); to

Re: [BUGS] The ignored "_" character

2001-05-07 Thread Karel Zak
On Mon, May 07, 2001 at 03:01:28AM -0400, [EMAIL PROTECTED] wrote: > Laszlo Kohl ([EMAIL PROTECTED]) reports a bug with a severity of 2 > The lower the number the more severe it is. > > Short Description > The ignored "_" character > > Long Description > Hi, > > I am Laszlo from Hungary. > I h

Re: [BUGS] to_char miscalculation on April Fool's Day, the start of daylight savings

2001-04-04 Thread Karel Zak
On Tue, Apr 03, 2001 at 11:24:02AM -0400, [EMAIL PROTECTED] wrote: > Short Description > to_char miscalculation on April Fool's Day, the start of daylight savings This is common date/time bug in 7.0.x with daylight savings date. Already fixed in 7.1. Thanks Karel --

Re: [BUGS] 7.0.3 max function

2001-03-28 Thread Karel Zak
test=# insert into aaa values ('001'); INSERT 87956 1 test=# insert into aaa values ('002'); INSERT 87957 1 test=# insert into aaa values ('003'); INSERT 87958 1 test=# test=# select max(aa) from aaa; max - 003 (1 row) test=# Karel -- Ka

Re: [BUGS] Wrong formated date on the first day of the Daylight Saving time.

2001-03-27 Thread Karel Zak
01-03-26 > Tuesday 27 Mar 2001 | 2001-03-27 > (4 rows) Note: use quotation marks for non-format masks, it is faster. En example: to_char( jour, '""Day""DD Mon ') Karel -- Karel Zak <[EMAIL PROTECTED]> http://home.zf.jc

Re: [BUGS] date_part('dow', '2001-03-25') ??!

2001-03-26 Thread Karel Zak
On Mon, Mar 26, 2001 at 03:43:49PM +0700, Dmitry Gercog wrote: > Hi! > > Why? > > SELECT date_part('dow', '2001-03-24'); > return '6' > > and > > SELECT date_part('dow', '2001-03-25'); > > ret

Re: [BUGS] NOTICE: pg_setlocale()

2001-02-19 Thread Karel Zak
On Wed, 14 Feb 2001 [EMAIL PROTECTED] wrote: > fmatheus ([EMAIL PROTECTED]) reports a bug with a severity of 3 > The lower the number the more severe it is. > > Short Description > NOTICE: pg_setlocale() > > Long Description > Im a Debian user of postgresql version 7.0.3-4. > libc6 and locale

Re: [BUGS] timestamp/date bug

2001-02-05 Thread Karel Zak
On Sun, 4 Feb 2001, Juan Flynn wrote: > I've come across an odd bug in Postgres 7 (7.0.3 I think) that's probably > best explained with an example: > SELECT to_char(timestamp '23-Mar-2000' + 3, 'Mon DD'); > to_char > - > Mar 25 > (1 row) in 7.1: test=# SELECT to_char(timestamp '23-

Re: [BUGS] some info about char(1)

2001-02-05 Thread Karel Zak
> console. But I didn't found them in pgsql documentation. Is it possible that > this function will be removed in future version of postgresql ? > pps. Can I take description of this function ? As said Tom, ichar() is chr() in 7.1. Lates (devel) docs: http://www.postgresql.org/devel-corner/do

Re: [BUGS] insert char(1) type by different ways.

2001-02-05 Thread Karel Zak
On Sat, 3 Feb 2001, Tom Lane wrote: > "And. Andruikhanov" <[EMAIL PROTECTED]> writes: > > insert into ku values(1, '\000'); > > This cannot work as you expect, because what comes out of the parser is > a string containing a single null character --- and that's fed to a > datatype input routine

Re: [BUGS] round - timestamp bug

2001-01-25 Thread Karel Zak
> radius=# create table x (x timestamp); > CREATE > radius=# insert into x (x) values ('Tue 23 Jan 21:38:59.997 2001'); > INSERT 619178 1 > radius=# select * from x; > x > - > Tue 23 Jan 21:38:60.00 2001 ART > (1 row) > > radius=#

Re: [BUGS] Output of date_part('quarter', date)

2001-01-03 Thread Karel Zak
> I tried to use function date_part('quarter', date) in query and I have > got wrong results - for first quarter I've got all rows from 01.01 to > 31.03 > for second - from from 01.04 to 31.07 (!!!) > for third - from from 01.08 to 30.11 (!!!) > for forth - from from 01.12 to 31.12 (!!!) >

Re: [BUGS] Bug report

2000-12-17 Thread Karel Zak
On Fri, 15 Dec 2000, Bruce Momjian wrote: > I think this is fixed in the current snapshot. > > > I am getting problems when using to_char to convert an int4 to roman numeral > > and to_char to convert a timestamp to a string in a view. The errors > > vary, but it looks like there is some sort o

Re: [BUGS] Re: to_date problems (Re: Favor for Postgres User at WSI)

2000-11-12 Thread Karel Zak
On Sat, 11 Nov 2000, Thomas Lockhart wrote: > > > This case I *would* have expected to produce 1 BC, but nope... > > Where is *guarantee* that the year is 4-digits?! > > There is no guarantee of only four digits, but there is a convention > that two digit years refer to the current/previous/ne

Re: [BUGS] Re: to_date problems (Re: Favor for Postgres User at WSI)

2000-11-08 Thread Karel Zak
On Wed, 8 Nov 2000, Tom Lane wrote: > Karel Zak <[EMAIL PROTECTED]> writes: > >> I dunno whether there is any actual spec for to_date(), but I do agree > >> that if you've specified a 2-digit YY format, something 2000-centric > >> would be more useful

[BUGS] Re: to_date problems (Re: Favor for Postgres User at WSI)

2000-11-08 Thread Karel Zak
On Tue, 7 Nov 2000, Tom Lane wrote: > Kate Collins <[EMAIL PROTECTED]> writes: > >> In other words it is defaulting to the year 0 (actually year 1 BC, since > >> there is no year 0) instead of 2000. > > Hmm, you're right: > > regression=# select to_date( '001112', 'YYMMDD'); > to_date > --

Re: [BUGS] bug in to_char(timestamp, text) for times between 12:00 and 14:00

2000-10-24 Thread Karel Zak
On Sat, 21 Oct 2000, Sam Hokin wrote: > There seems to be a bug in 7.0.2 in the to_char(timestamp,text) function > when one uses the "am" or "pm" template for times between 12:00 and 14:00: AM/PM fixed, fixed, already FIXED! Wait for 7.0.3 or 7.1, please... > template1=# select to_char(times

Re: [BUGS] Bugs in to_char function

2000-10-18 Thread Karel Zak
nown bug in the 7.0 implementation of to_char, and > is long since fixed in development sources. Karel Zak is the author of > to_char and would know for sure. Karel, does it make sense to > back-patch a quick fix for this into REL7_0_PATCHES for the upcoming > 7.0.3 release? If so, c

Re: [BUGS] Bugs in to_char function

2000-10-18 Thread Karel Zak
On Tue, 17 Oct 2000, Tom Rogers wrote: > I wanted to include the following in a select statement: > > to_char(departtime, 'HH12:MI PM') as xdepart Very old story and already fixed in the current CVS. Wait for great 7.1 :-) Karel PS. has this list so

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Karel Zak
> > Looks to me like an off-by-one kind of problem in deciding which > timezone applies to midnight of a transition day. > > regards, tom lane Hmm ... really cool solution. You are right! I was sure that in the my to_() code can't be bug :-)) Thanks.

Re: [BUGS] bug in date_part() function in 6.5.2, 7.0.2

2000-09-06 Thread Karel Zak
> Sample Code > create table oops (date date); > > insert into oops (date) values (to_date('24.03.2000','dd.mm.')); > insert into oops (date) values (to_date('25.03.2000','dd.mm.')); > insert into oops (date) values (to_date('26.03.2000','dd.mm.')); > insert into oops (date) values (t

[BUGS] Re: [PATCHES] to_char() function's bug and it's patch

2000-08-28 Thread Karel Zak
On Thu, 24 Aug 2000, Jaykumar Ahir wrote: > Dear Developers, > First of all my greetings and best wishes for developing such excellent > opensource rdbms and hope you continue your excellent work. I have found the > bug and sending the bug.template file as attachment which contains all the

Re: [BUGS] Bug in to_timestamp()

2000-08-17 Thread Karel Zak
On Wed, 16 Aug 2000, Gqms2 Galway wrote: > > Please enter a FULL description of your problem: > > The to_timestamp function is not working as per the documentation. See the > examples below. > No. It is not bug. Where is in a documentation your

Re: [HACKERS] Re: [BUGS] Unnexpected results using to_number()

2000-07-12 Thread Karel Zak
On Sun, 9 Jul 2000, Tom Lane wrote: > "Andrew Snow" <[EMAIL PROTECTED]> writes: > > # SELECT to_number('12,454.8-', ''); > > pqReadData() -- backend closed the channel unexpectedly. > > In current sources I get a NULL result, which seems to be what the > code author intended originally. However