I have windows 8.1 and I want to try hadoop_fdw. Problem is with loading the extension with:
CREATE EXTENSION hadoop_fdw;
ddssdg
ERROR: could not load library "D:/PROGRA~2/POSTGR~2/pg95/../pg95/lib/postgresql/hadoop_fdw.dll": unknown error 126
********** Error **********
ERROR: could not load library "D:/PROGRA~2/POSTGR~2/pg95/../pg95/lib/postgresql/hadoop_fdw.dll": unknown error 126
SQL state: XX000
I tried to create extension manually from SQL located at "D:\Program Files\PostgreSQLBigsql\pg95\share\postgresql\extension"
CREATE FUNCTION hadoop_fdw_handler()
RETURNS fdw_handler
AS 'D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll'
LANGUAGE C STRICT;
CREATE FUNCTION hadoop_fdw_validator(text[], oid)
RETURNS void
AS 'D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll'
LANGUAGE C STRICT;
CREATE FOREIGN DATA WRAPPER hadoop_fdw
HANDLER hadoop_fdw_handler
VALIDATOR hadoop_fdw_validator;
I get this error same error again:
ERROR: could not load library "D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll": unknown error 126
********** Error **********
ERROR: could not load library "D:\Program Files\PostgreSQLBigsql\pg95\lib\postgresql\hadoop_fdw.dll": unknown error 126
SQL state: XX000
What I am doing wrong?
EDIT 1: So I found missing DLL's. They are:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
JVM.DLL
I added them to C:\Windows\SysWOW64\ and extension still doesn't work - it probably requires restart.
Related
I have issues with adding database to sync. DB versions: PostgreSQL 9.6.8 (RDS), Jump system: Ubuntu18.04 LTS, bucardo version: 5.4.1.
When trying run this command:
bucardo add sync db_sync relgroup=copying_herd dbs=source_db:source,dest_db:target onetimecopy=1
I receive this error:
WARNING: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=dc_sourcedb;host=xxx.aaa.xyz;port=5432 at line 126.
Failed to add sync: DBD::Pg::st execute failed: ERROR: DBD::Pg::db do failed: ERROR: function search_string(text) does not exist
LINE 5: array_agg(search_string(x)),
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY:
SELECT
coalesce(
array_to_string(
array_agg(search_string(x)),
'|'
)::text,
''
)
FROM unnest($1) x
CONTEXT: SQL function "flatten_text_array" during inlining at line 126. at line 30.
CONTEXT: PL/Perl function "validate_sync" at /usr/bin/bucardo line 4612.
Function search_string exist and I can run this function from psql command line
When I try to start my mysql and apache servers through MAMP on macOS, I get a message every time saying that mysql needs to be updated.
I try to update mysql through the MAMP interface, but it errors out with this:
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: /Applications/MAMP/Library/bin/mysql
Looking for 'mysqlcheck' as: /Applications/MAMP/Library/bin/mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
How do I fix this so that I can start my servers properly?
EDIT for clarity: I appreciate the link to the other thread. Very similar but I still need help with getting MAMP to update mysql. When I try /Applications/MAMP/Library/bin/mysql_upgrade --port=3306 -u root -p in the terminal as suggested in that post I get:
Looking for 'mysql' as: /Applications/MAMP/Library/bin/mysql
Looking for 'mysqlcheck' as: /Applications/MAMP/Library/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306'
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck' with connection arguments: '--port=3306'
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.innodb_index_stats
Error : Table 'mysql.innodb_index_stats' doesn't exist
status : Operation failed
mysql.innodb_table_stats
Error : Table 'mysql.innodb_table_stats' doesn't exist
status : Operation failed
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info
Error : Table 'mysql.slave_master_info' doesn't exist
status : Operation failed
mysql.slave_relay_log_info
Error : Table 'mysql.slave_relay_log_info' doesn't exist
status : Operation failed
mysql.slave_worker_info
Error : Table 'mysql.slave_worker_info' doesn't exist
status : Operation failed
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Repairing tables
mysql.innodb_index_stats
Error : Table 'mysql.innodb_index_stats' doesn't exist
status : Operation failed
mysql.innodb_table_stats
Error : Table 'mysql.innodb_table_stats' doesn't exist
status : Operation failed
mysql.slave_master_info
Error : Table 'mysql.slave_master_info' doesn't exist
status : Operation failed
mysql.slave_relay_log_info
Error : Table 'mysql.slave_relay_log_info' doesn't exist
status : Operation failed
mysql.slave_worker_info
Error : Table 'mysql.slave_worker_info' doesn't exist
status : Operation failed
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
ERROR 1146 (42S02) at line 62: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1243 (HY000) at line 63: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 64: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 66: Table 'mysql.innodb_index_stats' doesn't exist
ERROR 1243 (HY000) at line 67: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 68: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 81: Table 'mysql.slave_relay_log_info' doesn't exist
ERROR 1243 (HY000) at line 82: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 83: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 110: Table 'mysql.slave_master_info' doesn't exist
ERROR 1243 (HY000) at line 111: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 112: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 128: Table 'mysql.slave_worker_info' doesn't exist
ERROR 1243 (HY000) at line 129: Unknown prepared statement handler (stmt) given to EXECUTE
ERROR 1243 (HY000) at line 130: Unknown prepared statement handler (stmt) given to DEALLOCATE PREPARE
ERROR 1146 (42S02) at line 1896: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1897: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1898: Table 'mysql.slave_master_info' doesn't exist
ERROR 1146 (42S02) at line 1899: Table 'mysql.slave_worker_info' doesn't exist
ERROR 1146 (42S02) at line 1900: Table 'mysql.slave_relay_log_info' doesn't exist
ERROR 1146 (42S02) at line 1904: Table 'mysql.innodb_table_stats' doesn't exist
ERROR 1146 (42S02) at line 1908: Table 'mysql.innodb_index_stats' doesn't exist
FATAL ERROR: Upgrade failed
I also tried finding the my.cnf file for MAMP and backing it up as someone else in the other thread suggested but could not find it. If someone would not mind pointing out to me where it is, so that I can see if updating mysql after that works.
I will also add that I am using MAMP version 4.2 on macOS 10.12. If that helps any.
I installed PostGreSql 9.3 ( PgAdmin 3 GUI) and PostGIS 2.1.3 (http://www.enterprisedb.com/products-services-training/pgdownload#windows) for Windows 7 64 bit.
After installing it, I downloaded the Sql files for country database (http://www.spatial.cs.umn.edu/Book/labs/vania/spatialQueries.html) and tried to execute the commands in Country.sql
in the Sql Builder and stuck at the following error:
NOTICE: SRID value -1 converted to the officially unknown SRID value 0
CONTEXT: SQL statement "SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6,$7)"
PL/pgSQL function addgeometrycolumn(character varying,character varying,character varying,integer,character varying,integer,boolean) line 5 at SQL statement
ERROR: function geometryfromtext(unknown, integer) does not exist
LINE 4: ...3000.0000','Dollar','USD','N','5','United States',GeometryFr...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
********** Error **********
ERROR: function geometryfromtext(unknown, integer) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Character: 769
I can't get this error resolved. Please help me out.
I'm using Postgres 9.3 on Windows 8.1, trying the basic xml parsing functions.
In the SQL Editor I write:
XMLPARSE (CONTENT 'abc<foo>bar</foo><bar>foo</bar>');
Postgres returns me the following error:
ERROR: syntax error at or near "XMLPARSE"
LINE 1: XMLPARSE (CONTENT 'abc<foo>bar</foo><bar>foo</bar>');
^
********** Error **********
ERROR: syntax error at or near "XMLPARSE"
SQL state: 42601
Character: 1
Did I write something wrong?
In the docs for 9.3 it says:Use of this data type requires the installation to have been built with configure --with-libxml.
As I'm on windows 8.1 I have been looking in the stack builder and couldn't find the library libxml, how do I install it?
It's nothing to do with your version or platform. XMLPARSE isn't a top level command, it's a function.
regress=> XMLPARSE (CONTENT 'abc<foo>bar</foo><bar>foo</bar>');
ERROR: syntax error at or near "XMLPARSE"
LINE 1: XMLPARSE (CONTENT 'abc<foo>bar</foo><bar>foo</bar>');
^
vs
regress=> SELECT XMLPARSE (CONTENT 'abc<foo>bar</foo><bar>foo</bar>');
xmlparse
---------------------------------
abc<foo>bar</foo><bar>foo</bar>
(1 row)
I used the command:
COPY studentapp_deg_course_cat(degree_code, specialization, category_level1, category_level2, category_level3, min_credit, max_credit, primary)
FROM '/home/abhishek/Downloads/courses.csv'
USING DELIMITERS ';'
and i am getting the following error:
ERROR: syntax error at or near "COPY" LINE 1: COPY studentapp_deg_course_cat(degree_code, specialization,...
^
********** Error **********
ERROR: syntax error at or near "COPY" SQL state: 42601 Character: 1
I would like to know the error in my code
Valid COPY syntax for version 9.1 on Linux should be:
COPY studentapp_deg_course_cat(degree_code, specialization, category_level1,
category_level2, category_level3, min_credit, max_credit, "primary")
FROM '/home/abhishek/Downloads/courses.csv'
WITH (DELIMITER ';')
WITH, not USING.
DELIMITER instead of DELIMITERS.
And do not use primary as column name. It's a reserved word.