On Insert Do Instead Select....

From: Daniel Jeffery <daniel(dot)viviotech(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: On Insert Do Instead Select....
Date: 2011-12-30 00:30:21
Message-ID: CAJjQhZCQYp1nBYokc1ySOtXZbDu==gGG=_qPtonh42rhMxeipg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-jdbc

Is it at all possible for an executed insert statement to return a select
statement resultset?

Here's an example table:

*CREATE TABLE test (*
* id integer NOT NULL DEFAULT nextval( 'test_id_seq'::regclass ),*
* column_name text*
*);*
*
*
*
*
Here's the table's rule:

*CREATE RULE replace_test AS ON INSERT TO test WHERE EXISTS( SELECT 1 FROM
test WHERE (column_name = NEW.column_name) ) DO INSTEAD SELECT test.id FROM
test WHERE column_name = NEW.column_name;*
*
*
*
*
How would I get the JDBC driver to return the resultset?

-- Daniel

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2011-12-30 11:06:07 Re: On Insert Do Instead Select....
Previous Message Valentine Gogichashvili 2011-12-29 12:16:44 Type OID search does not support search_path and multiple schemas