I should say that I'm haviing this issue since 9.3.2 I though it would be resolved when I upgrade to 9.3.17 but this still appear.
This is a very wierd issue.
I upload backups using pg_restore and
psql -h SERVER -U USERNAME -f backup.sql -q -d databasename -pPORT 2>errors.txt >output.txt
When I open the errors.txt file I see:
psql:backup.sql:43112523: ERROR:  relation "tablename" does not exist
LINE 3: from tablename
select tablenameid
from tablename
join tablename_visable v using(statusid)
where id=$1
order by id,case statusidwhen 2 then 1 when 1 then 2 else 3 end, coalesce(rev,'-1') desc
limit 1
Now, the intresting thing is that tablename exists in the backup.
I can do:
select * from tablename
The table is OK, the data is OK. So I don't understand this error.
It looks like a wrong order of commands, maybe the creation of the table is done after it creates this code?
Why is this happens?

Reply via email to