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
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
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
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
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
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
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
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'
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.
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
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
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 '
-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
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
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
--
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
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
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
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
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-
> 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
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
> 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=#
> 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 (!!!)
>
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
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
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
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
> --
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
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
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
>
> 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.
> 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
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
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
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
36 matches
Mail list logo