Skip to content

Commit

Permalink
Changed age_id, age_start_id and age_end_id function signatures to IM…
Browse files Browse the repository at this point in the history
…MUTABLE (#405)

* Changed some function signatures to IMMUTABLE

Changed age_id(agtype), age_start_id(agtype) and age_end_id(agtype) from STABLE to IMMUTABLE.

* Revert "Changed some function signatures to IMMUTABLE"

This reverts commit 92ac40d.

* Changed age_id signature to IMMUTABLE

* Function signature was changed from STABLE to IMMUTABLE;
* Function receives a vertex or edge container (or null), and analyze its contents to return the "id" stored in said container;
* As it acts only on its arguments, it will always return the same result, given the same arguments, even across multiple SQL statements, being classified as IMMUTABLE function.

* Changed age_start_id signature to IMMUTABLE

* Function signature was changed from STABLE to IMMUTABLE;
* Function receives an edge container (or null), and analyze its contents to return the "start_id" stored in said container;
* As it acts only on its arguments, it will always return the same result, given the same arguments, even across multiple SQL statements, being classified as IMMUTABLE function.

* Changed age_end_id signature to IMMUTABLE

* Function signature was changed from STABLE to IMMUTABLE;
* Function receives an edge container (or null), and analyze its contents to return the "end_id" stored in said container;
* As it acts only on its arguments, it will always return the same result, given the same arguments, even across multiple SQL statements, being classified as IMMUTABLE function.
  • Loading branch information
markgomer authored and jrgemignani committed Feb 9, 2023
1 parent cbd84c3 commit ab44d0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions age--1.1.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3413,23 +3413,23 @@ AS 'MODULE_PATHNAME';
CREATE FUNCTION ag_catalog.age_id(agtype)
RETURNS agtype
LANGUAGE c
STABLE
IMMUTABLE
RETURNS NULL ON NULL INPUT
PARALLEL SAFE
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog.age_start_id(agtype)
RETURNS agtype
LANGUAGE c
STABLE
IMMUTABLE
RETURNS NULL ON NULL INPUT
PARALLEL SAFE
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog.age_end_id(agtype)
RETURNS agtype
LANGUAGE c
STABLE
IMMUTABLE
RETURNS NULL ON NULL INPUT
PARALLEL SAFE
AS 'MODULE_PATHNAME';
Expand Down

0 comments on commit ab44d0c

Please sign in to comment.