Re: [HACKERS] ECPG threads test

2007-03-29 Thread Michael Meskes
On Wed, Mar 28, 2007 at 04:56:28PM +0200, Magnus Hagander wrote:
> >From what I can see, the ecpg thread tests (src/interfaces/ecpg/threads)
> don't ever run. They rely on ENABLE_THREAD_SAFETY to be set, but even when
> I build with --enable-thread-safety, it's not set. This is because ecpg
> does not pull in pg_config.h, and also does not specify it on the
> commandline.

It used to include pg_config.h, but we removed it since it was too much
and instead created a file named ecpg_config.h. However, we missed
ENABLE_THREAD_SAFETY there. I just committed a fix.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---(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


Re: [HACKERS] ECPG threads test

2007-03-28 Thread Bruce Momjian
Magnus Hagander wrote:
> Bruce Momjian wrote:
> > Magnus Hagander wrote:
> >> Hi!
> >>
> >> >From what I can see, the ecpg thread tests (src/interfaces/ecpg/threads)
> > 
> > Uh, the directory src/interfaces/ecpg/threads doesn't exist.  I assume
> > you mean src/interfaces/ecpg/test/thread.
> 
> Yes, that's what I mean. Sorry 'bout that.
> 
> 
> >> don't ever run. They rely on ENABLE_THREAD_SAFETY to be set, but even when
> >> I build with --enable-thread-safety, it's not set. This is because ecpg
> >> does not pull in pg_config.h, and also does not specify it on the
> >> commandline.
> > 
> > Yep, that's a problem.  Michael Meskes committed thoses files on
> > 2006/08/02 so I am hoping he can address it.
> 
> Ok. At least I'm not completely lost then.
> 
> I'll see if I can put something together while I do the rest of that
> work, but if Michael (or someone else) has a quick-fix, go ahead.

I believe the solution is to test in the Makefile, and just not call the
thread part at all unless threading is enabled.  Doing the thread test
in the C code is not going to work because it will not produce output
that matches the expected file.

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>  http://momjian.us
  EnterpriseDB   http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

   http://www.postgresql.org/docs/faq


Re: [HACKERS] ECPG threads test

2007-03-28 Thread Magnus Hagander
Bruce Momjian wrote:
> Magnus Hagander wrote:
>> Hi!
>>
>> >From what I can see, the ecpg thread tests (src/interfaces/ecpg/threads)
> 
> Uh, the directory src/interfaces/ecpg/threads doesn't exist.  I assume
> you mean src/interfaces/ecpg/test/thread.

Yes, that's what I mean. Sorry 'bout that.


>> don't ever run. They rely on ENABLE_THREAD_SAFETY to be set, but even when
>> I build with --enable-thread-safety, it's not set. This is because ecpg
>> does not pull in pg_config.h, and also does not specify it on the
>> commandline.
> 
> Yep, that's a problem.  Michael Meskes committed thoses files on
> 2006/08/02 so I am hoping he can address it.

Ok. At least I'm not completely lost then.

I'll see if I can put something together while I do the rest of that
work, but if Michael (or someone else) has a quick-fix, go ahead.

//Magnus

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


Re: [HACKERS] ECPG threads test

2007-03-28 Thread Bruce Momjian
Magnus Hagander wrote:
> Hi!
> 
> >From what I can see, the ecpg thread tests (src/interfaces/ecpg/threads)

Uh, the directory src/interfaces/ecpg/threads doesn't exist.  I assume
you mean src/interfaces/ecpg/test/thread.

> don't ever run. They rely on ENABLE_THREAD_SAFETY to be set, but even when
> I build with --enable-thread-safety, it's not set. This is because ecpg
> does not pull in pg_config.h, and also does not specify it on the
> commandline.

Yep, that's a problem.  Michael Meskes committed thoses files on
2006/08/02 so I am hoping he can address it.

-- 
  Bruce Momjian  <[EMAIL PROTECTED]>  http://momjian.us
  EnterpriseDB   http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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