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
5594d146
Commit
5594d146
authored
Jun 28, 2011
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add composite-type attributes to information_schema.element_types view
parent
c533c147
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
doc/src/sgml/information_schema.sgml
doc/src/sgml/information_schema.sgml
+6
-4
src/backend/catalog/information_schema.sql
src/backend/catalog/information_schema.sql
+4
-3
No files found.
doc/src/sgml/information_schema.sgml
View file @
5594d146
...
...
@@ -2147,7 +2147,7 @@
<para>
The view <literal>element_types</literal> contains the data type
descriptors of the elements of arrays. When a table column,
descriptors of the elements of arrays. When a table column,
composite-type attribute,
domain, function parameter, or function return value is defined to
be of an array type, the respective information schema view only
contains <literal>ARRAY</literal> in the column
...
...
@@ -2212,9 +2212,11 @@ ORDER BY c.ordinal_position;
<entry>
The type of the object that uses the array being described: one
of <literal>TABLE</literal> (the array is used by a column of
that table), <literal>DOMAIN</literal> (the array is used by
that domain), <literal>ROUTINE</literal> (the array is used by
a parameter or the return data type of that function).
that table), <literal>USER-DEFINED TYPE</literal> (the array is
used by an attribute of that composite type),
<literal>DOMAIN</literal> (the array is used by that domain),
<literal>ROUTINE</literal> (the array is used by a parameter or
the return data type of that function).
</entry>
</row>
...
...
src/backend/catalog/information_schema.sql
View file @
5594d146
...
...
@@ -2467,12 +2467,13 @@ CREATE VIEW element_types AS
FROM
pg_namespace
n
,
pg_type
at
,
pg_namespace
nbt
,
pg_type
bt
,
(
/* columns */
/* columns
, attributes
*/
SELECT
c
.
relnamespace
,
CAST
(
c
.
relname
AS
sql_identifier
),
'TABLE'
::
text
,
a
.
attnum
,
a
.
atttypid
CASE
WHEN
c
.
relkind
=
'c'
THEN
'USER-DEFINED TYPE'
::
text
ELSE
'TABLE'
::
text
END
,
a
.
attnum
,
a
.
atttypid
FROM
pg_class
c
,
pg_attribute
a
WHERE
c
.
oid
=
a
.
attrelid
AND
c
.
relkind
IN
(
'r'
,
'v'
,
'f'
)
AND
c
.
relkind
IN
(
'r'
,
'v'
,
'f'
,
'c'
)
AND
attnum
>
0
AND
NOT
attisdropped
UNION
ALL
...
...
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