Re: [BUGS] PQescapeString and PQescapeBytea not exported during win 32 build

2002-06-04 Thread Rob Butler

I applied the patch, and recompiled postgres, then recompiled my program 
using the PQescapeString function.

My program can now compile fine, but any attempt to run it results in the 
following error message.

"the ordinal 88 could not be located in the Dynamic Link Library libpq.dll"

Rob



>From: Bruce Momjian <[EMAIL PROTECTED]>
>To: Rob Butler <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [BUGS] PQescapeString and PQescapeBytea not exported during 
>win 32 build
>Date: Sun, 2 Jun 2002 18:38:02 -0400 (EDT)
>
>
>Attached patch applied.  Let me know if this is incorrect.
>
>---
>
>Rob Butler wrote:
> > Hello all,
> >
> > Simple "bug"
> >
> > Win 32 builds do not have PQescapeString or PQescapeBytea declared in 
>the
> > libpqdll.def file.  This causes linking against libpqdll.lib to fail if
> > either of the functions are called within a program.  Add entries to the 
>def
> > file for these functions so they are exported during the win 32 build.
> >
> > Thanks
> > Rob
> >
> > _
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
> >
> >
> > ---(end of broadcast)---
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>--
>   Bruce Momjian|  http://candle.pha.pa.us
>   [EMAIL PROTECTED]   |  (610) 853-3000
>   +  If your life is a hard drive, |  830 Blythe Avenue
>   +  Christ can be your backup.|  Drexel Hill, Pennsylvania 19026
>Index: src/interfaces/libpq/libpqdll.def
>===
>RCS file: /cvsroot/pgsql/src/interfaces/libpq/libpqdll.def,v
>retrieving revision 1.14
>diff -c -r1.14 libpqdll.def
>*** src/interfaces/libpq/libpqdll.def  6 Sep 2001 02:54:56 -   1.14
>--- src/interfaces/libpq/libpqdll.def  2 Jun 2002 22:33:03 -
>***
>*** 88,90 
>--- 88,92 
>   PQsetClientEncoding @ 85
>   PQsetnonblocking@ 86
>   PQfreeNotify@ 87
>+  PQescapeString  @ 88
>+  PQescapeBytea   @ 89


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[BUGS] Transaction isolation with concurrent increments

2002-06-04 Thread Nico Erichsen

Well, I'm a relative newbie to SQL, but I have been told that this behaviour 
is a bug. I hope I didn't misunderstand something.


To reproduce, first create a table 'counters' that looks like that:

 counter1
--
0
(1 row)


Then execute the following commands parallelly on two psql terminals:

set transaction isolation level serializable;
begin;
update counters set counter1=(select counter1+1 from counters);

(The second psql terminal will not return from executing the last statement)

Commit on both terminals, then do a select again. The result will be:

 counter1
--
1
(1 row)

Oops! ;-)



If instead I use an update statement like that:

update counters set counter1=counter1+1;

psql behaves like expected, i.E. the result is 2.


-- 
Grüße,

Nico


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [BUGS] Transaction isolation with concurrent increments

2002-06-04 Thread Tom Lane

Nico Erichsen <[EMAIL PROTECTED]> writes:
>   set transaction isolation level serializable;
>   begin;
>   update counters set counter1=(select counter1+1 from counters);

Try it the other way round:

begin;
set transaction isolation level serializable;
update counters set counter1=(select counter1+1 from counters);

Isolation level is a transaction-local setting so the first way doesn't
affect the level the BEGIN block actually uses.  (There is a SET
variable to change the default level for future transactions, but that
ain't what you set here.)

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org