<div dir='rtl'><div>
<div dir="ltr">Hi,</div>
<div dir="ltr">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<b> still appear</b>.</div>
<div dir="ltr">This is a very wierd issue.</div>
<div dir="ltr"> </div>
<div dir="ltr">I upload backups using pg_restore and</div>
<div dir="ltr">psql -h SERVER -U USERNAME -f backup.sql -q -d databasename -pPORT 2>errors.txt >output.txt</div>
<div dir="ltr"> </div>
<div dir="ltr">When I open the errors.txt file I see:</div>
<div dir="ltr"> </div>
<div dir="ltr">psql:backup.sql:43112523: ERROR: relation "tablename" does not exist<br />LINE 3: from tablename<br /> ^<br />QUERY: <br />select tablenameid<br />from tablename<br />join tablename_visable v using(statusid)<br />where id=$1 <br />order by id,case statusidwhen 2 then 1 when 1 then 2 else 3 end, coalesce(rev,'-1') desc<br />limit 1</div>
<div dir="ltr"> </div>
<div dir="ltr"> </div>
<div dir="ltr">Now, the intresting thing is that tablename exists in the backup.</div>
<div dir="ltr">I can do:</div>
<div dir="ltr">select * from tablename</div>
<div dir="ltr">The table is OK, the data is OK. So I don't understand this error.</div>
<div dir="ltr"> </div>
<div dir="ltr">It looks like a wrong order of commands, maybe the creation of the table is done after it creates this code?</div>
<div dir="ltr"> </div>
<div dir="ltr">Why is this happens?</div>
</div></div>