Tom Lane <[EMAIL PROTECTED]> wrote: > I don't want the tag there at all, much less converted to a pointer. > What would the semantics be of copying the node, and why? > > Please justify why you must have this and can't do what you want some > other way.
In my pg_stat_statements plugin, the tag is used to cache hash values of SQL strings in PlannedStmt. It is not necessarily needed because the hash value is re-computable from debug_query_string. It is just for avoiding the work. In addition, we see different SQLs in debug_query_string in PREPARE/EXECUTE and DECLARE/FETCH. Hashed SQL cache can work on those commands. However, it's ok to remove the tag field from the patch if we should avoid such an unused field in normal use. EXECUTE and FETCH issues could be solved if I write simple SQL parser in my plugin because SQL bodies can be fetched from pg_prepared_statements and pg_cursors. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers