Re: Problemas with update sentence in postgres from jdbc

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Joksan Nempu Fernandez <jnempu(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problemas with update sentence in postgres from jdbc
Date: 2008-04-05 05:13:41
Message-ID: 47F70A85.3090107@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Joksan Nempu Fernandez wrote:
> Hi:
>
> I try this ...
>
> String sql ="UPDATE crupier "+
> "SET c_estado='"+cestado+"' WHERE "+
> " c_rut='"+crut+"' ";
>
> and send me the next exception Error:
>
> 04-04-2008 07:00:03 PM Persistencia.Mesa ActualizarTupla
> GRAVE: null
> org.postgresql.util.PSQLException: ERROR: el valor de array debe comenzar
> con «{» o información de dimensión
>
If I'm not mistaken that's complaining that the array must (begin with?)
{ . There don't seem to be any arrays in your query.

Try turning on query logging in the database and obtaining the query,
and the error, from the PostgreSQL logs. It's possible that the query
you're writing isn't exactly what's being sent, especially since it
sounds like you're using a persistence layer. As it is, we can't see the
values of your variables or what the final SQL being sent is. Even the
output of System.out.println(sql) would be helpful, though not as good
as information from the database logs.

If you set your locale to English for the testing you would probably get
a better response too.

Please also post the output of running "\d crupier" in psql.

--
Craig Ringer

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2008-04-06 08:19:16 Re: Problemas with update sentence in postgres from jdbc
Previous Message Joksan Nempu Fernandez 2008-04-04 23:06:12 Problemas with update sentence in postgres from jdbc