pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sam Adams <samadams@myfastmail.com>
To: pgsql-sql@postgresql.org
Subject: Java and Currval
Date: Mon, 02 May 2005 17:30:12 +0100
Message-ID: <1115051412.14477.233176976@webmail.messagingengine.com> (raw)

I'm having trouble getting the currval function to work from a Java
program (or from Postgres at all). I want to get the value of addressid
in the table taddress. The best I seem to be able to come up with is
'SELECT currval(taddress.addressid)'. However this gives me the error
'ERROR:  relation "1" does not exist' or whatever the number should be.
I've tried lots of variations but can't seem to work it out. What am I
doing wrong? Thanks.

-Sam



view thread (4+ messages)  latest in thread

Message-ID: <1115051412.14477.233176976@webmail.messagingengine.com>
Permalink:  ../1115051412.14477.233176976@webmail.messagingengine.com/
Also on:    postgresql.org/message-id/1115051412.14477.233176976@webmail.messagingengine.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: samadams@myfastmail.com
  Subject: Re: Java and Currval
  In-Reply-To: <1115051412.14477.233176976@webmail.messagingengine.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