Received: from xxx-bfhxx-ms001.mowlem.com (mail.bcmsjv.com [194.6.9.65] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBEG26011248 for ; Thu, 14 Dec 2000 11:02:06 -0500 (EST) (envelope-from Ben.Trewern@mowlem.com) Received: from xxx-bfhxx-ex002.mowlem.com (unverified) by xxx-bfhxx-ms001.mowlem.com (Content Technologies SMTPRS 4.1.2) with ESMTP id for ; Thu, 14 Dec 2000 16:06:00 +0000 Received: by XXX_BFHXX_EX002 with Internet Mail Service (5.5.2650.21) id ; Thu, 14 Dec 2000 16:02:43 -0000 Message-ID: <996802F75C3CD411B424001083FA445B05950A@CET_PONXX_FP001> From: "Trewern, Ben" To: pgsql-sql@postgresql.org Subject: RE: to_char() causes backend to close connection Date: Thu, 14 Dec 2000 16:02:20 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C065E7.4A8BE30A" X-Archive-Number: 200012/148 X-Sequence-Number: 482 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C065E7.4A8BE30A Content-Type: text/plain; charset="iso-8859-1" select to_char(now()-'5 minutes'::interval,'YYMMDDHH24MI') seems to work Ben > -----Original Message----- > From: Kovacs Zoltan Sandor [mailto:tip@pc10.radnoti-szeged.sulinet.hu] > Sent: 14 December 2000 15:49 > To: Karel Zak > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] to_char() causes backend to close connection > > > > A problem (IMHO it's not problem) with 'now()::abstime' is > in 7.1 too. > > But why you not use directly now()? > My aim is to get this format for the time '5 minutes ago'. So I need > something like > > select to_char(now()-'5 minutes','YYMMDDHH24MI') > > but this doesn't work due to the missing type conversion. > > Any idea? TIA, Zoltan > ------_=_NextPart_001_01C065E7.4A8BE30A Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [SQL] to_char() causes backend to close connection

select to_char(now()-'5 minutes'::interval,'YYMMDDHH24MI'= ) seems to work

Ben

> -----Original Message-----
> From: Kovacs Zoltan Sandor [mailto:tip@pc10.radnoti-szeged.sulinet.hu]
> Sent: 14 December 2000 15:49
> To: Karel Zak
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] to_char() causes backend to clos= e connection
>
>
> >  A problem (IMHO it's not problem) with '= now()::abstime' is
> in 7.1 too.
> > But why you not use directly now()?
> My aim is to get this format for the time '5 minute= s ago'. So I need
> something like
>
> select to_char(now()-'5 minutes','YYMMDDHH24MI')
>
> but this doesn't work due to the missing type conve= rsion.
>
> Any idea? TIA, Zoltan
>

------_=_NextPart_001_01C065E7.4A8BE30A--