Dear Sir, 


	I want to know the compilaiton and execution of my 
code. Suppose if i add a test printf statement in the 
src/backend/tcop/postgres.c and after compilation and 
execution i should get that statement every time i give 
a query to psql.

	After running make I even added the executables 
in the /usr/bin/ directory but i couldn't see the test 
statement after giving a query to psql.

	please tell me the procedure of adding a test 
printf statement in postgres.c(or in any file), and 
compiling and running it so that i get the test statement 
as an output when i give the query.

Sincerely
Srikanth M








Wed, 28 May 2003 12:38:04 +0530 (IST)
Srikanth M <srikanth_m@students.iiit.net>
Help needed in testing my code.

Why don't you use elog(LOG, instead of printf ?

-- 
Pip-pip
Sailesh
http://www.cs.berkeley.edu/~sailesh


28 May 2003 00:49:17 -0700
Sailesh Krishnamurthy <sailesh@cs.berkeley.edu>
Re: Help needed in testing my code.
Hi,

This is a much better way than printf:

elog(NOTICE, "this is my test: %s", string);

Chris

----- Original Message ----- 
From: "Srikanth M" <srikanth_m@students.iiit.net>
To: <pgsql-hackers@postgresql.org>
Sent: Wednesday, May 28, 2003 3:08 PM
Subject: [HACKERS] Help needed in testing my code.


> Dear Sir, 
> 
> 
> I want to know the compilaiton and execution of my 
> code. Suppose if i add a test printf statement in the 
> src/backend/tcop/postgres.c and after compilation and 
> execution i should get that statement every time i give 
> a query to psql.
> 
> After running make I even added the executables 
> in the /usr/bin/ directory but i couldn't see the test 
> statement after giving a query to psql.
> 
> please tell me the procedure of adding a test 
> printf statement in postgres.c(or in any file), and 
> compiling and running it so that i get the test statement 
> as an output when i give the query.
> 
> Sincerely
> Srikanth M
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/docs/faqs/FAQ.html
> 


Wed, 28 May 2003 15:56:05 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: Help needed in testing my code.

I'm guessing his problem is that he's expecting this to come out of psql
and not go to the backend's stdout.

Kris Jurka

On Wed, 28 May 2003, Christopher Kings-Lynne wrote:

> Hi,
>
> This is a much better way than printf:
>
> elog(NOTICE, "this is my test: %s", string);
>
> Chris
>
> ----- Original Message -----
> From: "Srikanth M" <srikanth_m@students.iiit.net>
> To: <pgsql-hackers@postgresql.org>
> Sent: Wednesday, May 28, 2003 3:08 PM
> Subject: [HACKERS] Help needed in testing my code.
>
>
> > Dear Sir,
> >
> >
> > I want to know the compilaiton and execution of my
> > code. Suppose if i add a test printf statement in the
> > src/backend/tcop/postgres.c and after compilation and
> > execution i should get that statement every time i give
> > a query to psql.
> >
> > After running make I even added the executables
> > in the /usr/bin/ directory but i couldn't see the test
> > statement after giving a query to psql.
> >
> > please tell me the procedure of adding a test
> > printf statement in postgres.c(or in any file), and
> > compiling and running it so that i get the test statement
> > as an output when i give the query.
> >
> > Sincerely
> > Srikanth M
> >
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/docs/faqs/FAQ.html
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Wed, 28 May 2003 06:08:36 -0400 (EDT)
Kris Jurka <books@ejurka.com>
Re: Help needed in testing my code.
Dear Sir
	I am new to postgres and dont know the excat procedure of 
testing my code, okay i will use elog, but please tell me the procedure 
of testing that. 

for example,pls tell what should i do after i add code, what make files 
should i run and where should i place the new executables.

Thanks for ur reply.

Srikanth.


 runOn 28 May 2003, 
Sailesh Krishnamurthy wrote:

> 
> Why don't you use elog(LOG, instead of printf ?
> 
> 

-- 
big fan of not reinventing the wheel - good programmers write code,
great programmers steal code ;-)



Wed, 28 May 2003 15:49:54 +0530 (IST)
Srikanth M <srikanth_m@students.iiit.net>
Re: Help needed in testing my code.
>>>>> "Srikanth" == Srikanth M <Srikanth> writes:

    Srikanth> Dear Sir I am new to postgres and dont know the excat
    Srikanth> procedure of testing my code, okay i will use elog, but
    Srikanth> please tell me the procedure of testing that.

Srikanth 

As you're a big fan of stealing code, why don't you grep the source
for occurences of "elog(LOG" or "elog(NOTICE". 

elog(NOTICE should send NOTICE messages to the psql client (I think !)
while elog(LOG while only send it to the logfile you might have
specified while starting the postmaster 

    Srikanth> for example,pls tell what should i do after i add code,
    Srikanth> what make files should i run and where should i place
    Srikanth> the new executables.

Well you sould start out by RTFM .. read how to build postgres. I run
"make install" in my postgres directory (right above src/).

-- 
Pip-pip
Sailesh
http://www.cs.berkeley.edu/~sailesh


28 May 2003 12:59:56 +0200
Sailesh Krishnamurthy <sailesh@cs.berkeley.edu>
Re: Help needed in testing my code.
Is anyone working on, or planning on working on the describe statement?

It is very useful for ecpg, and a project I am working on.

Depending on the amount, I may be able to get compensation for this, if
this helps motivate anyone?

-- 
Dave Cramer <dave@fastcrypt.com>
fastcrypt


28 May 2003 08:58:53 -0400
Dave Cramer <dave@fastcrypt.com>
describe statement
On Wed, May 28, 2003 at 12:59:56PM +0200, Sailesh Krishnamurthy wrote:

> elog(NOTICE should send NOTICE messages to the psql client (I think !)
> while elog(LOG while only send it to the logfile you might have
> specified while starting the postmaster 

Whether a given elog level is sent to the postmaster log and to the
client, is controlled by client_min_messages and server_min_messages.
At least in recent sources, that is.

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
We take risks not to escape from life, but to prevent life escaping from us.

Wed, 28 May 2003 10:25:25 -0400
Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>
Re: Help needed in testing my code.