NovaStar Database Reference / Functions / pointfromnumid
Overview
The pointfromnumid
function takes either a single numid or a list of numids, and returns the same number of database ids for the given point(s).
The functions are defined in the point.sql
file distributed with the NovaStar installer.
Function Usage
Two "overloaded" variations of this function are available and are handled by PostgreSQL based on parameter types:
- A variation that takes an integer and handles a single point.
- A variation that takes a string and handles a list of points.
Single Point Function
The function syntax for the single point function is as follows.
pointfromnumid(
IN point_numid integer)
The function returns an integer.
Function parameters are as follows.
Function Parameters
Parameter | Description |
---|---|
point_numid |
The numid of the point to get the database ID for. |
The following is an example of usage.
select * from pointfromnumid(1);
Multiple Point Function
The function syntax for the multiple point function is as follows.
pointfromnumid(
IN pointnumidlist text)
The function returns text, a list of points.
Function parameters are as follows.
Function Parameters
Parameter | Description |
---|---|
pointnumidlist |
A comma delimited list of numids. |
The following is an example of usage.
select * from pointfromnumid('1,2,3');