Re: Need Help for a query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: avin_friends(at)yahoo(dot)com
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: Need Help for a query
Date: 2008-10-31 21:30:12
Message-ID: 28042.1225488612@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

aravind chandu <avin_friends(at)yahoo(dot)com> writes:
> I am
> using this pqxx library for postgresql to run programs.The following is
> the query which i gave to store the data,here data.speed,data.heading
> are float values and data.ttime is timestamp .If i try to run this
> statement I end up with an error below this query.Please help me to
> solve this problem.

> result R1(T1.exec("insert into saveodtdata values( "+data.speed+" , "+data.heading+" , '" +data.ttime+" ' )" ));

> invalid operands of types `const char[33]' and `float' to binary `operator+'make: *** [main2.o] Error 1

You seem to be trying to feed some non-C code to a C compiler.
There's not enough detail here to say what you should be doing instead.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Sergio Borgonovo 2008-10-31 21:46:51 Re: Are there plans to add data compression feature to postgresql?
Previous Message Tom Lane 2008-10-31 21:27:03 Re: Wildly erratic query performance