Re: Is it possible to use keywords (date units) in a function definition?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alistair Johnson <aewj(at)mit(dot)edu>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is it possible to use keywords (date units) in a function definition?
Date: 2020-06-08 22:10:42
Message-ID: CAKFQuwYwjDZLTY1JkkTL-4VtmBdK23-FZzVs7woweP0h+FSDmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 8, 2020 at 2:57 PM Alistair Johnson <aewj(at)mit(dot)edu> wrote:

>
> RETURN EXTRACT(datepart FROM end - start);
> Any ideas? Is this even possible?
>

Use the "date_part" function.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2020-06-08 22:31:26 Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]
Previous Message David Rowley 2020-06-08 21:25:12 Re: When to use PARTITION BY HASH?