Skip to content

Idiom for updating column to CURRENT_TIMESTAMP #249

Done

Description

@brandonchinn178

PostgREST supports setting a column to the current timestamp with now() (since postgresql supports casting 'now()'::timestamptz). But the pydantic models generated by supabase type fields as datetime. It would be nice to have an idiomatic technique for doing this.

Some possibilities:

  • postgrest.constants.NOW defined as typing.cast(datetime, "now()")
  • Generate insert/update fields as datetime | str

Activity

  1. o-santi commented on Oct 1, 2026

    @o-santi

    The generated models do not come from this repository. They come from https://github.com/supabase/sdk. I will move this issue there.

  2. spydon commented on Dec 2, 2026

    @spydon
    Contributor
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