Skip to content

Add support for week function on PostgreSQL backend #675

Closed

Description

@andyquinterom

Add support for week function to be translated in PostgreSQL backend. This should be fairly easy to do since PostgreSQL has a native implementation of this.

As specified in Postgres documentation, we can extract the week from a Date column with the following:

SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 7

We can easily implement this directly into the backend.

Activity

  1. mgirlich commented on Apr 5, 2022

    @mgirlich
    Collaborator

    I added a PR for this. Note that SELECT EXTRACT(WEEK FROM TIMESTAMP '2001-02-16 20:38:40'); is not the equivalent of week() but of isoweek().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions