Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables are not created on Postgres #1323

Closed
Chti-Steph opened this issue Feb 21, 2022 · 3 comments
Closed

Tables are not created on Postgres #1323

Chti-Steph opened this issue Feb 21, 2022 · 3 comments
Labels
🔎 Status: More Info Needed More information is required to figure out the root cause.

Comments

@Chti-Steph
Copy link

Please enter the following details

NocoDB used as docker : true
NocoDB version :
Node: v12.22.6
Arch: x64
Platform: linux
Docker: true
Database: pg
ProjectOnRootDB: false
RootDB: sqlite3
PackageVersion: 0.84.12

Project was created by clicking : New Project by connecting to external database
Database on which spreadsheet is created : pg
OS on which NocoDB is running : Fedora 35 KDE
Database version : Postgres 10

Steps To Reproduce
I am trying to connect nocoDB to postgre in a schema with searchPath. It works fine with the postgres account with dbeaver. But under nocodb, if I use a user account with all rights (in database, schema, table creation), I can't create a table and see it:

  • under dbeaver, the user noco_u is created with all rights on the schema "nocodb" in PG.
  • under nocodb, creation of the project (with "searchPath": ["nocodb"], )=> connection ok, no table present.
  • under nocodb, table creation => error : "create table failed" ; table not visible in noco but created in PG.
  • under PG (dbeaver), creation of 2 tables with the noco_u and postgres account : table created
    => the 2 tables are not visible in nocoDB.
  • delete the project and create a new project. => the 2 tables are visible in Noco, but not the table created via nocodb.

Could you help me to understand why I cannot manage my table with PG users?

If I create a new project with postgre account, table can be created. But I can not use postgres account that give too much access to database.

** sql PG scritp **
CREATE ROLE inc_r_nocodb WITH INHERIT CONNECTION LIMIT -1;
CREATE ROLE inc_nocodb WITH password 'nocoDBPW' CREATEDB INHERIT LOGIN CONNECTION LIMIT -1 in role inc_r_nocodb;
CREATE SCHEMA nocodb AUTHORIZATION inc_r_nocodb;

  • with nocodb under pg
    CREATE TABLE nocodb.table_user_1 (
    id varchar NULL,
    titre varchar NULL
    );

  • with postgres under pg
    CREATE TABLE nocodb.table_postgres_2 (
    id varchar NULL,
    titrepg varchar NULL,
    valeur numeric NULL
    );

Expected behavior

  • Create new table under NocoDB and manage them with user (not postgres account);
  • Manage new table created under PG.

Screenshots
If applicable, add screenshots to help explain your problem.

Join our discord : https://discord.gg/5RgZmkW for realtime help.

@o1lab o1lab added the 🔎 Status: More Info Needed More information is required to figure out the root cause. label Feb 22, 2022
@o1lab
Copy link
Member

o1lab commented Feb 22, 2022

if I use a user account with all rights (in database, schema, table creation), I can't create a table and see it:

This doesn't sound correct, probably you need to check for typos while setting up your pg or nocodb.

@Chti-Steph
Copy link
Author

Hello, there is no typos error because I can see the table created under PG but not the table created with nocodb.

@dstala
Copy link
Member

dstala commented Jan 19, 2023

@Chti-Steph Could you try using latest NocoDB release. If issue persists, we will be glad to help. Closing, as this was observed in very older release of NocoDB.

@dstala dstala closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔎 Status: More Info Needed More information is required to figure out the root cause.
Projects
None yet
Development

No branches or pull requests

3 participants