Re: novice question about current_time()

From: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
To: SJohnson6(at)bcbsm(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: novice question about current_time()
Date: 2002-11-04 16:02:41
Message-ID: 20021104170241.5f50adc7.christoph.dalitz@hs-niederrhein.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Date: Mon, 4 Nov 2002 10:46:00 -0500
> From: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
>
> I have a query where I'd like to know how much time
> has passed from me launching and ending the query.
>
> So, in the script, I have:
>
> [snip]
> select 'begin', current_time();
> [/snip]
>
> What seems to be happening is that when I launch the
> script, it hangs ... nothing seems to be happening. I
>
This is a consequence of a brain dead ANSI SQL standard which tries to make
SQL as similiar to spoken English as possible (eg. CAST(bla AS int) etc.).

ANSI-SQL requires the ommittance of the parenthesis. Thus the
following should work:

select 'begin', current_time;

Christoph Dalitz

Browse pgsql-general by date

  From Date Subject
Next Message Chris Gamache 2002-11-04 16:10:22 Re: copy limited number of records
Previous Message Jean-Luc Lachance 2002-11-04 15:50:29 Re: unique in two not so unique columns