On shell, I changed the user to the postgres user, and I accessed my desired DATABASE, with "psql db_name", I want now to access tables of "db_name" , so as to access the openerp views table for example.
Wich command line necessary to do that ? I'm on ubuntu server 12.04 LTS.
First You can check available database list using \l command(ie. backslash el)
Now type the below command to connect/select a desired database: here i try to connect to the testdb database:
Then a message appears --> You are now connected to database "testdb" as user "postgres"
After this you can enter your query...
You can use \dt to lists all tables in the current database
I'm now able to list the tables of a database, the purpose of this manipulation is because of an issue :
I deleted a custom field x_entrpt, via the configuration module, but the field x_entrpt still exist on the view, so it generated xml architecture error, and now I am enable to connect to my openerp erp account via web client.
The field deleted still exist on the res_users view, so now I decided to enter the res_users view, from pgsql, there is a table ir_ui_view, it contains all the views of the current database, I need to access the views table, and delete from the res_users view the field x_entrpt.
I need to know the sql query to do that. thanks.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/17/14, 6:42 AM|
|Seen: 1686 times|
|Last updated: 3/16/15, 8:10 AM|