Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
4f6f5db4
Commit
4f6f5db4
authored
20 years ago
by
Neil Conway
Browse files
Options
Downloads
Patches
Plain Diff
Add SPI_getnspname(), including documentation.
parent
70c9763d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/spi.sgml
+55
-1
55 additions, 1 deletion
doc/src/sgml/spi.sgml
src/backend/executor/spi.c
+7
-1
7 additions, 1 deletion
src/backend/executor/spi.c
src/include/executor/spi.h
+2
-1
2 additions, 1 deletion
src/include/executor/spi.h
with
64 additions
and
3 deletions
doc/src/sgml/spi.sgml
+
55
−
1
View file @
4f6f5db4
<!--
<!--
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.
39
2005/0
1
/2
2 22:56:36 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.
40
2005/0
3
/2
9 02:53:53 neilc
Exp $
-->
-->
<chapter id="spi">
<chapter id="spi">
...
@@ -2153,6 +2153,60 @@ char * SPI_getrelname(Relation <parameter>rel</parameter>)
...
@@ -2153,6 +2153,60 @@ char * SPI_getrelname(Relation <parameter>rel</parameter>)
</refsect1>
</refsect1>
</refentry>
</refentry>
<refentry id="spi-spi-getnspname">
<refmeta>
<refentrytitle>SPI_getnspname</refentrytitle>
</refmeta>
<refnamediv>
<refname>SPI_getnspname</refname>
<refpurpose>return the namespace of the specified relation</refpurpose>
</refnamediv>
<indexterm><primary>SPI_getnspname</primary></indexterm>
<refsynopsisdiv>
<synopsis>
char * SPI_getnspname(Relation <parameter>rel</parameter>)
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
<function>SPI_getnspname</function> returns a copy of the name of
the namespace that the specified <structname>Relation</structname>
belongs to. This is equivalent to the relation's schema. You should
<function>pfree</function> the return value of this function when
you are finished with it.
</para>
</refsect1>
<refsect1>
<title>Arguments</title>
<variablelist>
<varlistentry>
<term><literal>Relation <parameter>rel</parameter></literal></term>
<listitem>
<para>
input relation
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Return Value</title>
<para>
The name of the specified relation's namespace.
</para>
</refsect1>
</refentry>
</sect1>
</sect1>
<sect1 id="spi-memory">
<sect1 id="spi-memory">
...
...
This diff is collapsed.
Click to expand it.
src/backend/executor/spi.c
+
7
−
1
View file @
4f6f5db4
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.13
6
2005/03/2
5 21
:5
7
:5
8 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.13
7
2005/03/2
9 02
:5
3
:5
3 neilc
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -760,6 +760,12 @@ SPI_getrelname(Relation rel)
...
@@ -760,6 +760,12 @@ SPI_getrelname(Relation rel)
return
pstrdup
(
RelationGetRelationName
(
rel
));
return
pstrdup
(
RelationGetRelationName
(
rel
));
}
}
char
*
SPI_getnspname
(
Relation
rel
)
{
return
get_namespace_name
(
RelationGetNamespace
(
rel
));
}
void
*
void
*
SPI_palloc
(
Size
size
)
SPI_palloc
(
Size
size
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/include/executor/spi.h
+
2
−
1
View file @
4f6f5db4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
*
*
* spi.h
* spi.h
*
*
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.5
0
200
4/11/16 18:10:13 tgl
Exp $
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.5
1
200
5/03/29 02:53:53 neilc
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -113,6 +113,7 @@ extern Datum SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool
...
@@ -113,6 +113,7 @@ extern Datum SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool
extern
char
*
SPI_gettype
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
char
*
SPI_gettype
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
Oid
SPI_gettypeid
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
Oid
SPI_gettypeid
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
char
*
SPI_getrelname
(
Relation
rel
);
extern
char
*
SPI_getrelname
(
Relation
rel
);
extern
char
*
SPI_getnspname
(
Relation
rel
);
extern
void
*
SPI_palloc
(
Size
size
);
extern
void
*
SPI_palloc
(
Size
size
);
extern
void
*
SPI_repalloc
(
void
*
pointer
,
Size
size
);
extern
void
*
SPI_repalloc
(
void
*
pointer
,
Size
size
);
extern
void
SPI_pfree
(
void
*
pointer
);
extern
void
SPI_pfree
(
void
*
pointer
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment