Search Postgresql Archives

Re: query has no destination for result data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





I believe language plpgsql is not considered part of the function body
so it is not included in the line count:

https://www.postgresql.org/docs/10/plpgsql-structure.html

When tracking a line number down I usually do:

\ef some_function line_number

which counts the line in the function body not the file. So for example:

Using set nu in Vi:

1 CREATE OR REPLACE FUNCTION public.ts_update()
2  RETURNS trigger
3  LANGUAGE plpgsql
4 AS $function$
5 BEGIN
6     NEW.ts_update := timeofday();
7 RETURN NEW;
8 END;
9 $function$

\ef ts_update 4

CREATE OR REPLACE FUNCTION public.ts_update()
  RETURNS trigger
  LANGUAGE plpgsql
AS $function$
BEGIN
     NEW.ts_update := timeofday();
RETURN NEW;  <--- This row is marked
END;
$function$


or

\sf+ functioname

Regards

Pavel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux