---
name: "SPI_unregister_relation"
section: "3"
platform: "linux"
package: "postgresql"
version: "18.6-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SPI_unregister_relation"
---

# SPI\_unregister\_relation(3)

remove an ephemeral named relation from the registry

## NAME

SPI\_unregister\_relation - remove an ephemeral named relation from the registry

## SYNOPSIS

```
int SPI_unregister_relation(const char * name)
```

## DESCRIPTION

**SPI\_unregister\_relation** removes an ephemeral named relation from the registry for the current connection.

## ARGUMENTS

const char \* *name*

the relation registry entry name

## RETURN VALUE

If the execution of the command was successful then the following (nonnegative) value will be returned:

SPI\_OK\_REL\_UNREGISTER

if the tuplestore has been successfully removed from the registry

On error, one of the following negative values is returned:

SPI\_ERROR\_ARGUMENT

if *name* is NULL

SPI\_ERROR\_UNCONNECTED

if called from an unconnected C function

SPI\_ERROR\_REL\_NOT\_FOUND

if *name* is not found in the registry for the current connection
