Thread: FW: FW: pgsql - query

FW: FW: pgsql - query

From
"srikanth nagaraju"
Date:
Thanks Fernando,

I thought the reply mail-ID is set to the group.

Hi All,
Please see below for the version details.

Regards,
Srikanth
> -----Original Message-----
> From: Fernando Nasser [mailto:fnasser@redhat.com]
> Sent: Tuesday, August 12, 2003 7:26 PM
> To: srikanth nagaraju; fnasser@redhat.com
> Subject: Re: FW: [JDBC] pgsql - query
>
> Hi,
>
> Do you mind posting this to the list?
>
> This way if someone already knows the answer (if it is a version
problem,
> if someone has encountered it before, etc.) you get a propter
response.
>
> Also, whoever in the list has some time will go and look at your
problem.
> I am very busy finishing a project this week so I will not be able to
try
> and help you as fast as you may need.
>
> Best regards,
> Fernando
>
>
>
> srikanth nagaraju wrote:> First time it didn't work, resending it...
> >
> >
> >>Hi Fernando,
> >>
> >>Sorry, I was out of station...
> >>
> >>Please find the sample java file from which I am trying to create
> >
> > tables.
> >
> >>Since the database creation is happening on different setups (both
> >
> > oracle
> >
> >>and postgres), java application is error free.
> >>
> >>Here are the details that you have asked for:
> >>Product:      PostgreSQL 7.2.1
> >>JDBC Info:    PostgreSQL Native Driver PostgreSQL 7.2 JDBC2
> >>Tried with this also-> JDBC Info:    PostgreSQL Native Driver
> >
> > PostgreSQL
> >
> >>7.3.3 JDBC3 jdbc driver build 112
> >>
> >>Please let me know if you need any more info.
> >>
> >>Thanks,
> >>Srikanth
> >>
> >>>-----Original Message-----
> >>>From: Fernando Nasser [mailto:fnasser@redhat.com]
> >>>Sent: Thursday, August 07, 2003 7:40 PM
> >>>To: srikanth nagaraju
> >>>Cc: pgsql-jdbc@postgresql.org
> >>>Subject: Re: [JDBC] pgsql - query
> >>>
> >>>A test case to reproduce the problem please.
> >>>
> >>>And the version of the driver (and where you've got it from and
> >>
> > when),
> >
> >>>as well as the backend version will be helpful.
> >>>
> >>>Regards,
> >>>Fernando
> >>>
> >>>srikanth nagaraju wrote:
> >>>
> >>>>Hi all,
> >>>>
> >>>>
> >>>>
> >>>>I have my java application which accesses the PG DB.
> >>>>
> >>>>
> >>>>
> >>>>I have created the PG database (named ?catt? owned by ?toolsdm?).
> >>>>
> >>>>
> >>>>
> >>>>When, I am trying to create tables (on the ?catt? DB) from my Java
> >>>>application, I am getting the following message on the postmaster
> >>>
> >>>window:
> >>>
> >>>>*NOTICE:  current transaction is aborted, queries ignored until
> >>>
> > end of
> >
> >>>>transaction block*
> >>>>
> >>>>The tables are not created. Also, I don?t get a SQL exception in
> >>>
> > my
> >
> >>Java
> >>
> >>>>application.
> >>>>
> >>>>
> >>>>
> >>>>I logged into the database (to ?catt? as ?toolsdm? user) and was
> >>>
> > able
> >
> >>to
> >>
> >>>>create tables through command line.
> >>>>
> >>>>
> >>>>
> >>>>Please advice.
> >>>>
> >>>>
> >>>>
> >>>>Thanks,
> >>>>
> >>>>------------------
> >>>>
> >>>>/Srikanth N/
> >>>>
> >>>>ESN: 6-872-8711
> >>>>
> >>>>Ph: +91-80-5538301 Extn: 2644
> >>>>
> >>>>-----------------------------------------------------
> >>>>
> >>>>_More Details_:
> >>>>
> >>>>Postgres which comes inbuilt with RedHat Linux 7.3
> >>>>
> >>>>JDBC driver: pg73jdbc3.jar pre-compiled version (tried with
> >>>>pg72jdbc2.jar also)
> >>>>
> >>>>I just included the pg73jdbc3.jar file in my java application
> >>>
> >>classpath.
> >>
> >>>>I have given the database URLs properly.
> >>>>
> >>>>pg_hba.conf: host       all         164.164.24.227 255.255.255.255
> >>>
> >>>trust
> >>>
> >>>>postmaster.opts: /usr/bin/postmaster '-i' '-p' '5432' '-D'
> >>>>'/var/lib/pgsql/data'
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >
**************************Disclaimer************************************
> >
> >>>>Information contained in this E-MAIL being proprietary to Wipro
> >>>
> >>Limited
> >>
> >>>is
> >>>
> >>>>'privileged' and 'confidential' and intended for use only by the
> >>>
> >>>individual
> >>>
> >>>> or entity to which it is addressed. You are notified that any
> >>>
> > use,
> >
> >>>copying
> >>>
> >>>>or dissemination of the information contained in the E-MAIL in any
> >>>
> >>>manner
> >>>
> >>>>whatsoever is strictly prohibited.
> >>>>
> >>>>
> >>>
> >
************************************************************************
> > **
> >
> >>>*
> >>>
> >>>
> >>>--
> >>>Fernando Nasser
> >>>Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> >>>2323 Yonge Street, Suite #300
> >>>Toronto, Ontario   M4P 2C9
> >>
> >
> >
>
>
>
> --
> Fernando Nasser
> Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9


