Copying DB to new production env using dokku pg-plugin - postgresql
Moving from heroku to dokku / digital ocean, I've used pg_dump to copy the database into a file 'latest.dump' and using pg_restore to my local pg db and it worked properly. But when I try to run the dokku postegresql:restore command, it runs and I receive 'database restored' but there are many errors and none of the data is actually restored. Any suggestions for how to troubleshoot / what is causing the errors?
root#domain:~# dokku postgresql:restore db_name < dokku/db/latest.dump
ERROR: syntax error at or near "PGDMP"
LINE 1: PGDMP
id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: version character varying(255) NOT NULL
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: id integer NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: START WITH 1
^
ERROR: syntax error at or near ""
LINE 1: _time, early_l...
^
ERROR: syntax error at or near "_price"
LINE 1: _price, delivery_counter, credit_card, yrd_per) FROM stdin;
^
ERROR: syntax error at or near "ADD"
LINE 1: ADD CONSTRAINT adjustments_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT clients_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT contacts_tables_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT deliveries_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT devices_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT drivers_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT invoices_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT locations_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT materials_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT mixes_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT orders_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT payments_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT plants_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT products_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT statements_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT tags_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT trucks_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT users_pkey PRIMARY KEY (id);
^
ERROR: syntax error at or near ""
LINE 1: ADD CONSTRAINT workdays_pkey PRIMARY KEY (id);
^
invalid command \
invalid command \
invalid command \�/x$Ր�8X~`�O`�����*a
�ЛU[2u^����ar���m��kU�"���!���c,Llel��ˀ��u�ʚb[
invalid command \�n
invalid command \$�I�m�
ɤ�HK��
invalid command \�}�b����7�6�]D�x�����|��l�D�Y}�P��A�T�װLJ��.{�ۇ�{c�bܤ��
invalid command \2��h[�/!I��${�7�#lHhLD���dÄG#�P�rL���qtkU����Iܩ&$�i�I��=0!�
invalid command \��`.���y���,�{0B�z�f3�^��?q�
invalid command \W���WIJ����lQ�
invalid command \r�9�S܀�fk�
invalid command \螀ܠ��T��g���eXx{j��8����x�Xt6�
invalid command \~zʘ�Z���OiƘbl}#p�E��.�;א}{8I��b�]��Rf�1��0
invalid command \q�6|P
��o��j���I���V
^��S
invalid command \��(��D����a����B(�ϓ]n�~Љ��������W����
invalid command \$�a��s8�5g��:�=#�!^�L6�0mjO;3��/�Ei7��)�Xp�K�
invalid command \�����q�P�ZF��
ERROR: syntax error at or near ""
LINE 1: ��kη�>6�x�
E�����U����d�]T���&
��_E>p��k��In�~�...
^
invalid command \x�6�`YIk
invalid command \�Q��8�
<¼��njWڡ��
invalid command \դ�n�|��p�ҍ���gve�d�]�{�/Ó+�Q�.�NQ�s��z)`SI.��v�8�U��[ͮi�Z�������FU
invalid command \�M�>=���7�;��4�!y25�J�������E=��(�LS֜{�S�I�3;
invalid command \ʑ<�0b<��Jm��y�]��9�B���V(��#��?���{�m�]AVv3嘫�f�Q�X=���
invalid command \l�I�W.
invalid command \��i���Tc��^���
invalid command \�刄��+�u�
invalid command \([����&DrLL�NC�l���E�J��uR��c�HQ�e*e�e8�V?R/�y���O�S��.+c��7E�V5�K��ɵC'��
invalid command \�
invalid command \'�Ε]���[ޮ���h�J/RV=�'�v�7m�z�-�,���v]�X�����Z%�5��P�jYi�.�N,���[δ���v��1`���n�օ��h
invalid command \�Wb���'�B-62y��
invalid command \�������sl�Q�
ERROR: syntax error at or near "Lnܚ"
LINE 1: Lnܚ��H�f�2U�Q���"��C��4(+6a�0EF?�*:�'=��^�^i� �T�)�...
^
invalid command \#i�ě��(������g���ժ�`Q˅&�O{�F������%��u�(GEMW��0�����G���}1�8�u��rF�V4�Y4:�'�h���ݟ�M�8�Q�
invalid command \'g�7�Zo����#i���R��jY��u*%��E���ց��s��M�'�#�d��<9�?���&�Rd�v�TTj3B=>��]Y6DsT�hǃ���=w�D�M47��!2�B�%�f��)S�ʽJr���8;��].x^�Vv�ɸ7����'R��BG5��rMt�F��&���{�)�B�����_~����f��*���ۻLJ���wo�m�{|����.�����������w��e9�&g�Ə�lNQ�<|�6˙��u��f��p��40�1g]�0ő�թ��-+�M��r����+���e�+�i���s݂�����b��y�ݾy>���S��m�2nUǨ���x[v�vخ�yec�h3[-}����N�s��:^�p���%�ʑ�I�ŸO������5Ģ!Bj�h��
ERROR: syntax error at or near "2"
LINE 1: 2^͗i��u� ���U�9zD>����(���q�ϫCw��O��6Q[D��...
^
invalid command \��Q%�,~�
invalid command \S��C�
�
ERROR: syntax error at or near "�3��"
LINE 1: �3��� ��0� V�[�� �Bz2K�W�1�X�:��|E{2� D���+sQ�...
^
ERROR: syntax error at or near "˭�y��"
LINE 1: ˭�y��
���4�:��Rz�g+�����ɲ�U+1�V
�"�
^
invalid command \Y8��t��.
invalid command \�;�K
ERROR: syntax error at or near "Y��"
LINE 1: Y��]�hI?w}8�U��C�K��`2c���/��]*NTG+�����
&ai��-w...
^
invalid command \���:vH*a7���g�7uZ����ƴ5j8���
invalid command 0��M���-U0�9�+���b,R�
ERROR: syntax error at or near "��9�"
LINE 1: ��9�
�UD6q�)�LѴ��L�I�U��t�g��t�;xVM9����&��o����OO...
^
invalid command \ܯո�i$0��2�i�
invalid command \�0�2�$�XM�Y�r�i�7�k�e����������~z}�"�&��H(�
invalid command \Z�3��F�6t�
invalid command \O�k�i�|�bJ�+�$ٝHO�j_�ƲF���S�R���Z�
invalid command \sȗ�������Zu�/�>ddz��Mr���G��Y���wi�����p��[����Cw�#�&�K���$j�w�|wa�����
invalid command \�d���j���
invalid command \[9ד���sPFo���c�S��>���hG>GOߥ��;��۞Z��`�6�Aa
invalid command \���g<Y��I#��FR��V�
invalid command \w��枎�S�%����=uR��7
invalid command \�k'�#��li��P4��F�I��^E��߷��7
invalid command \��onC�!�CX�;1����s�yFdy2�G���'S�82��
invalid command \��V���Bh{�
invalid command \��s���`
invalid command \�N&h�:31$�Mul+��k��<.�b�Z���g.�YUn1^�u�"𠒑GƇ�#Ʈ�.�>ߙ�h
invalid command \�xIrK�2
ERROR: syntax error at or near "�"
LINE 1: ��I��}*X�L����_���%��~8gt�ȃ�l�BZ,˹��s]��d�����h�e�a/
^
invalid command \k�
Nj��#��#���79M��L�|�o�6Lᘪ��[&�[(��*�
ERROR: syntax error at or near "�"
LINE 1: �
^
-----> db_name database restored
I believe a similar problem happened to me when trying to complete a similar task. You need to use a .sql file when uploading the database to your new stack. By default, Heroku gives you a .dump file. What worked for me was copying the database to my local development pg db using the .dump file and then using that to generate a .sql file which I pushed to my new app.
This worked for me:
pg_restore -O latest.dump | dokku postgresql:restore <db_name>
found here: https://github.com/Kloadut/dokku-pg-plugin/issues/52
Related
Why does one of these very similar jsonpaths work, but not the other?
Bumped into this while debugging a query from the ORM and have no idea why it happens. Asking mostly out of curiosity. In PostgreSQL 12.5 the following occurs: -- All good: select ('$[*] ? (#.live_at <= 2020-11-18)')::jsonpath jsonpath | ---------------------------------------| $[*]?(#."live_at" <= (2020 - 11) - 18) | -- But then: select ('$[*] ? (#.live_at <= 2020-05-18)')::jsonpath SQL Error [42601]: ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 SQL Error [42601]: ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 SQL Error [42601]: ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 SQL Error [42601]: ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 ERROR: syntax error, unexpected IDENT_P at end of jsonpath input Position: 9 I've a suspicion that this is related to octal representation, but node seems to eat 2020-05-18 just fine. What gives?
Unable To Assign Query Result To A Variable In PostgreSQL
I have been struggling to assign the query result to a temp variable in PostgreSQL and I just can't get it to work. Can anyone guide please? I tried with the both the below queries and I get the error shown below. I then tried with temp table. But it still fails during the assignment to the temp variable. set var.ITEM_ID =(select t.item_id from api_item t inner join api_identifier i on i.item_id=t.item_id where i.value='99999'); set var.ITEM_ID = select t.item_id from api_item t inner join api_identifier i on i.item_id=t.item_id where i.value='99999'; The first statement throws the error :- [2020-03-03 08:10:50] [42601] ERROR: syntax error at or near "(" [2020-03-03 08:10:50] Position: 23 Second one throws the below error:- [2020-03-03 08:10:55] [42601] ERROR: syntax error at or near "select" [2020-03-03 08:10:55] Position: 24
How to get points from OpenStreetMap of a certain country?
i'm trying to get the list of all schools in my country, and after several tries i write the following query that works with no errors on http://overpass-turbo.eu: /* This has been generated by the overpass-turbo wizard. The original search was: “amenity=school”=“yes” */ [out:json][timeout:60]; // gather results ( // query part for: “amenity=school” node[amenity=school]({{geocodeBbox:Italia}}); way[amenity=school]({{geocodeBbox:Italia}}); relation[amenity=school]({{geocodeBbox:Italia}}); ); // print results out body; >; out skel qt; I used geocodeBbox to select all schools of Italy because geocodeId and geocodeArea (please refer to documentation) give me the following errors: Error: line 10: parse error: ')' expected - '(' found. Error: line 11: parse error: ')' expected - '(' found. Error: line 11: parse error: ';' expected - ')' found. Error: line 12: parse error: ')' expected - '(' found. Error: line 12: parse error: ';' expected - ')' found. Error: line 13: parse error: Unknown type ")" Error: line 13: parse error: An empty query is not allowed Error: line 13: parse error: Unknown type ";" Error: line 15: parse error: An empty query is not allowed Anyway the problem is that the query selects even schools that are not in Italy (for example there is a school from Croatia). So, how to get exactly the points from a certain country?
Anyway the problem is that the query selects even schools that are not in Italy (for example there is a school from Croatia). That's correct. A bounding box (bbox) is a rectangle, not a polygon. Therefore it will always include a little bit more, except if you have a rectangle-shaped country that is also perfectly aligned with the given bbox ;) Try this query instead: [out:json][timeout:600]; // gather results {{geocodeArea:Italia}}->.searchArea; ( // query part for: “amenity=school” node[amenity=school](area.searchArea); way[amenity=school](area.searchArea); relation[amenity=school](area.searchArea); ); // print results out body; >; out skel qt;
JasperReports Server compile error for subreports
I have designed a report in iReport and trying to run it in JasperReports Server 4.7.0 but getting below errors while executing the report: The server has encountered an error. Please excuse the inconvenience. Error Message com.jaspersoft.jasperserver.api.JSExceptionWrapper: Errors were encountered when compiling report expressions class file: 1. Syntax error on token ":", , expected value = {repo:"C:\\Users\\ukhare\\Desktop\\report\\report8_subreport1.jasper"}; //$JR_EXPR_ID=10$ ^ 2. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ ^ 3. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <--------------------------------> 4. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <----> 5. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ ^ 6. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <--------------------------------> 7. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <----> 8. Syntax error on token ":", , expected value = {repo:"C:\\Users\\ukhare\\Desktop\\report\\report8_subreport1.jasper"}; //$JR_EXPR_ID=10$ ^ 9. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ ^ 10. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <--------------------------------> 11. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <----> 12. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ ^ 13. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <--------------------------------> 14. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <----> 15. Syntax error on token ":", , expected value = {repo:"C:\\Users\\ukhare\\Desktop\\report\\report8_subreport1.jasper"}; //$JR_EXPR_ID=10$ ^ 16. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ ^ 17. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <--------------------------------> 18. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport2.jasper; //$JR_EXPR_ID=12$ <----> 19. Syntax error on token ":", ; expected value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ ^ 20. Syntax error on tokens, delete these tokens value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <--------------------------------> 21. Syntax error, insert "AssignmentOperator ArrayInitializer" to complete Expression value = repo:C:\\Users\\ukhare\\Desktop\\report\\report8_subreport3.jasper; //$JR_EXPR_ID=14$ <----> 21 errors Any idea how to fix it ?
ERROR: function make_standard_name(unknown) does not exist while installing OSM-nominatim API
I am installing nominatim on my own server using the guidence of http://wiki.openstreetmap.org/wiki/Nominatim/Installation... But I am facing problem while adding country phrases / codes to my pgsql DB. I am doing this with following command as given in above link: psql -d nominatim -f specialphrases_countries.sql But, I am getting following error: psql:specialphrases_countries.sql:1: ERROR: function make_standard_name(unknown) does not exist LINE 1: select getorcreate_country(make_standard_name('uk'), 'gb'); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. psql:specialphrases_countries.sql:2: ERROR: function make_standard_name(unknown) does not exist LINE 1: select getorcreate_country(make_standard_name('united states... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. psql:specialphrases_countries.sql:3: ERROR: relation "country_name" does not exist LINE 1: ...e_standard_name(country_code), country_code) from country_na... ^ psql:specialphrases_countries.sql:4: ERROR: relation "country_name" does not exist LINE 1: ...try_name.name,ARRAY['name'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:5: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:af'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:6: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ar'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:7: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:br'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:8: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ca'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:9: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:cs'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:10: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:de'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:11: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:en'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:12: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:es'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:13: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:et'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:14: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:eu'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:15: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:fa'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:16: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:fi'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:17: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:fr'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:18: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:gl'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:19: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:hr'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:20: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:hu'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:21: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ia'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:22: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:is'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:23: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:it'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:24: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ja'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:25: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:mk'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:26: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:nl'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:27: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:no'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:28: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:pl'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:29: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ps'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:30: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:pt'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:31: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:ru'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:32: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:sk'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:33: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:sv'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:34: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:uk'])), country_code) from country_na... ^ psql:specialphrases_countries.sql:35: ERROR: relation "country_name" does not exist LINE 1: ..._name.name,ARRAY['name:vi'])), country_code) from country_na... ^ I dont know what is "make_standard_name(unknown)", how to create it to solve "ERROR: function make_standard_name(unknown) does not exist"... Please suggest.
The function make_standard_name(text) is added to the database by the proceeding step in the install process: http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Import_and_index_OSM_data If this function is missing then either that step was missed or an error occurred during that step. You will need to run it successfully before you can import the extra country name data. You can try ./util/setup.php --create-functions to just generate the functions (rather than ./util/setup.php --all), but given the error your database is almost certainly invalid and you will have other problems if you continue.
I'd say that's not actually the first error you get. Try re-running the creation and sending the output to a file. Look for the FIRST error. One way to do that is to tell psql to abort after an error, which on unix/linux is: ON_ERROR_STOP=1 psql -d nominatim -f specialphrases_countries.sql On Windows I think it's: set ON_ERROR_STOP=1 psql -d nominatim -f specialphrases_countries.sql Since you've already partially loaded your data this may not work well, though, as it may try to create things that already exist. You may need to run any clean/remove script the package provides, or (if possible) run it on a new clean database instead. For testing, try creating a new blank database and trying to load the data with: ON_ERROR_STOP=1 psql -d mytestdb -1 -f specialphrases_countries.sql Note the -1 there, which tells psql to run the job in a single transaction. That's often a good idea anyway as it ensures create/load scripts always succeed or fail as a whole.