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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, 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:40:05
Message-ID: e5e9dcdf-2d71-a6d0-693a-125f5dd64cce@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/8/20 3:10 PM, David G. Johnston wrote:
> On Mon, Jun 8, 2020 at 2:57 PM Alistair Johnson <aewj(at)mit(dot)edu
> <mailto:aewj(at)mit(dot)edu>> wrote:
>
>
> RETURN EXTRACT(datepart FROM end - start);
> Any ideas? Is this even possible?
>
>
> Use the "date_part" function.

That would work on the Postgres side, but the OP also wants this to run
on BigQuery and unfortunately it won't work there.

>
> David J.

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2020-06-08 22:55:12 Re: "INSERT ON CONFLICT UPDATE" - Use of indexes ?
Previous Message Adrian Klaver 2020-06-08 22:38:06 Re: Concurrenctly running CREATE TEMP TABLE IF NOT EXISTS [...] AS [...]