Featured
-
No Featured Found!
Tags
Manage old database to new database in PostgreSQl (OpenERP)
In OpenERP if users manage old database to new database and delete all record in old database and use this database in new financial year so using database query in Postgresql framework to manage database. This is very helpful for new financial y...
How to resolve Registry issue in Postgres
If on installing OpenERP 6.1 using all-in-one setup, pgAdmin is note getting installed or you are not
able to select pgadmin while installation then you might be having a registy issue with postgres
application. To solve this king of problem....
How to setup a postgreSQL in OpenERP
The default superuser for PostgreSQL is called postgres. You may need to login as this user first.
Than use this commond in terminal
openerp@ubuntu:/$ sudo su postgres
password: XXXXXXXXXX
Now create PostgreSQL user openerp using the fo...
Frequently used commands in Postgres database with psql command line tool
Connect to local server using psql command line tool with postgres user.
sudo -u postgres psql postgres
To set/change password of postgres user
\password
To check/list all databases
\list or \l
To see/list all tables in current...
Renaming a database in PostgreSQL
For renaming a database in pgAdmin:
Go to pgadmin and select 'postgres' database and click on the query tool; run the query:
ALTER DATABASE old_dbname RENAME TO new_dbname
Example:
ALTER DATABASE test_ky RENAME TO kwality(14-15)
Database creation using PostgreSQL
Database creation using PostgreSQL
To start work with postgres, you need to install Postgres. To download PostgreSQL 9.1, go through below link:
Download
To check that you are able to access psql, open cmd and fire command psql.
If you ...
Avoiding gap in ids for a table in OpenERP PostgreSQL
Sometimes when we delete few or all records from a table, we may want ids of records to be in sync with the last record or the first one, but what we get is that new ids with a significant amount of gap have been generated, for example if it shou...
Access PostgreSQL using IP address
To add a new server connection using an IP address, you need to follow these steps:
Go to the folder PostgreSQL/data, and edit the file postgresql.conf, add the following line at the end of the file and save:
listen_addresses = '*' ...
How to import/export data using CSV in PostgreSQL
To export a table data from Postgres database to a CSV file, use the "COPY to" command. You can create a CSV file using MS-Excel or directly create a file from the command.
Syntax: COPY (SELECT * FROM table_name) to E'C:\Users\main\Documents\...