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...
Useful PostgreSQL Command
Some Useful PostgreSQL Command in below example->
Backup database-
pg_dump -U geekstuff erp -f mydb.sql
Restore database-
psql -U erp -d erp_devel -f mydb.sql
Change owner of database-
ALTER DATABASE erp_v1 OWNER TO openerp;
...
How to copy data form account_invoice_line table in PostgreSQL
To copy data from account_invoice_line table in account module in PostgreSQL use this code in pgadmin and user can copy data from account_invoice_line table.
Copy account_invoice_lines
copy (SELECT *
FROM
account_invoice_lines
INNER JO...
How to remove old PostgreSQL database server in OpenERP ( Windows 7 ) ?
If you want to remove old PostgreSQL database server in OpenERP from your system follow the below mentioned steps:
Step-1 Go to start menu and click it.
Step-2 Click on programs button.
Step-3 Click Uninstall a program.
Step-4 after that S...
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 merge data from older database to new database in postgresql?
If you want to merging data from older database to new database in PostgreSQL or want to merge data from other database(db1) to another database(db2), follow these below steps:
from db1, export all the necessary tables to csv using:
copy ...
How to restart postgresql database in ubuntu
To restart postgresql database in ubuntu
Run this command in terminal:-
step1- sudo service postgresql
step2- sudo service postgresql restart
use these command to restart postgresql service
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...
Export Postgres table to CSV
Postgres
PostgreSQL is a powerful, open source
object-relational database system. It supports storage of
binary large objects, including
pictures, sounds, or video. It compatible with may of programming interfaces like
PHP, C/C...
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 restore backup from sql script through Postgre console
Restoring backup from sql script through Postgre console is just a 2 step process.They are as follows:
Step 1: psql -h hostname -U username database_name
Step 2: \i filename.sql
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\...