**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.

***************************************************************************

Re: FW: FW: pgsql - query

From
Paul Thomas
Date:
On 12/08/2003 15:02 srikanth nagaraju wrote:
>
> Thanks Fernando,
>
> I thought the reply mail-ID is set to the group.
>
> Hi All,
> Please see below for the version details.
>

Could you post the Java code you are using? Also, try creating a table
using psql, insert some data into it and then see if you can retrieve the
data through JDBC.


--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

Re: FW: FW: pgsql - query

From
Barry Lind
Date:
Srikanth,

Can you provide a test case that demonstrates the problem?

thanks,
--Barry

srikanth nagaraju wrote:
> Thanks Fernando,
>
> I thought the reply mail-ID is set to the group.
>
> Hi All,
> Please see below for the version details.
>
> Regards,
> Srikanth
>
>>-----Original Message-----
>>From: Fernando Nasser [mailto:fnasser@redhat.com]
>>Sent: Tuesday, August 12, 2003 7:26 PM
>>To: srikanth nagaraju; fnasser@redhat.com
>>Subject: Re: FW: [JDBC] pgsql - query
>>
>>Hi,
>>
>>Do you mind posting this to the list?
>>
>>This way if someone already knows the answer (if it is a version
>
> problem,
>
>>if someone has encountered it before, etc.) you get a propter
>
> response.
>
>>Also, whoever in the list has some time will go and look at your
>
> problem.
>
>>I am very busy finishing a project this week so I will not be able to
>
> try
>
>>and help you as fast as you may need.
>>
>>Best regards,
>>Fernando
>>
>>
>>
>>srikanth nagaraju wrote:> First time it didn't work, resending it...
>>
>>>
>>>>Hi Fernando,
>>>>
>>>>Sorry, I was out of station...
>>>>
>>>>Please find the sample java file from which I am trying to create
>>>
>>>tables.
>>>
>>>
>>>>Since the database creation is happening on different setups (both
>>>
>>>oracle
>>>
>>>
>>>>and postgres), java application is error free.
>>>>
>>>>Here are the details that you have asked for:
>>>>Product:      PostgreSQL 7.2.1
>>>>JDBC Info:    PostgreSQL Native Driver PostgreSQL 7.2 JDBC2
>>>>Tried with this also-> JDBC Info:    PostgreSQL Native Driver
>>>
>>>PostgreSQL
>>>
>>>
>>>>7.3.3 JDBC3 jdbc driver build 112
>>>>
>>>>Please let me know if you need any more info.
>>>>
>>>>Thanks,
>>>>Srikanth
>>>>
>>>>
>>>>>-----Original Message-----
>>>>>From: Fernando Nasser [mailto:fnasser@redhat.com]
>>>>>Sent: Thursday, August 07, 2003 7:40 PM
>>>>>To: srikanth nagaraju
>>>>>Cc: pgsql-jdbc@postgresql.org
>>>>>Subject: Re: [JDBC] pgsql - query
>>>>>
>>>>>A test case to reproduce the problem please.
>>>>>
>>>>>And the version of the driver (and where you've got it from and
>>>>
>>>when),
>>>
>>>
>>>>>as well as the backend version will be helpful.
>>>>>
>>>>>Regards,
>>>>>Fernando
>>>>>
>>>>>srikanth nagaraju wrote:
>>>>>
>>>>>
>>>>>>Hi all,
>>>>>>
>>>>>>
>>>>>>
>>>>>>I have my java application which accesses the PG DB.
>>>>>>
>>>>>>
>>>>>>
>>>>>>I have created the PG database (named ?catt? owned by ?toolsdm?).
>>>>>>
>>>>>>
>>>>>>
>>>>>>When, I am trying to create tables (on the ?catt? DB) from my Java
>>>>>>application, I am getting the following message on the postmaster
>>>>>
>>>>>window:
>>>>>
>>>>>
>>>>>>*NOTICE:  current transaction is aborted, queries ignored until
>>>>>
>>>end of
>>>
>>>
>>>>>>transaction block*
>>>>>>
>>>>>>The tables are not created. Also, I don?t get a SQL exception in
>>>>>
>>>my
>>>
>>>
>>>>Java
>>>>
>>>>
>>>>>>application.
>>>>>>
>>>>>>
>>>>>>
>>>>>>I logged into the database (to ?catt? as ?toolsdm? user) and was
>>>>>
>>>able
>>>
>>>
>>>>to
>>>>
>>>>
>>>>>>create tables through command line.
>>>>>>
>>>>>>
>>>>>>
>>>>>>Please advice.
>>>>>>
>>>>>>
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>------------------
>>>>>>
>>>>>>/Srikanth N/
>>>>>>
>>>>>>ESN: 6-872-8711
>>>>>>
>>>>>>Ph: +91-80-5538301 Extn: 2644
>>>>>>
>>>>>>-----------------------------------------------------
>>>>>>
>>>>>>_More Details_:
>>>>>>
>>>>>>Postgres which comes inbuilt with RedHat Linux 7.3
>>>>>>
>>>>>>JDBC driver: pg73jdbc3.jar pre-compiled version (tried with
>>>>>>pg72jdbc2.jar also)
>>>>>>
>>>>>>I just included the pg73jdbc3.jar file in my java application
>>>>>
>>>>classpath.
>>>>
>>>>
>>>>>>I have given the database URLs properly.
>>>>>>
>>>>>>pg_hba.conf: host       all         164.164.24.227 255.255.255.255
>>>>>
>>>>>trust
>>>>>
>>>>>
>>>>>>postmaster.opts: /usr/bin/postmaster '-i' '-p' '5432' '-D'
>>>>>>'/var/lib/pgsql/data'
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
> **************************Disclaimer************************************
>
>>>>>>Information contained in this E-MAIL being proprietary to Wipro
>>>>>
>>>>Limited
>>>>
>>>>
>>>>>is
>>>>>
>>>>>
>>>>>>'privileged' and 'confidential' and intended for use only by the
>>>>>
>>>>>individual
>>>>>
>>>>>
>>>>>>or entity to which it is addressed. You are notified that any
>>>>>
>>>use,
>>>
>>>
>>>>>copying
>>>>>
>>>>>
>>>>>>or dissemination of the information contained in the E-MAIL in any
>>>>>
>>>>>manner
>>>>>
>>>>>
>>>>>>whatsoever is strictly prohibited.
>>>>>>
>>>>>>
>>>>>
> ************************************************************************
>
>>>**
>>>
>>>
>>>>>*
>>>>>
>>>>>
>>>>>--
>>>>>Fernando Nasser
>>>>>Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
>>>>>2323 Yonge Street, Suite #300
>>>>>Toronto, Ontario   M4P 2C9
>>>>
>>>
>>
>>
>>--
>>Fernando Nasser
>>Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
>>2323 Yonge Street, Suite #300
>>Toronto, Ontario   M4P 2C9
>
>
>
> **************************Disclaimer************************************
>
> Information contained in this E-MAIL being proprietary to Wipro Limited is
> 'privileged' and 'confidential' and intended for use only by the individual
>  or entity to which it is addressed. You are notified that any use, copying
> or dissemination of the information contained in the E-MAIL in any manner
> whatsoever is strictly prohibited.
>
> ***************************************************************************
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>



