pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Improve castNode notation by introducing list-extraction-specifi
6+ messages / 1 participants
[nested] [flat]

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8f0530f58061b185dc385df42e62d78a18d4ae3e

Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c |  4 ++--
contrib/postgres_fdw/deparse.c                  |  2 +-
contrib/postgres_fdw/postgres_fdw.c             |  6 +++---
src/backend/catalog/objectaddress.c             | 16 ++++++++--------
src/backend/catalog/pg_proc.c                   |  2 +-
src/backend/commands/aggregatecmds.c            |  4 ++--
src/backend/commands/async.c                    |  8 ++++----
src/backend/commands/collationcmds.c            |  2 +-
src/backend/commands/copy.c                     |  6 +++---
src/backend/commands/createas.c                 |  2 +-
src/backend/commands/dropcmds.c                 |  8 ++++----
src/backend/commands/explain.c                  |  6 +++---
src/backend/commands/extension.c                |  4 ++--
src/backend/commands/foreigncmds.c              |  2 +-
src/backend/commands/functioncmds.c             |  5 +++--
src/backend/commands/matview.c                  |  2 +-
src/backend/commands/opclasscmds.c              |  6 +++---
src/backend/commands/portalcmds.c               |  2 +-
src/backend/commands/prepare.c                  |  4 ++--
src/backend/commands/tablecmds.c                |  4 ++--
src/backend/commands/trigger.c                  |  2 +-
src/backend/commands/user.c                     |  2 +-
src/backend/commands/view.c                     |  2 +-
src/backend/executor/execExpr.c                 |  2 +-
src/backend/executor/execTuples.c               |  2 +-
src/backend/executor/execUtils.c                |  2 +-
src/backend/executor/functions.c                |  8 ++++----
src/backend/executor/nodeAgg.c                  |  4 ++--
src/backend/executor/nodeHashjoin.c             |  2 +-
src/backend/executor/nodeLockRows.c             |  2 +-
src/backend/executor/nodeModifyTable.c          |  2 +-
src/backend/executor/nodeSubplan.c              |  8 ++++----
src/backend/executor/spi.c                      | 18 +++++++++---------
src/backend/nodes/nodeFuncs.c                   | 16 ++++++++--------
src/backend/optimizer/path/costsize.c           | 12 ++++++------
src/backend/optimizer/path/indxpath.c           |  4 ++--
src/backend/optimizer/path/joinrels.c           |  2 +-
src/backend/optimizer/plan/analyzejoins.c       |  2 +-
src/backend/optimizer/plan/createplan.c         |  8 ++++----
src/backend/optimizer/plan/planner.c            |  2 +-
src/backend/optimizer/plan/setrefs.c            |  2 +-
src/backend/optimizer/plan/subselect.c          |  2 +-
src/backend/optimizer/prep/prepunion.c          |  2 +-
src/backend/optimizer/util/clauses.c            |  2 +-
src/backend/optimizer/util/orclauses.c          |  2 +-
src/backend/optimizer/util/restrictinfo.c       |  6 +++---
src/backend/parser/analyze.c                    |  6 +++---
src/backend/parser/gram.y                       |  2 +-
src/backend/parser/parse_collate.c              |  8 ++++----
src/backend/parser/parse_expr.c                 |  4 ++--
src/backend/parser/parse_node.c                 |  2 +-
src/backend/parser/parse_relation.c             |  2 +-
src/backend/parser/parse_type.c                 |  4 ++--
src/backend/parser/parse_utilcmd.c              | 18 +++++++++---------
src/backend/rewrite/rewriteDefine.c             |  8 ++++----
src/backend/rewrite/rewriteHandler.c            | 10 +++++-----
src/backend/tcop/postgres.c                     | 12 ++++++------
src/backend/tcop/pquery.c                       |  6 +++---
src/backend/utils/adt/ruleutils.c               | 10 +++++-----
src/backend/utils/adt/selfuncs.c                |  2 +-
src/backend/utils/cache/plancache.c             | 22 +++++++++++-----------
src/backend/utils/misc/guc.c                    |  2 +-
src/backend/utils/mmgr/portalmem.c              |  2 +-
src/include/nodes/pg_list.h                     |  7 +++++++
src/pl/plpgsql/src/pl_exec.c                    |  4 ++--
65 files changed, 176 insertions(+), 168 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/be182d57021033a55319ab5de737fe2294106ae0

Modified Files
--------------
src/include/nodes/pg_list.h | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bcb1a27dc039f175dc64a231a742e74a8728fb26

Modified Files
--------------
src/include/nodes/pg_list.h | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/89a41a1b6b7184700394c7ea13471084d05f3cc1

Modified Files
--------------
src/include/nodes/pg_list.h | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ff9398052df511e7789b697e1be3bd940d45d74a

Modified Files
--------------
src/include/nodes/pg_list.h | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Improve castNode notation by introducing list-extraction-specifi
@ 2017-04-10 17:52 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2017-04-10 17:52 UTC (permalink / raw)
  To: pgsql-committers

Improve castNode notation by introducing list-extraction-specific variants.

This extends the castNode() notation introduced by commit 5bcab1114 to
provide, in one step, extraction of a list cell's pointer and coercion to
a concrete node type.  For example, "lfirst_node(Foo, lc)" is the same
as "castNode(Foo, lfirst(lc))".  Almost half of the uses of castNode
that have appeared so far include a list extraction call, so this is
pretty widely useful, and it saves a few more keystrokes compared to the
old way.

As with the previous patch, back-patch the addition of these macros to
pg_list.h, so that the notation will be available when back-patching.

Patch by me, after an idea of Andrew Gierth's.

Discussion: https://postgr.es/m/14197.1491841216@sss.pgh.pa.us

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ba0a0f3ed9e0ef948ea614d16b77f835695ff4da

Modified Files
--------------
src/include/nodes/pg_list.h | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2017-04-10 17:52 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>
2017-04-10 17:52 pgsql: Improve castNode notation by introducing list-extraction-specifi Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox