Re: C function returns null values

Поиск
Список
Период
Сортировка
Искать
От
Gregor Trefs
Тема
Re: C function returns null values
Дата
Msg-id
5987F6572432A3439988CDF27C6239A60124F7A43D8F@winserver.delphit.com
Ответ на
Список
Дерево обсуждения
C function returns null values Gregor Trefs <gregor.trefs@delphit.com>
Re: C function returns null values Tom Lane <tgl@sss.pgh.pa.us>
Re: C function returns null values Gregor Trefs <gregor.trefs@delphit.com>
Re: C function returns null values Tom Lane <tgl@sss.pgh.pa.us>
Re: C function returns null values Gregor Trefs <gregor.trefs@delphit.com>
Re: C function returns null values Gregor Trefs <gregor.trefs@delphit.com>
Finally I got it working. You were right Tom Lane. I actually did not copy the corrected source file onto the server and thus still had this "mysterious" failure. So, palloc0 is the solution. Thanks again.

Regards,
Gregor Trefs

-----Ursprüngliche Nachricht-----
Von: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] Im Auftrag von Gregor Trefs
Gesendet: Montag, 18. Juli 2011 17:20
Cc: pgsql-general@postgresql.org
Betreff: Re: [GENERAL] C function returns null values 

Well, yes. I wrote a little make file which takes care of this part (except restarting the session):

INCLUDEDIRS += -I$(shell pg_config --includedir-server) LIBDIR = -L$(shell pg_config --libdir) LIBINSTALL = $(shell pg_config --pkglibdir)

integrated_c.so: integrated_c.c Makefile
			gcc -fpic -o integrated_c.o -c integrated_c.c $(INCLUDEDIRS)
			gcc -shared -o integrated_c.so integrated_c.o $(LIBDIR) -lmpfr -lgmp 
			cp integrated_c.so $(LIBINSTALL)

-----Ursprüngliche Nachricht-----
Von: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Gesendet: Montag, 18. Juli 2011 16:33
An: Gregor Trefs
Cc: pgsql-general@postgresql.org
Betreff: Re: [GENERAL] C function returns null values 

Gregor Trefs  writes:
> Thanks for your answer. I edited my code, but still get these random null values. What else can I do ?

Mph ... you're aware that you have to start a fresh session to load a new version of a .so into the backend?

			regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: Identify release contents
От: Albe Laurenz
Дата:
Сообщение: Re: Identify release contents
FAQ