Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > custom C functi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 15444 of 16172
Post > Topic >>

custom C function problem

by heron@[EMAIL PROTECTED] ("Dan \"Heron\" Myers") May 3, 2008 at 11:27 AM

I'm creating some custom C functions to load dynamically from a dll 
(this is Postgres 8.3.1 on Windows XP SP2).  I have two that work fine, 
but any time I try to write one that uses a text*, postgres crashes. 
This is true even for the example functions like "copytext" given in the 
do***entation here:
http://developer.postgresql.org/pgdocs/postgres/xfunc-c.html

I'm compiling my DLL with MinGW.  I do CREATE FUNCTION as described in 
the do***entation, and then I do a "SELECT copytext(colname) FROM 
tablename" (colname is a text column), at which point Visual Studio's 
"Something in postgres.exe crashed.  Do you want to debug?" dialog pops 
up.  (Of course, I click no and postgres appears to restart itself.)

Again, I have two other functions (neither of which uses a text*), both 
of which I can successfully load into postgres (from the same dll file 
as the function that crashes) and use in queries without problems.

Does anyone have any idea why this is happening?

- Dan

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 6 Posts in Topic:
custom C function problem
heron@[EMAIL PROTECTED]   2008-05-03 11:27:36 
Re: custom C function problem
tgl@[EMAIL PROTECTED] (T  2008-05-03 13:50:35 
Re: custom C function problem
heron@[EMAIL PROTECTED]   2008-05-03 11:58:41 
Re: custom C function problem
tgl@[EMAIL PROTECTED] (T  2008-05-03 15:46:46 
Re: custom C function problem
heron@[EMAIL PROTECTED]   2008-05-03 18:20:50 
Re: custom C function problem
tgl@[EMAIL PROTECTED] (T  2008-05-03 21:04:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 13:24:15 CDT 2008.