WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Use native data types in database: datetime, jsonb #35

@dwt

Description

@dwt

Hi there,

while working with the Raquel data to do some analytics, we discovered that we would have liked the datatypes to be more specific.

For example, the

  • enqueued_at column is typed big int, even though it contains a timestamp (however, in milliseconds, so not quite).
  • payloadcolumn is typed varchar, even though it contains json.

It's not that it is impossible to convert these into more usable formats (jsonb and timestamp) but the question is why? Wouldn't native types in the database make it easier to work with them? For example converting the milliseconds to dates in sql is surprisingly error prone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions