pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: JSP <jason.palivino@gmail.com>
To: dhanesh.prabha@wipro.com <dhanesh.prabha@wipro.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problem with /usr/local/pgsql/bin/psql
Date: Mon, 24 Apr 2006 20:31:40 +0800
Message-ID: <f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com> (raw)
In-Reply-To: <D9F5C94B9B5B84458C5D2E9CE8FD26FD037F80AF@swagath.wipro.com>
References: <D9F5C94B9B5B84458C5D2E9CE8FD26FD037F80AF@swagath.wipro.com>

have you tried using double quotes on your command instead of that single
quote...

ex. psql -c "insert into table values('a', 'b')"

On 4/19/06, dhanesh.prabha@wipro.com <dhanesh.prabha@wipro.com> wrote:
>
> 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 trouble with the rat race is that even if you win, you're still a rat."
--- Lily Tomlin

view thread (5+ messages)  latest in thread

Message-ID: <f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com>
Permalink:  ../f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com/
Also on:    postgresql.org/message-id/f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jason.palivino@gmail.com, dhanesh.prabha@wipro.com
  Subject: Re: Problem with /usr/local/pgsql/bin/psql
  In-Reply-To: <f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com>
  References: <D9F5C94B9B5B84458C5D2E9CE8FD26FD037F80AF@swagath.wipro.com> <f16343260604240531x26430746xd8e6bdfb566fb69@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox