Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

Commonmark migration
Source Link

The error is related to what's explained in the doc here:

40.5.2 Executing a Command With No Result
[...]

Sometimes it is useful to evaluate an expression or SELECT query but discard the result, for example when calling a function that has side-effects but no useful result value. To do this in PL/pgSQL, use the PERFORM statement:

PERFORM query;

You should write:

PERFORM setval('custom_sequence', base_val);

The error is related to what's explained in the doc here:

40.5.2 Executing a Command With No Result
[...]

Sometimes it is useful to evaluate an expression or SELECT query but discard the result, for example when calling a function that has side-effects but no useful result value. To do this in PL/pgSQL, use the PERFORM statement:

PERFORM query;

You should write:

PERFORM setval('custom_sequence', base_val);

The error is related to what's explained in the doc here:

40.5.2 Executing a Command With No Result
[...]

Sometimes it is useful to evaluate an expression or SELECT query but discard the result, for example when calling a function that has side-effects but no useful result value. To do this in PL/pgSQL, use the PERFORM statement:

PERFORM query;

You should write:

PERFORM setval('custom_sequence', base_val);
Source Link
Daniel Vérité
  • 62.4k
  • 17
  • 135
  • 160

The error is related to what's explained in the doc here:

40.5.2 Executing a Command With No Result
[...]

Sometimes it is useful to evaluate an expression or SELECT query but discard the result, for example when calling a function that has side-effects but no useful result value. To do this in PL/pgSQL, use the PERFORM statement:

PERFORM query;

You should write:

PERFORM setval('custom_sequence', base_val);
lang-sql

AltStyle によって変換されたページ (->オリジナル) /