pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add erand48() to the set of functions supported by our src/port/
2+ messages / 2 participants
[nested] [flat]

* pgsql: Add erand48() to the set of functions supported by our src/port/
@ 2009-07-16 17:43 Tom Lane <tgl@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: tgl@postgresql.org @ 2009-07-16 17:43 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Add erand48() to the set of functions supported by our src/port/ library,
and extend configure to test for it properly instead of hard-wiring
an assumption that everybody but Windows has the rand48 functions.
(We do cheat to the extent of assuming that probing for erand48 will do
for the entire rand48 family.)

erand48() is unused as of this commit, but a followon patch will cause
GEQO to depend on it.

Andres Freund, additional hacking by Tom

Modified Files:
--------------
    pgsql:
        configure (r1.648 -> r1.649)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure?r1=1.648&r2=1.649)
        configure.in (r1.604 -> r1.605)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure.in?r1=1.604&r2=1.605)
    pgsql/src/include:
        pg_config.h.in (r1.140 -> r1.141)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/pg_config.h.in?r1=1.140&r2=1.141)
        port.h (r1.125 -> r1.126)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/port.h?r1=1.125&r2=1.126)
    pgsql/src/tools/msvc:
        Mkvcbuild.pm (r1.40 -> r1.41)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/tools/msvc/Mkvcbuild.pm?r1=1.40&r2=1.41)

Added Files:
-----------
    pgsql/src/port:
        erand48.c (r1.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/erand48.c?rev=1.1&content-type=text/x-cv...)

Removed Files:
-------------
    pgsql/src/port:
        rand.c
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/port/rand.c)




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

* pgsql: Add RETURNING support to MERGE.
@ 2024-03-17 14:04 Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dean Rasheed @ 2024-03-17 14:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add RETURNING support to MERGE.

This allows a RETURNING clause to be appended to a MERGE query, to
return values based on each row inserted, updated, or deleted. As with
plain INSERT, UPDATE, and DELETE commands, the returned values are
based on the new contents of the target table for INSERT and UPDATE
actions, and on its old contents for DELETE actions. Values from the
source relation may also be returned.

As with INSERT/UPDATE/DELETE, the output of MERGE ... RETURNING may be
used as the source relation for other operations such as WITH queries
and COPY commands.

Additionally, a special function merge_action() is provided, which
returns 'INSERT', 'UPDATE', or 'DELETE', depending on the action
executed for each row. The merge_action() function can be used
anywhere in the RETURNING list, including in arbitrary expressions and
subqueries, but it is an error to use it anywhere outside of a MERGE
query's RETURNING list.

Dean Rasheed, reviewed by Isaac Morland, Vik Fearing, Alvaro Herrera,
Gurjeet Singh, Jian He, Jeff Davis, Merlin Moncure, Peter Eisentraut,
and Wolfgang Walther.

Discussion: http://postgr.es/m/CAEZATCWePEGQR5LBn-vD6SfeLZafzEm2Qy_L_Oky2=qw2w3Pzg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c649fa24a42ba89bf5460c7110e4fc8eeca65959

Modified Files
--------------
doc/src/sgml/dml.sgml                         |  22 ++-
doc/src/sgml/func.sgml                        |  79 ++++++++
doc/src/sgml/glossary.sgml                    |   6 +-
doc/src/sgml/plpgsql.sgml                     |  16 +-
doc/src/sgml/queries.sgml                     |   9 +-
doc/src/sgml/ref/copy.sgml                    |  19 +-
doc/src/sgml/ref/merge.sgml                   |  68 +++++--
doc/src/sgml/ref/select.sgml                  |  11 +-
doc/src/sgml/rowtypes.sgml                    |   2 +-
doc/src/sgml/spi.sgml                         |  14 +-
doc/src/sgml/xfunc.sgml                       |   8 +-
src/backend/commands/copy.c                   |   6 -
src/backend/commands/copyto.c                 |   3 +-
src/backend/executor/execExpr.c               |  13 ++
src/backend/executor/execExprInterp.c         |  48 +++++
src/backend/executor/execPartition.c          |   8 +-
src/backend/executor/functions.c              |   9 +-
src/backend/executor/nodeModifyTable.c        | 202 +++++++++++++------
src/backend/executor/spi.c                    |   7 +-
src/backend/jit/llvm/llvmjit_expr.c           |   6 +
src/backend/jit/llvm/llvmjit_types.c          |   1 +
src/backend/nodes/nodeFuncs.c                 |  17 ++
src/backend/optimizer/plan/subselect.c        |   9 +-
src/backend/optimizer/util/paramassign.c      |  51 +++++
src/backend/parser/analyze.c                  |  19 +-
src/backend/parser/gram.y                     |  14 +-
src/backend/parser/parse_agg.c                |   2 +
src/backend/parser/parse_cte.c                |  10 +-
src/backend/parser/parse_expr.c               |  34 ++++
src/backend/parser/parse_func.c               |   1 +
src/backend/parser/parse_merge.c              |   7 +-
src/backend/parser/parse_relation.c           |   7 +-
src/backend/parser/parse_target.c             |   4 +
src/backend/rewrite/rewriteHandler.c          |   9 +-
src/backend/rewrite/rowsecurity.c             |  28 ++-
src/backend/tcop/utility.c                    |   3 +-
src/backend/utils/adt/ruleutils.c             |  14 +-
src/bin/psql/common.c                         |   8 +-
src/include/catalog/catversion.h              |   2 +-
src/include/executor/execExpr.h               |   3 +
src/include/executor/spi.h                    |   1 +
src/include/nodes/execnodes.h                 |   3 +
src/include/nodes/parsenodes.h                |   1 +
src/include/nodes/primnodes.h                 |  21 ++
src/include/optimizer/paramassign.h           |   2 +
src/include/parser/analyze.h                  |   2 +
src/include/parser/kwlist.h                   |   1 +
src/include/parser/parse_node.h               |   3 +-
src/pl/plpgsql/src/pl_exec.c                  |  12 +-
src/pl/tcl/pltcl.c                            |   1 +
src/test/regress/expected/merge.out           | 266 ++++++++++++++++++++++++--
src/test/regress/expected/rowsecurity.out     |  32 +++-
src/test/regress/expected/rules.out           |  16 +-
src/test/regress/expected/updatable_views.out |  30 ++-
src/test/regress/expected/with.out            |  10 +
src/test/regress/sql/merge.sql                | 169 ++++++++++++++--
src/test/regress/sql/rowsecurity.sql          |  21 ++
src/test/regress/sql/rules.sql                |   6 +-
src/test/regress/sql/updatable_views.sql      |   9 +-
src/test/regress/sql/with.sql                 |   8 +
src/tools/pgindent/typedefs.list              |   1 +
61 files changed, 1198 insertions(+), 216 deletions(-)



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


end of thread, other threads:[~2024-03-17 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-16 17:43 pgsql: Add erand48() to the set of functions supported by our src/port/ Tom Lane <tgl@postgresql.org>
2024-03-17 14:04 pgsql: Add RETURNING support to MERGE. Dean Rasheed <dean.a.rasheed@gmail.com>

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