Skip to content

Postgres support? #37

Description

@kershner

Hey there!

Is this bundle incompatible with Postgres? I'm all the way through the installation process but Symfony is throwing an error:

An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT YEAR(published_at) as year, MONTH(published_at) as month, COUNT(*) as num
FROM blog_article
WHERE status = 'published'
GROUP BY YEAR(published_at), MONTH(published_at)
ORDER BY year DESC, month DESC':

SQLSTATE[42883]: Undefined function: 7 ERROR: function year(timestamp without time zone) does not exist
LINE 1: SELECT YEAR(published_at) as year, MONTH(published_at) as mo...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.").

I don't think year(timestamp) is a function in Postgres. So was this thing built exclusively for MySQL? Or is there a configuration setting I'm missing somewhere? Thank you!

EDIT
Narrowed it down to this model repository so far, which does indeed seem to be using MySQL-exclusive syntax.

Not a big deal to simply override the method in my own repository, but you guys might wanna give a heads up about it in the docs.

Activity

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