Re: BUG #15536: ERROR: column "value " does not exist

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: "Togou, Hakim" <hakim(dot)togou(at)capgemini(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15536: ERROR: column "value " does not exist
Date: 2018-12-05 14:12:30
Message-ID: CAKFQuwbf+eKA+XyF1C+Pj_BYxcdTYrT_eHsUnGypr-KJ9_VgZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wednesday, December 5, 2018, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> On 2018-Dec-05, Togou, Hakim wrote:
>
> > Hi David,
> > I have already quoted the values, this is my query right now:
> > 'INSERT INTO assetmanagement$asset("id","ticker","fullname")
> > VALUES ('+'12345678910'+','+'test1'+','+'test2'+');
> > It is an execute statement java action.
>
> This is a completely different statement than you first showed --
> completely different quoting in column names and values, etc. You need
> to be very exact and strict about what you post, because one of those
> quoting things is likely the cause of your problem. Don't try to
> transcribe things manually ... you need to copy & paste instead.
>
> You also need to show exactly what is the error message you're
> obtaining. The server log might be useful too.
>
> > I have tried everything to get the insert a record into an postgres db.
> This
> > is my sql query:
> > 'INSERT INTO public."assetmanagement$asset"(ticker, fullname)
> > VALUES (test1,test2);'
>
>
Beyond that use prepared statements in Java for this kind of query.

And as written the java stuff does not have any quoting of values which is
a problem for text data.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Voillequin, Jean-Marc 2018-12-05 14:15:40 RE: BUG #15535: psql: \copy: parse error at...
Previous Message Togou, Hakim 2018-12-05 14:06:34 RE: BUG #15536: ERROR: column "value " does not exist