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
4f6f5db4
Commit
4f6f5db4
authored
Mar 29, 2005
by
Neil Conway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SPI_getnspname(), including documentation.
parent
70c9763d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
3 deletions
+64
-3
doc/src/sgml/spi.sgml
doc/src/sgml/spi.sgml
+55
-1
src/backend/executor/spi.c
src/backend/executor/spi.c
+7
-1
src/include/executor/spi.h
src/include/executor/spi.h
+2
-1
No files found.
doc/src/sgml/spi.sgml
View file @
4f6f5db4
<!--
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.
39 2005/01/22 22:56:36 momjian
Exp $
$PostgreSQL: pgsql/doc/src/sgml/spi.sgml,v 1.
40 2005/03/29 02:53:53 neilc
Exp $
-->
<chapter id="spi">
...
...
@@ -2153,6 +2153,60 @@ char * SPI_getrelname(Relation <parameter>rel</parameter>)
</refsect1>
</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 id="spi-memory">
...
...
src/backend/executor/spi.c
View file @
4f6f5db4
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.13
6 2005/03/25 21:57:58 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.13
7 2005/03/29 02:53:53 neilc
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -760,6 +760,12 @@ SPI_getrelname(Relation rel)
return
pstrdup
(
RelationGetRelationName
(
rel
));
}
char
*
SPI_getnspname
(
Relation
rel
)
{
return
get_namespace_name
(
RelationGetNamespace
(
rel
));
}
void
*
SPI_palloc
(
Size
size
)
{
...
...
src/include/executor/spi.h
View file @
4f6f5db4
...
...
@@ -2,7 +2,7 @@
*
* spi.h
*
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.5
0 2004/11/16 18:10:13 tgl
Exp $
* $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.5
1 2005/03/29 02:53:53 neilc
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -113,6 +113,7 @@ extern Datum SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool
extern
char
*
SPI_gettype
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
Oid
SPI_gettypeid
(
TupleDesc
tupdesc
,
int
fnumber
);
extern
char
*
SPI_getrelname
(
Relation
rel
);
extern
char
*
SPI_getnspname
(
Relation
rel
);
extern
void
*
SPI_palloc
(
Size
size
);
extern
void
*
SPI_repalloc
(
void
*
pointer
,
Size
size
);
extern
void
SPI_pfree
(
void
*
pointer
);
...
...
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