From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal - plpgsql unique statement id |
Date: | 2019-01-25 08:44:28 |
Message-ID: | CAFj8pRBWwxq5o1ATsRxXRCGLeptiOROg-aGqtWfQUXzgJbOuiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
čt 24. 1. 2019 v 23:08 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> > committed
>
> Why didn't this patch modify the dumping logic in pl_funcs.c to print
> the IDs? I'm not aware of other cases where we intentionally omit
> fields from debug-support printouts.
>
Currently we don't print lineno, what is maybe for user more important
information.
I looked to the code, and now I am thinking so it is little bit harder,
than I expected. Any new information can break output formatting
static void
dump_loop(PLpgSQL_stmt_loop *stmt)
{
dump_ind();
printf("LOOP\n");
dump_stmts(stmt->body);
dump_ind();
printf(" ENDLOOP\n");
}
can looks like
static void
dump_loop(PLpgSQL_stmt_loop *stmt, int stmtid_width)
{
dump_ind();
printf("%*d LOOP\n", stmtid_width, stmt->stmtid);
dump_stmts(stmt->body);
dump_ind();
printf(" ENDLOOP\n");
}
It is some what do you expect ?
Regards
Maybe more simple
static void
dump_loop(PLpgSQL_stmt_loop *stmt, int stmtid_width)
{
dump_ind();
printf("LOOP {%d}\n",stmt->stmtid);
dump_stmts(stmt->body);
dump_ind();
printf(" ENDLOOP\n");
}
Pavel
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Takashi Menjo | 2019-01-25 08:52:24 | RE: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory |
Previous Message | Tsunakawa, Takayuki | 2019-01-25 08:14:19 | RE: Protect syscache from bloating with negative cache entries |