From: | Amit Mishra <amit(dot)mishra(at)myrealbox(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | pqReadData() -- backend closed the channel unexpectedly. |
Date: | 2002-06-29 11:01:05 |
Message-ID: | 5.1.0.14.0.20020629160720.00a56088@pop.myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
i have to call one c function users() present in one c file which is as
follows:
#include <stdio.h>
#include "pgsql/postgres.h"
void users();
int main()
{
users();
}
void users()
{
FILE *fp;
fp = fopen("/home/suresh/trigger/test.txt","w");
fputs("Hello this is c function",fp);
}
the funcion that calls users() from c file is as follows:
create FUNCTION users() returns opaque as '/var/lib/pgsql/test.so' language
'C';
the trigger that calls this fuction is as follows:
CREATE TRIGGER users_trg before insert on users for each row execute
procedure users();
now when i am any value in my table it gives the error :
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
i cannot find the solution to this problem.
please help.
From | Date | Subject | |
---|---|---|---|
Next Message | Cedar Cox | 2002-06-29 11:19:03 | Re: Pass through query help (please ...:) |
Previous Message | Tom Lane | 2002-06-29 01:29:07 | Re: weird strncmp bug while executing trigger? |