HI,
El viernes, 2 de julio de 2010 10:26:43 UTC-3, (desconocido) escribió:
> Hello,
>
> I've got a problem with Functions in C using SPI.
>
> Using: PostgreSQL 8.3, Codeblocks, Windows Server 2003 R2
>
> I compiled the file "pgExampleSPI.c" with the following code
> without any error:
>
> /*
On Mon, Jul 05, 2010 at 10:20:30AM +0200, saitenhe...@web.de wrote:
> Datum count_person(PG_FUNCTION_ARGS) {
> SPI_connect();
> int ret = SPI_exec("SELECT count(*) FROM person", 0);
> SPI_finish();
> PG_RETURN_INT32(ret);
> }
>
> But I guess I still did something wrong, because no matter how many
Hi people,
after a two days break:
I could compile the following code with Visual C++ Express 2010 under Windows
Server 2003 R2:
/* Use 32-bit timer (provided header file uses 64-bit timer, not
* compatible with Windows postgreSQL versions */
#define _USE_32BIT_TIME_T
#define BUILDING_DLL 1
#in
On Sat, Jul 03, 2010 at 09:35:56AM +0800, Craig Ringer wrote:
> On 02/07/10 21:26, saitenhe...@web.de wrote:
>
> > #ifdef PG_MODULE_MAGIC
> > PG_MODULE_MAGIC;
> > #endif
>
> Why the conditional compilation of PG_MODULE_MAGIC?
That's the recommendation, so the module compiles on all versions of
P
On 02/07/10 21:26, saitenhe...@web.de wrote:
> #ifdef PG_MODULE_MAGIC
> PG_MODULE_MAGIC;
> #endif
Why the conditional compilation of PG_MODULE_MAGIC?
> ERROR: incompatible library "G:/PostgreSQL/8.3/lib/pgExampleSPI.dll":
> missing magic block
> TIP: Extension libraries are required to use the
I'll try b) and hope I can find a solution.
Thanks for your support Joe.
Kind Regards, Max.
>On 07/02/2010 08:36 AM, saitenhe...@web.de wrote:
>> Thanks, I've already tried that. I doesn't make any difference. Still the
>> same error.
>>
>> in Visual C++ I can't even compile it, although I se
On 07/02/2010 08:36 AM, saitenhe...@web.de wrote:
> Thanks, I've already tried that. I doesn't make any difference. Still the
> same error.
>
> in Visual C++ I can't even compile it, although I set all links and
> compiler directories like it was told in this post:
> http://www.postgresql.org/
Thanks, I've already tried that. I doesn't make any difference. Still the same
error.
in Visual C++ I can't even compile it, although I set all links and compiler
directories like it was told in this post:
http://www.postgresql.org/docs/8.2/interactive/xfunc-c.html
I don't have more ideas.
Wh
On 07/02/2010 08:13 AM, saitenhe...@web.de wrote:
> Thanks for reply Tom!
>
> I've tried several version:
>
> #define _USE_32BIT_TIME_T
>
> #include "postgres.h"
> #include "fmgr.h"
> #include "executor\spi.h"
>
> /*
> #ifdef PG_MODULE_MAGIC
> PG_MODULE_MAGIC;
> #endif
> */
> but still the sam
Thanks for reply Tom!
I've tried several version:
#define _USE_32BIT_TIME_T
#include "postgres.h"
#include "fmgr.h"
#include "executor\spi.h"
/*
#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif
*/
extern Datum count_person (PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(count_person);
__declspec(dllex
saitenhe...@web.de writes:
> I compiled the file "pgExampleSPI.c" with the following code without any
> error:
> /* Use 32-bit timer (provided header file uses 64-bit timer, not
> * compatible with Windows postgreSQL versions */
> #define _USE_32BIT_TIME_T
> #include "postgres.h"
> #include "exe
Hello,
I've got a problem with user defined functions in C using SPI.
Using: PostgreSQL 8.3.7, Codeblocks (GNU GCC Compiler), Windows Server 2003 R2
I compiled the file "pgExampleSPI.c" with the following code without any error:
/* Use 32-bit timer (provided header file uses 64-bit timer, not
*
Hello,I've got a problem with Functions in C using SPI.Using: PostgreSQL 8.3, Codeblocks, Windows Server 2003 R2I compiled the file "pgExampleSPI.c" with the following code without any error:/* Use 32-bit timer (provided header file uses 64-bit timer, not* compatible with Windows postgreSQL version
13 matches
Mail list logo