Re: FW: FW: pgsql - query

From
"srikanth nagaraju"
Date:
Hi All,

In my Java application I was setting the AUTOCOMMIT parameter to false.
I was committing after creating a number of tables (~10).  Now that I
have changed the AUTOCOMMIT parameter to true in my Java application,
tables are getting created.

Thanks to all those who gave suggestions and helped me in resolving this
issue.

Here is the Note from the PostgreSQL 7.3.2 Administrators Guide:
Note: As of PostgreSQL 7.3, setting autocommit to false is not
well-supported. This is a new feature and is not yet handled by all
client libraries and applications. Before making it the default setting
in your installation, test carefully.

Thanks,
Srikanth
> -----Original Message-----
> From: Paul Thomas [mailto:paul@tmsl.demon.co.uk]
> Sent: Tuesday, August 12, 2003 8:21 PM
> To: srikanth nagaraju
> Cc: pgsql-jdbc @ postgresql . org
> Subject: Re: FW: FW: [JDBC] pgsql - query
>
>
> On 12/08/2003 15:02 srikanth nagaraju wrote:
> >
> > Thanks Fernando,
> >
> > I thought the reply mail-ID is set to the group.
> >
> > Hi All,
> > Please see below for the version details.
> >
>
> Could you post the Java code you are using? Also, try creating a table
> using psql, insert some data into it and then see if you can retrieve
the
> data through JDBC.
>
>
> --
> Paul Thomas
>
+------------------------------+----------------------------------------
--
> ---+
> | Thomas Micro Systems Limited | Software Solutions for the Smaller
> Business |
> | Computer Consultants         |
> http://www.thomas-micro-systems-ltd.co.uk   |
>
+------------------------------+----------------------------------------
--
> ---+

**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.

***************************************************************************