Cannot simply use PostgreSQL table name (“relation does not exist”)

后端 未结 11 2649
一向
一向 2020-11-22 05:35

I\'m trying to run the following PHP script to do a simple database query:

$db_host = \"localhost\";
$db_name = \"showfinder\";
$username = \"user\";
$passwo         


        
11条回答
  •  悲&欢浪女
    2020-11-22 06:10

    This is realy helpfull

    SET search_path TO schema,public;
    

    I digged this issues more, and found out about how to set this "search_path" by defoult for a new user in current database.

    Open DataBase Properties then open Sheet "Variables" and simply add this variable for your user with actual value.

    So now your user will get this schema_name by defoult and you could use tableName without schemaName.

提交回复
热议问题