From: | Adriano Lange <adriano(at)c3sl(dot)ufpr(dot)br> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: graph representation of data structures in optimizer |
Date: | 2009-02-22 23:04:56 |
Message-ID: | 49A1DA18.5040803@c3sl.ufpr.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
The patch attached is an implementation for graph generation of data
structures in postgres. The file debuggraph.c is a simple library that
generate graphs in the format supported by graphviz. Example:
#include "nodes/debuggraph.h"
...
DebugGraph *graph;
DebugNode *node;
graph = createDebugGraph();
node = newDebugNode( graph, "node1", "Node 1" );
addDebugNodeAttribute( node, "Attribute 1", "Value 1" );
newDebugNode( graph, "node2", "Node 2" );
newDebugEdge( graph, "node1", "node2", "Edge 1" );
printGraphvizToFile( graph, stderr );
destroyDebugGraph( graph );
I've also made a reimplementation of outfuncs.c to outfuncs_graph.c for
an entire node output support.
#include "nodes/outfuncs_graph.h"
...
printGraphNodes( node, stderr );
I hope that this may be useful for somebody.
--
Adriano Lange
C3SL/UFPR - www.c3sl.ufpr.br
Attachment | Content-Type | Size |
---|---|---|
postgresql-8.3.5-debuggraph-20090222.patch | text/x-diff | 91.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-02-22 23:51:00 | Re: some broken on pg_stat_user_functions |
Previous Message | pi song | 2009-02-22 22:18:52 | Re: Hadoop backend? |