-2

Dump Commond:


    pg_dump -Fc test >  /home/backup/test4.sql.gz 

Restore Commond:


    bash-4.1$ pg_restore -d test /home/backup/test4.sql.gz 
    pg_restore: [archiver (db)] Error while PROCESSING TOC:

    pg_restore: [archiver (db)] Error from TOC entry 2408; 0 666136 TABLE DATA pat postgres
    pg_restore: [archiver (db)] COPY failed for table "pat": ERROR:  pattern_in is not implemented
    CONTEXT:  COPY pat, line 1, column ptn: "((0.244171, 0.008272, 0.021515, -0.012174, 0.068765, 0.076409, 0.016820, 0.021921, 0.114738, 0.12366..."
    pg_restore: [archiver (db)] Error from TOC entry 2445; 0 4877471 TABLE DATA pat_303816 postgres
    pg_restore: [archiver (db)] COPY failed for table "pat_303816": ERROR:  pattern_in is not implemented
    CONTEXT:  COPY pat_303816, line 1, column ptn: "((0.446228, -0.151998, -0.054444, -0.095391, 0.027121, 0.028324, 0.017388, 0.133117, 0.008461, 0.012..."
    pg_restore: [archiver (db)] Error from TOC entry 2441; 0 4800536 TABLE DATA pat_402653 postgres
    pg_restore: [archiver (db)] COPY failed for table "pat_402653": ERROR:  pattern_in is not implemented
    CONTEXT:  COPY pat_402653, line 1, column ptn: "((0.505515, 0.040819, 0.057495, 0.044649, 0.065036, 0.021012, 0.006341, 0.045162, 0.061616, 0.085675..."
    pg_restore: [archiver (db)] Error from TOC entry 2449; 0 4878143 TABLE DATA pat_452238 postgres
    pg_restore: [archiver (db)] COPY failed for table "pat_452238": ERROR:  pattern_in is not implemented
    CONTEXT:  COPY pat_452238, line 1, column ptn: "((0.124739, -0.015536, 0.045421, 0.013990, 0.000782, 0.013343, 0.018824, 0.002218, 0.009941, 0.01699..."
    WARNING: errors ignored on restore: 4

jiejia
  • 1
  • 2

1 Answers1

0

If I'm not mistaken, one of your views is referencing a function called pattern_in.

You're missing an extension in your database. You'll need to run CREATE EXTENSION foo after creating the database, but before restoring your database from backup. Where foo is the name of the extension that provides the pattern_in function; I think it could be this one.

amphetamachine
  • 27,620
  • 12
  • 60
  • 72
  • I have run this commond before restoring, `create extension imgsmlr;` But there is the same issue. `pattern_in is not implemented` – jiejia Jun 01 '17 at 15:25