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
399ad77c
Commit
399ad77c
authored
Nov 07, 2008
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve documentation of pg_typeof, per gripe from David Wheeler.
parent
6517f377
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+19
-2
No files found.
doc/src/sgml/func.sgml
View file @
399ad77c
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.45
5 2008/11/04 14:49:11 petere
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.45
6 2008/11/07 22:54:41 tgl
Exp $ -->
<chapter
id=
"functions"
>
<title>
Functions and Operators
</title>
...
...
@@ -11871,7 +11871,24 @@ SELECT pg_type_is_visible('myschema.widget'::regtype);
<para>
<function>
pg_typeof
</function>
returns the OID of the data type of the
value that is passed to it. This can be helpful for troubleshooting or
dynamically constructing SQL queries.
dynamically constructing SQL queries. The function is declared as
returning
<type>
regtype
</>
, which is an OID alias type (see
<xref
linkend=
"datatype-oid"
>
); this means that it is the same as an
OID for comparison purposes but displays as a type name. For example:
<programlisting>
SELECT pg_typeof(33);
pg_typeof
-----------
integer
(1 row)
SELECT typlen FROM pg_type WHERE oid = pg_typeof(33);
typlen
--------
4
(1 row)
</programlisting>
</para>
<indexterm>
...
...
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