On Sat, Jan 16, 2016 at 2:55 AM, <kardash.a.v@yandex.ru> wrote:
> Try to feed sql-commands below, then do dump and you will see errors while
> restore!
Here is a shorter sequence of commands to reproduce the failure:
CREATE TABLE stend (line integer);
CREATE FUNCTION point(line integer) RETURNS numeric
LANGUAGE sql
AS $$
WITH t(line) AS (
SELECT line
FROM stend
) SELECT (4 * line)::numeric FROM t $$;
pg_dump is usually quite smart at detecting dependencies and dumping
objects in the right order, but even if in this case pg_dump is
obviously wrong, there is no way for it to know that the function it
creates depends on this relation.
--
Michael