Zoltan Boszormenyi | 1 Jul 2005 06:23
Picon
Favicon

Re: libpq enabled psqlodbc

Anoop Kumar írta:
> We made quite some progress with libpq enabled version of psqlodbc.
> 
> Here are the four phases of this:
> 
>  
> 
> Phase 1     Connecting to the database through libpq library
> 
> Phase 2     Mapping the Socket ResultSet class with libpq class
> 
> Phase 3     Using the libpq mapped classes in all the related areas
> 
> Phase 4     Retrieving ResultSet and displaying it to the end user
> 
>  
> 
> We have completed the first three phases and currently working on the 
> fourth one. But lot more work needs to be done as the affected code 
> spans almost the entire odbc code, which needs a thorough checking. I 
> expect the patch to be submitted in next week.
> 
>  
> 
> Regards
> 
>  
> 
> Anoop

(Continue reading)

Anoop Kumar | 1 Jul 2005 07:06

Re: libpq enabled psqlodbc

Hi Jonathan,

 

Thanks!

 

Currently the plan is to convert the socket code to libpq enabled code, without any enhancements. We may do the enhancements those you suggested after finishing all the phases and posting the patch to the community.

 

Regards

 

Anoop

 

 

-----Original Message-----
From: pgsql-odbc-owner <at> postgresql.org [mailto:pgsql-odbc-owner <at> postgresql.org] On Behalf Of Jonathan Fuerth
Sent:
Thursday, June 30, 2005 7:55 PM
To: Anoop Kumar
Cc: pgsql-odbc <at> postgresql.org
Subject: Re: [ODBC] libpq enabled psqlodbc

 

On Jun 30, 2005, at 1:01 AM, Anoop Kumar wrote:

 

We have completed the first three phases and currently working on the fourth one. But lot more work needs to be done as the affected code spans almost the entire odbc code, which needs a thorough checking. I expect the patch to be submitted in next week.

 

Anoop, that's great news!

 

Will this patch enable any of the new protocol features, such as sqlstate error codes from the backend, rollback to savepoint, and real prepared statements?

 

I look forward to this update!

 

-Jonathan

 

Joel Fradkin | 1 Jul 2005 14:44

What to do about errors returned by odbc

I am running 8.0.3 database with 7.4 odbc.

I am working on getting my ASCII over to Unicode so I can use the newer odbc.

I get on a too often basis the ODBC lock up on the IIS server (I can re-boot IIS and see ODBC come back).

The machine is not out of memory (4 gig Dell running win2k, database is on a 8 gig redhat box).

Unfortunately I display the error returned from the object and it includes the text “Catastrophic Error”.

This has been bad and I need to fix it, but I believe if I understand my initial research it is actually an error from MS (either IIS or the ODBC layer).

Since it does not appear to be a memory issue (last time I had it happen the machine was at 500 meg of 2 gig used by IIS) I am looking for ideas as what to look for.

Our application was on MSSQL and did not have errors with the odbc (servers were very stable) to MSSQL.

I have us converted and eliminated most of the application type errors from the conversion, but the odbc to postgres I think is our issue (may be how we have it coded).

I am not using any kind of pooling (not sure if IIS does this on its own as I do not see a million connections and we generally have 200+ concurrent users).

Any ideas I can research would be greatly appreciated.

 

Joel Fradkin

 

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305

 

jfradkin <at> wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments.

 


 

 

Joel Fradkin | 1 Jul 2005 20:30

Re: [ADMIN] encoding converting from ascii to unicode (I got it

I finally got it to work. I tested the unicode database with the newer odbc drivers as well.

It is working ok as far asp pages now.

 

        Dim ascii As Encoding = Encoding.ASCII

        Dim [unicode] As Encoding = Encoding.Unicode

        Dim unicodeBytes As Byte() = [unicode].GetBytes(asciiString)

        sqltounicode = [unicode].GetString(unicodeBytes)

 

This worked in a .net app using ascii (do not specify the encoding on this connection) read and Unicode write (specify Encoding=UNICODE;).

 

Any one know if I will run into any other issues using a unicode database (is sqlascii now).

I use zeos for Delphi, and

Java I use:

            static String driver = "org.postgresql.Driver";

            static String url = "jdbc:postgresql://192.168.123.121/wazagua";

 

Just want to make sure my .net, asp , java and Delphi stuff will not break switching to Unicode.

I am switching because I hope the new odbc drivers work better for us (we have seen IIS crash from time to time, where we did not before switching to postgres).

 

 

Joel Fradkin

 

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, F
lorida 34243
Tel.  941-753-7111 ext 305

 

jfradkin <at> wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments.

 


 

-----Original Message-----
From: pgsql-admin-owner <at> postgresql.org [mailto:pgsql-admin-owner <at> postgresql.org] On Behalf Of
Joel Fradkin
Sent: Friday, July 01, 2005 8:09 AM
To:
pgsql-admin <at> postgresql.org
Subject: [ADMIN] encoding converting from ascii to unicode

 

I have been trying to get unicode to work for us (we moved from MSSQL and had to initially use ascii because it would blow up writing the French chars when I built my data base).

 

I have a .net app that reads my tables and does insert statements into a Unicode database.

The actual conversion is being done with this code:

 

        Dim ascii As Encoding = Encoding.ASCII

        Dim [unicode] As Encoding = Encoding.Unicode

        ' Convert the string into a byte[].

        Dim asciiBytes As Byte() = ascii.GetBytes(asciiString)

        ' Perform the conversion from one encoding to the other.

        Dim unicodeBytes As Byte() = Encoding.Convert(ascii, [unicode], asciiBytes)

        sqltounicode = [unicode].GetString(unicodeBytes)

 

So read in ascii and have :

Dim cnnunicode As New NpgsqlConnection("Server=" + TextBoxunicodeserver.Text + ";Port=5432;User Id=postgres;Password=;Database=" + TextBoxunicodedbname.Text + ";Encoding=UNICODE;")

To open up my Unicode connection that I use for writing.

If I observe the string using the debugger it looks like French when I read it from the ascii database.

If I do not convert it, it gives a byte sequence error, If I run the conversion above the French turns into question marks.

 

I am sorry for asking this so many times, but what do I have to do to get the French to look like French and in the Unicode database.

 

One of my goals is to be able to use the 8.0 odbc drivers which return question marks for French chars (the 7.4 odbc driver does not turn them into question marks it reads the French ascii ok).

 

Any help is much appreciated.

 

 

 

Joel Fradkin

 

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305

 

jfradkin <at> wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments.

 


 

 

Merlin Moncure | 1 Jul 2005 22:49

Re: delphi access question?

> 
> Hate to fix it so the new odbc drivers work, but my Delphi application
> doesn't.
> Also if you had any experience with the newer odbc drivers and Unicode
in
> regards to issues I might see.
> I tested my web page using a converted record (Unicode database) and
it is
> showing up ok now, but the old odbc will not display it, so I will not
be
> able to switch back easily.

Zeos support for Unicode/postgresql is partial:
http://web10086.xolphin.net/index.php?option=com_simpleboard&Itemid=&fun
c=view&catid=101&id=1339#1339

however things may have improved since then. ymmv.

I expect the new odbc driver should fix a lot of your odbc related
problems.  It's been a long time coming.

Merlin

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo <at> postgresql.org

Joel Fradkin | 1 Jul 2005 22:57

Re: delphi access question?

Is there a new one out?
I was speaking of 8.0 vrs 7.4
I did just install the latest 8.0.3 win32 version of postgres and am using
the odbc that comes with it.

I guess I will test the Delphi app prior to getting excited about my last
victory of getting my data in a Unicode database.

Thanks for getting back in touch.

Joel Fradkin

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305

jfradkin <at> wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.

-----Original Message-----
From: Merlin Moncure [mailto:merlin.moncure <at> rcsonline.com] 
Sent: Friday, July 01, 2005 3:49 PM
To: Joel Fradkin
Cc: pgsql-odbc <at> postgresql.org
Subject: RE: [ODBC] delphi access question?

> 
> Hate to fix it so the new odbc drivers work, but my Delphi application
> doesn't.
> Also if you had any experience with the newer odbc drivers and Unicode
in
> regards to issues I might see.
> I tested my web page using a converted record (Unicode database) and
it is
> showing up ok now, but the old odbc will not display it, so I will not
be
> able to switch back easily.

Zeos support for Unicode/postgresql is partial:
http://web10086.xolphin.net/index.php?option=com_simpleboard&Itemid=&fun
c=view&catid=101&id=1339#1339

however things may have improved since then. ymmv.

I expect the new odbc driver should fix a lot of your odbc related
problems.  It's been a long time coming.

Merlin

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo <at> postgresql.org so that your
       message can get through to the mailing list cleanly

Marko Ristola | 2 Jul 2005 09:17
Picon
Picon

Re: What to do about errors returned by odbc


This might be a memory issue on 32bit computers.
psqlodbc loads the whole query result into memory by default,
on Windows too.

IIS or Windows might supply memory at most 1-3 gigabytes for the CGI binary.
So the actual upper limit might actually be much less, than 4G.

This can be overcome by using ODBC directives like:

Fetch = 2048
UseDeclareFetch = 1

Regards,
Marko Ristola

Joel Fradkin wrote:

> I am running 8.0.3 database with 7.4 odbc.
>
> I am working on getting my ASCII over to Unicode so I can use the
> newer odbc.
>
> I get on a too often basis the ODBC lock up on the IIS server (I can
> re-boot IIS and see ODBC come back).
>
> The machine is not out of memory (4 gig Dell running win2k, database
> is on a 8 gig redhat box).
>
> Unfortunately I display the error returned from the object and it
> includes the text “Catastrophic Error”.
>
> This has been bad and I need to fix it, but I believe if I understand
> my initial research it is actually an error from MS (either IIS or the
> ODBC layer).
>
> Since it does not appear to be a memory issue (last time I had it
> happen the machine was at 500 meg of 2 gig used by IIS) I am looking
> for ideas as what to look for.
>
> Our application was on MSSQL and did not have errors with the odbc
> (servers were very stable) to MSSQL.
>
> I have us converted and eliminated most of the application type errors
> from the conversion, but the odbc to postgres I think is our issue
> (may be how we have it coded).
>
> I am not using any kind of pooling (not sure if IIS does this on its
> own as I do not see a million connections and we generally have 200+
> concurrent users).
>
> Any ideas I can research would be greatly appreciated.
>
> Joel Fradkin
>
> Wazagua, Inc.
> 2520 Trailmate Dr
> Sarasota, Florida 34243
> Tel. 941-753-7111 ext 305
>
> jfradkin <at> wazagua.com <mailto:jfradkin <at> wazagua.com>
> www.wazagua.com <http://www.wazagua.com>
> Powered by Wazagua
> Providing you with the latest Web-based technology & advanced tools.
> © 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
> This email message is for the use of the intended recipient(s) and may
> contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> delete and destroy all copies of the original message, including
> attachments.
>
>

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

João Henrique Freitas | 6 Jul 2005 00:39
Picon

iodbc x unixodbc

Hello,

What the diferences between iodbc and unixodbc for the postgresql?
Some document to prove the diferences?

Other question is about versions of postgresql and psqlodbc. What
version os postgresql connect with psqlodbc driver? For example
postgresql 7.4.8 -> psqlodbc-08.00.0101.tar.gz ?

Thanks

--

-- 
-------------------------------------------------------------
João Henrique Freitas - joaohf_at_gmail.com
Americana-SP-Brasil
BSD051283
http://www.livejournal.com/users/joaohf/

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

C Funky | 9 Jul 2005 01:10
Picon

Problems with ODBC and ASP .NET 2.0

Hi guys

I've got a ASP .NET application running on Windows Server 2003
accessing Postgresql (version 8.0) through ODBC on the 7.4 drivers and
I've run into a bit of a problem. Under very light loads (a couple
connections per hour) the application works fine. However, as the load
increases, I start getting ODBC exceptions occasionally when the
application tries to open a new connection. The exception contains no
information other than something about being unable to determine the
driver version. When this error first started popping up I'd have to
restart the postmaster service for anything to work. Then, after
turning on ODBC connection pooling and setting a timeout of 10 s, I
could just wait a couple seconds, retry creating the connection and
everything would work fine. Does anyone out there have any idea why
this might be happening? I'm pretty new to Postgresql, so please
forgive me if this is something super obvious that I've just missed.

Thanks,
Chris

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Greg Campbell | 9 Jul 2005 02:30

Re: Problems with ODBC and ASP .NET 2.0

Not too sure I can help you.
After looking into what was available I decided to use the Npgsql 
instead of ODBC. It is very much more ADO.NET centric.
I have a app running for a couple of months continuous with moderate 
load with nary a glitch.

I trust pooling to work, so all my "connect - do something - drop 
connection" are very short, and used a lot, natch.

C Funky wrote:
> Hi guys
> 
> I've got a ASP .NET application running on Windows Server 2003
> accessing Postgresql (version 8.0) through ODBC on the 7.4 drivers and
> I've run into a bit of a problem. Under very light loads (a couple
> connections per hour) the application works fine. However, as the load
> increases, I start getting ODBC exceptions occasionally when the
> application tries to open a new connection. The exception contains no
> information other than something about being unable to determine the
> driver version. When this error first started popping up I'd have to
> restart the postmaster service for anything to work. Then, after
> turning on ODBC connection pooling and setting a timeout of 10 s, I
> could just wait a couple seconds, retry creating the connection and
> everything would work fine. Does anyone out there have any idea why
> this might be happening? I'm pretty new to Postgresql, so please
> forgive me if this is something super obvious that I've just missed.
> 
> Thanks,
> Chris
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
Attachment (greg.campbell.vcf): text/x-vcard, 241 bytes

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo <at> postgresql.org so that your
       message can get through to the mailing list cleanly

Gmane