Re: Postgresql table aliases

Andrea Bertucci <[email protected]> Thu, 12 Nov 2009 17:37:17 +0100
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
Greg Monroe wrote:
> I also wonder if this isn't a PostGres version issue.  If I remember the 
> SQL standards correctly, the query that PostGres is choking on is perfectly
> valid SQL.  PostGres, like MySQL and the like, have all been working to 
> follow the SQL Standard more closely.  This could be a standards bug in
> your version of PostGres.
>   
Thank you!
Few minutes ago I understand that the problem was a mistake in my code.

In some cases I'm composing the update query using column names defined 
in OM Peer (for some reason I can't use Criteria) and execute query with
executeStatement function.
In this classes, automatically generated by torque using my schema 
definition, each column has a prefix
that is table name. This has generated the query error, because I obtain 
query of the form:
update a set a.b=c
that it's not a right syntax for postgres

I correct the problem deleting table prefix in the query generated by hand.

Andrea.

-- 

Andrea Bertucci
Aitek S.p.A. - Via della Crocetta, 15 - I-16122 Genova
tel.: +39 010 846731 
fax: +39 010 8467350 - e-mail: [email protected]

---
Questo  messaggio di posta elettronica e gli allegati sono riservati e destinati esclusivamente alle persone cui sono indirizzati. Se avete ricevuto questo messaggio per errore, Vi preghiamo di rispedirlo al mittente o cancellarlo dal Vostro sistema. La pubblicazione, l'uso, la diffusione, l'inoltro, la stampa o la copia non autorizzati di questo messaggio e degli allegati sono vietati.

This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back. Unauthorized publication, use, disclosure, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.