Обсуждение: Compile and test in netbeans

Поиск
Список
Период
Сортировка

Compile and test in netbeans

От
Rohit Goyal
Дата:
Hi All, 

I want to modify postgresql code for the first time. 
I tried to use netbeans to compile the code. 

Now, I wanted to print something on console when I create a table or an index. I am printing just for testing purpose to get a feel of code.

Please tel me the procedure to run and print using printf().

--
Regards,
Rohit Goyal

Re: Compile and test in netbeans

От
Ashutosh Bapat
Дата:
Please look at elog() with right error code like DEBUG or NOTICE.


On Sun, Nov 17, 2013 at 11:36 PM, Rohit Goyal <rhtgyl.87@gmail.com> wrote:
Hi All, 

I want to modify postgresql code for the first time. 
I tried to use netbeans to compile the code. 

Now, I wanted to print something on console when I create a table or an index. I am printing just for testing purpose to get a feel of code.

Please tel me the procedure to run and print using printf().

--
Regards,
Rohit Goyal



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Re: Compile and test in netbeans

От
Craig Ringer
Дата:
On 11/18/2013 02:06 AM, Rohit Goyal wrote:
> Hi All, 
> 
> I want to modify postgresql code for the first time. 
> I tried to use netbeans to compile the code. 

If you are doing something for the first time, do it exactly how the
documentation advises.

Once you've got it working that way, *THEN* you can try to vary what
you're doing.

http://www.postgresql.org/docs/current/static/install-procedure.html

> Please tel me the procedure to run and print using printf().

http://google.com/search?q=printf

"man printf"

However, that's not how PostgreSQL does it. Look at the "elog" and
"ereport" functions. As usual, it's in the documentation:

http://www.postgresql.org/docs/current/static/error-message-reporting.html

You'll find this useful too:

http://doxygen.postgresql.org/

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services