pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
(no subject)
4+ messages / 3 participants
[nested] [flat]

* (no subject)
@ 2007-01-10 13:16 vasylenko@uksatse.org.ua
  2007-01-10 13:32 ` Re: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 4+ messages in thread

From: vasylenko@uksatse.org.ua @ 2007-01-10 13:16 UTC (permalink / raw)
  To: pgsql-jdbc



Such declaration like this

id int4 NOT NULL DEFAULT nextval('seq_group_id'::regclass)
and
CONSTRAINT i_group PRIMARY KEY (id)

give me the oportumity don't bother about unique value of id
and use another query.

INSERT INTO  groups(g_name) VALUES("new group");

I hope to find the same easy way in using ResultSet's objects (), i.e. to
forget about id in my code until it nessesary for me and not for jdbc.


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re:
  2007-01-10 13:16 (no subject) vasylenko@uksatse.org.ua
@ 2007-01-10 13:32 ` Dave Cramer <pg@fastcrypt.com>
  2007-01-10 14:26   ` Re: Andres Olarte <olarte.andres@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Dave Cramer @ 2007-01-10 13:32 UTC (permalink / raw)
  To: vasylenko@uksatse.org.ua; +Cc: pgsql-jdbc

What you are looking for is in hibernate, or some other high level  
persistence framework . In JDBC you have to do all the work.

Dave

On 10-Jan-07, at 8:16 AM, vasylenko@uksatse.org.ua wrote:

>
>
> Such declaration like this
>
> id int4 NOT NULL DEFAULT nextval('seq_group_id'::regclass)
> and
> CONSTRAINT i_group PRIMARY KEY (id)
>
> give me the oportumity don't bother about unique value of id
> and use another query.
>
> INSERT INTO  groups(g_name) VALUES("new group");
>
> I hope to find the same easy way in using ResultSet's objects (),  
> i.e. to
> forget about id in my code until it nessesary for me and not for jdbc.
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that  
> your
>        message can get through to the mailing list cleanly




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re:
  2007-01-10 13:16 (no subject) vasylenko@uksatse.org.ua
  2007-01-10 13:32 ` Re: Dave Cramer <pg@fastcrypt.com>
@ 2007-01-10 14:26   ` Andres Olarte <olarte.andres@gmail.com>
  2007-01-10 15:36     ` Re: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Andres Olarte @ 2007-01-10 14:26 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: vasylenko@uksatse.org.ua; pgsql-jdbc

You can do the same with JDBC.  Don't set a value for your id column
in the ResultSet.  The backend will do it for you.

On 1/10/07, Dave Cramer <pg@fastcrypt.com> wrote:
> What you are looking for is in hibernate, or some other high level
> persistence framework . In JDBC you have to do all the work.
>
> Dave
>
> On 10-Jan-07, at 8:16 AM, vasylenko@uksatse.org.ua wrote:
>
> >
> >
> > Such declaration like this
> >
> > id int4 NOT NULL DEFAULT nextval('seq_group_id'::regclass)
> > and
> > CONSTRAINT i_group PRIMARY KEY (id)
> >
> > give me the oportumity don't bother about unique value of id
> > and use another query.
> >
> > INSERT INTO  groups(g_name) VALUES("new group");
> >
> > I hope to find the same easy way in using ResultSet's objects (),
> > i.e. to
> > forget about id in my code until it nessesary for me and not for jdbc.
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> >        subscribe-nomail command to majordomo@postgresql.org so that
> > your
> >        message can get through to the mailing list cleanly
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re:
  2007-01-10 13:16 (no subject) vasylenko@uksatse.org.ua
  2007-01-10 13:32 ` Re: Dave Cramer <pg@fastcrypt.com>
  2007-01-10 14:26   ` Re: Andres Olarte <olarte.andres@gmail.com>
@ 2007-01-10 15:36     ` Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Dave Cramer @ 2007-01-10 15:36 UTC (permalink / raw)
  To: Andres Olarte <olarte.andres@gmail.com>; +Cc: vasylenko@uksatse.org.ua; pgsql-jdbc

Andres,

what he is looking for is to not have to select the id and still have  
the rowset work.

Dave
On 10-Jan-07, at 9:26 AM, Andres Olarte wrote:

> You can do the same with JDBC.  Don't set a value for your id column
> in the ResultSet.  The backend will do it for you.
>
> On 1/10/07, Dave Cramer <pg@fastcrypt.com> wrote:
>> What you are looking for is in hibernate, or some other high level
>> persistence framework . In JDBC you have to do all the work.
>>
>> Dave
>>
>> On 10-Jan-07, at 8:16 AM, vasylenko@uksatse.org.ua wrote:
>>
>> >
>> >
>> > Such declaration like this
>> >
>> > id int4 NOT NULL DEFAULT nextval('seq_group_id'::regclass)
>> > and
>> > CONSTRAINT i_group PRIMARY KEY (id)
>> >
>> > give me the oportumity don't bother about unique value of id
>> > and use another query.
>> >
>> > INSERT INTO  groups(g_name) VALUES("new group");
>> >
>> > I hope to find the same easy way in using ResultSet's objects (),
>> > i.e. to
>> > forget about id in my code until it nessesary for me and not for  
>> jdbc.
>> >
>> > ---------------------------(end of
>> > broadcast)---------------------------
>> > TIP 1: if posting/reading through Usenet, please send an  
>> appropriate
>> >        subscribe-nomail command to majordomo@postgresql.org so that
>> > your
>> >        message can get through to the mailing list cleanly
>>
>>
>> ---------------------------(end of  
>> broadcast)---------------------------
>> TIP 6: explain analyze is your friend
>>
>
> ---------------------------(end of  
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-01-10 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-10 13:16  vasylenko@uksatse.org.ua
2007-01-10 13:32 ` Re: Dave Cramer <pg@fastcrypt.com>
2007-01-10 14:26   ` Re: Andres Olarte <olarte.andres@gmail.com>
2007-01-10 15:36     ` Re: Dave Cramer <pg@fastcrypt.com>

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