Skip to content

Doesn't work with Postgres because a table is named "user" #3

@alexsegura

Description

@alexsegura

I'm having the following error when trying to login:

Capture d’écran 2022-06-08 à 18 32 07

It's because "user" is a reserved keyword, and should be quoted when executing the query, or it returns the currently connected user.

dabba=# select * from user;
   user
----------
 postgres
(1 row)
dabba=# select * from "user";
 id | owned_zone_id | zone_id | email | password | firstname | lastname | dob | is_verified | roles | wallet | fidelity | created_at
----+---------------+---------+-------+----------+-----------+----------+-----+-------------+-------+--------+----------+------------
(0 rows)

Which database engine are you actually using in production? MariaDB?

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