Re: Problem with /usr/local/pgsql/bin/psql

From: <dhanesh(dot)prabha(at)wipro(dot)com>
To: <jason(dot)minion(at)sigler(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem with /usr/local/pgsql/bin/psql
Date: 2006-04-25 04:13:09
Message-ID: D9F5C94B9B5B84458C5D2E9CE8FD26FD03852D69@swagath.wipro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Its working fine now.
Thanks a lot.

Dhanesh Prabha P.V | WIPRO Technologies | Bangalore

+91-80-25056768 | (+91) 9986335390 | Voice Net: 805-4736

-----Original Message-----
From: Jason Minion [mailto:jason(dot)minion(at)sigler(dot)com]
Sent: Monday, April 24, 2006 6:52 PM
To: Dhanesh Prabha (WT01 - CIO OFFICE & OPERATIONS);
pgsql-admin(at)postgresql(dot)org
Subject: RE: [ADMIN] Problem with /usr/local/pgsql/bin/psql

You're using single quotes inside single quotes, you'll need to either
escape them or switch to double-quotes for your outer string delimiter
(preferred). ie:

/usr/local/pgsql/bin/psql -d temp -c "insert into temp.ip_mapping_tb(ip,
location) values('192.100.9.51','First Floor')"

Jason Minion
jason(dot)minion(at)sigler(dot)com

________________________________

From: pgsql-admin-owner(at)postgresql(dot)org
[mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of
dhanesh(dot)prabha(at)wipro(dot)com
Sent: Wednesday, April 19, 2006 5:01 AM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] Problem with /usr/local/pgsql/bin/psql

Hi ,

I am trying to insert data into the table via shell script using
psql command.
But it giving syntax error. the same query is finely working pgAdmin
III client.
The query and error given below.

Eg:
/usr/local/pgsql/bin/psql -d temp -c 'insert into
temp.ip_mapping_tb(ip,location) values('192.100.9.51','FirstFloor')'

ERROR: syntax error at or near ".9" at character 85
LINE 1: ...pping_tb(ip,location) values(192.100.9.51,Firs...

Also when i am givinf Firstfloor as First Floor it was giving
error

/usr/local/pgsql/bin/psql -d temp -c 'insert into
temp.ip_mapping_tb(ip,location) values('192.100.9.51','First Floor')'

psql: FATAL: role "Floor)" does not exist

Thanks and Regards

Dhanesh

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.

www.wipro.com

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

Browse pgsql-admin by date

  From Date Subject
Next Message Jim Nasby 2006-04-25 04:42:00 Re: Regarding installation of postgresql8.1 on windows XP
Previous Message Tom Lane 2006-04-24 22:18:20 Re: FATAL: catalog is missing attributes