cant execute yyparse() within postgresql
hello
i am not able to execute the yyparse() function
generated by flex from within the pl call handler
function.
does any one knows the reason for this failure? and
how can it be rectified
thank you
__________________________________
Do you Yahoo!?
Send a seasonal email greeting and help others. Do good.
http://celebrity.mail.yahoo.com
Sibtay Abbas wrote:
i am not able to execute the yyparse() function
generated by flex from within the pl call handler
function.
First of all, flex does not generate a yyparse() function. At most it
generates yylex(). Second, you can't just ask random, highly specific
questions out of the blue and expect someone to have an answer for you.
Why are you calling yyparser(), what happens when you do, what PL
handlers are you talking about, etc., would be some of the required
context information.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
i am sorry if i hurt your ego, by asking this
question. And i mentioned flex mistakenly...actually
by flex i meant yacc (i am using lex & yacc). yyparse
is generated by yacc..which i want to invoke.
"
Second, you can't just ask
random, highly specific
questions out of the blue and expect someone to
have
an answer for you.
"
i never happen to read this rule when i signed up to
this mailing list...so if you ve made up a rule by
urself for this mailing list just do us a favor by
officially announcing it
i think anyone who has knowledge of adding new
languages to postgresql will understand what pl call
handler means.
i ve been getting alot of help from this mailing list
and i thank all the ppl who helped me.
Peter's attitude was rude and i complain against it
and i ask the mailing list maintainers to follow up on
this.
Peter if you dont understand someone's question the
nice way is to ask him the details instead of trying
to insult him.
thank you
--- Peter Eisentraut <peter_e@gmx.net> wrote:
Sibtay Abbas wrote:
i am not able to execute the yyparse() function
generated by flex from within the pl call handler
function.First of all, flex does not generate a yyparse()
function. At most it
generates yylex(). Second, you can't just ask
random, highly specific
questions out of the blue and expect someone to have
an answer for you.
Why are you calling yyparser(), what happens when
you do, what PL
handlers are you talking about, etc., would be some
of the required
context information.--
Peter Eisentraut
http://developer.postgresql.org/~petere/
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
Sibtay Abbas <sibtay_abbas@yahoo.com> writes:
Peter's attitude was rude and i complain against it
and i ask the mailing list maintainers to follow up on
this.
You would do better to take his advice and provide the needed context.
Personally I had ignored your first message as unanswerable...
regards, tom lane
On Tue, 21 Dec 2004 10:50:25 -0800 (PST)
Sibtay Abbas <sibtay_abbas@yahoo.com> wrote:
i never happen to read this rule when i signed up to
this mailing list...so if you ve made up a rule by
urself for this mailing list just do us a favor by
officially announcing iti think anyone who has knowledge of adding new
languages to postgresql will understand what pl call
handler means.i ve been getting alot of help from this mailing list
and i thank all the ppl who helped me.Peter's attitude was rude and i complain against it
and i ask the mailing list maintainers to follow up on
this.
I don't believe Peter was trying to be rude. And while it isn't
a "rule" per se, the more information you can provide in a
question the more you increase your chances of someone having an
answer for you.
Something along the lines of "I'm trying to add a new language to
postgresql and I need to be able to X from within Y" etc, etc, etc.
will go a lot futher than "I can't X from within Y".
---------------------------------
Frank Wiles <frank@wiles.org>
http://www.wiles.org
---------------------------------
Sibtay Abbas wrote:
i never happen to read this rule when i signed up to
this mailing list...so if you ve made up a rule by
urself for this mailing list just do us a favor by
officially announcing it
Got a question ...?
http://www.catb.org/~esr/faqs/smart-questions.html
Andre
Datum mylanguage_handler(PG_FUNCTION_ARGS){
if (CALLED_AS_TRIGGER(fcinfo))
/*do nothing
else{
char *proc_source;
Datum prosrcdatum;
bool isnull;
//get the oid of the function
Oid funcOid = fcinfo->flinfo->fn_oid;
HeapTuple procTup =
SearchSysCache(PROCOID,ObjectIdGetDatum(funcOid),0, 0,
0);
//get the attribute that holds the function's source
prosrcdatum = SysCacheGetAttr(PROCOID,
procTup,Anum_pg_proc_prosrc, &isnull);
//convert prosrcdatum to C style string
proc_source =
DatumGetCString(DirectFunctionCall1(textout,
prosrcdatum));
if (isnull)
elog(ERROR, "null prosrc");
else
{
elog(INFO,"\n Invoking parser \n");
/*the problem area*/
yyparse();
elog(INFO,"\n parser invoked \n");
}
}//end of function
i receive the following error
"server closed the connection unexpectedly
This probably means the server terminated
abnormally before or while processing the request.
The connection to the server was lost. Attempting
reset: Failed."
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com