Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c23b6fa7
Commit
c23b6fa7
authored
Nov 13, 2008
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marginal editorial improvements for array_agg patch documentation.
parent
312d5179
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+11
-11
No files found.
doc/src/sgml/func.sgml
View file @
c23b6fa7
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.45
8 2008/11/13 15:59:50 petere
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.45
9 2008/11/13 23:01:09 tgl
Exp $ -->
<chapter
id=
"functions"
>
<chapter
id=
"functions"
>
<title>
Functions and Operators
</title>
<title>
Functions and Operators
</title>
...
@@ -8387,8 +8387,8 @@ SELECT xmlagg(x) FROM test;
...
@@ -8387,8 +8387,8 @@ SELECT xmlagg(x) FROM test;
</para>
</para>
<para>
<para>
T
he influenc
e the order of the concatenation, something like the
T
o determin
e the order of the concatenation, something like the
following approach
to sort the input values
can be used:
following approach can be used:
<screen>
<![CDATA[
<screen>
<![CDATA[
SELECT xmlagg(x) FROM (SELECT * FROM test ORDER BY y DESC) AS tab;
SELECT xmlagg(x) FROM (SELECT * FROM test ORDER BY y DESC) AS tab;
...
@@ -9772,19 +9772,19 @@ SELECT count(*) FROM sometable;
...
@@ -9772,19 +9772,19 @@ SELECT count(*) FROM sometable;
and
<function>
xmlagg
</function>
, as well as similar user-defined
and
<function>
xmlagg
</function>
, as well as similar user-defined
aggregate functions, produce meaningfully different result values
aggregate functions, produce meaningfully different result values
depending on the order of the input values. In the current
depending on the order of the input values. In the current
implementation, the order of the
concatenation is in principle
implementation, the order of the
input is in principle unspecified.
undefined. Making the input values to be sorted in some other wa
y
Supplying the input values from a sorted subquer
y
will usually work, however. For example:
will usually work, however. For example:
<screen>
<![CDATA[
<screen>
<![CDATA[
SELECT xmlagg(x) FROM (SELECT
*
FROM test ORDER BY y DESC) AS tab;
SELECT xmlagg(x) FROM (SELECT
x
FROM test ORDER BY y DESC) AS tab;
]]>
</screen>
]]>
</screen>
But this
approach is not guaranteed to work in all situations, and
But this
syntax is not allowed in the SQL standard, and is
it is not strictly SQL-conforming. A future version of PostgreSQL
not portable to other database systems. A future version of
might provide an additional feature to control the order in a
<productname>
PostgreSQL
</>
might provide an additional feature to control
better-defined way (
<literal>
xmlagg(expr ORDER BY expr, expr,
the order in a
better-defined way (
<literal>
xmlagg(expr ORDER BY expr, expr,
...
</literal>
).
...
)
</literal>
).
</para>
</para>
<para>
<para>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment