Re: Is it possible to use keywords (date units) in a functiondefinition? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Is it possible to use keywords (date units) in a functiondefinition?
Date
Msg-id e5e9dcdf-2d71-a6d0-693a-125f5dd64cce@aklaver.com
Whole thread Raw
In response to Re: Is it possible to use keywords (date units) in a function definition?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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@mit.edu 
> <mailto:aewj@mit.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.klaver@aklaver.com



pgsql-general by date:

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