Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) - additional

2008-07-21 Thread Craig Ringer
el dorado wrote: Hello. Thank you very much for your answer. 1>d:\pgsql83\getstring\c_getstring.c(10) : warning C4273: 'Pg_magic_func' : inconsistent dll linkage 1>d:\pgsql83\getstring\c_getstring.c(10) : see previous definition of 'Pg_magic_func' This should be a big red fla

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) - additional

2008-07-21 Thread el dorado
Hello. Thank you very much for your answer. I found an option "Configuration Properties\C/C++/General/Detect 64-bit Portability Issues". It was set to 'Yes'. I made it 'No'. Now I don't get these warnings about 'type cast'. The result: 1>Compiling... 1>getstring.c 1>d:\pgsql83\getstring\

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) - additional

2008-07-18 Thread Tom Lane
el dorado <[EMAIL PROTECTED]> writes: > (By the way, I can't compile it as C++ Code (/TP) No, you can't. > 1>d:\pgsql83\getstring\c_getstring.c(75) : warning C4311: 'type cast' : > pointer truncation from 'char [8]' to 'Datum' > 1>d:\pgsql83\getstring\c_getstring.c(75) : warning C4312: 'type cas

[GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP) - additional

2008-07-18 Thread el dorado
Hello. I'm trying to create a C-procedure returning text variable - again :). Postgres 8.3.3 (standard binaries - so built by means of MSVC), WinXP SP2. I also use MSVC 2005 for compilation my library. Configuration type - Dynamic Library (.dll) Additional include directories - D:\pgsql83\include;

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread el dorado
I download ready binaries from http://www.postgresql.org/ftp/binary/v8.3.3/win32/ (postgresql-8.3.3-1-binaries-no-installer.zip) So I didn't know exactly which compilier was used. Are these binaries built by means of MSVC? Regards, Marina. > el dorado <[EMAIL PROTECTED]> writes: > > I'd like to

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread Craig Ringer
Alvaro Herrera wrote: Craig Ringer wrote: That said, PostgreSQL does appear to use its own allocator for memory passed across library boundaries, and if it doesn't pass any FILE pointers across library boundaries either then that's the worst two problems that arise with a C runtime mismatc

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread Alvaro Herrera
Craig Ringer wrote: > That said, PostgreSQL does appear to use its own allocator for memory > passed across library boundaries, and if it doesn't pass any FILE > pointers across library boundaries either then that's the worst two > problems that arise with a C runtime mismatch taken care of.

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread Craig Ringer
Tom Lane wrote: el dorado <[EMAIL PROTECTED]> writes: I'd like to write C-function returning text for using in PG 8.3.3. (WinXP SP2) For compilation I use MinGW-5.1.4 (gcc 3.4.5),MSYS-1.0.10. Was the Postgres server you're using built the same way? I seem to recall some incompatibilities betw

Re: [GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread Tom Lane
el dorado <[EMAIL PROTECTED]> writes: > I'd like to write C-function returning text for using in PG 8.3.3. (WinXP SP2) > For compilation I use MinGW-5.1.4 (gcc 3.4.5),MSYS-1.0.10. Was the Postgres server you're using built the same way? I seem to recall some incompatibilities between MinGW and MS

[GENERAL] C-procedure crashed in Postgres 8.3.3 when using 'text' variable (WinXP)

2008-07-15 Thread el dorado
Hello! I'd like to write C-function returning text for using in PG 8.3.3. (WinXP SP2) For compilation I use MinGW-5.1.4 (gcc 3.4.5),MSYS-1.0.10. The code looks like this (in reduced variant): #include "postgres.h" #include "fmgr.h" #include "executor/executor.h" #include "utils/timestamp.h" #incl