Error in Fhirbase api - hapi-fhir

I want to use Fhirbase api for my project and i refer http://fhirbase.github.io/installation.html (Local) this link to install fhirbase server and follow all the steps which is given in document,
but when i try to execute first api SELECT fhir_create_storage('{"resourceType": "Patient"}'); it's give me error like,
ERROR: function fhir_create_storage(unknown) does not exist
LINE 1: SELECT fhir_create_storage('{"resourceType": "Patient"}');
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
how i can solve it?

You have to init plv8 machine by SET plv8.start_proc = 'plv8_init';. This should be done on a fresh connection, so reconnect and execute this statement as first one or put it in postgresql.conf. http://pgxn.org/dist/plv8/doc/plv8.html#Start-up.procedure

Related

Postgres alter system command fails using Hibernate fails

I want to make a change to the postgres.conf file at runtime. However, when I execute the sql with "alter system" via hibernate I get an error
Transaction is marked for rollback only or has timed out
I think this has something to do with alter system commands not allowed to execute inside a transaction block as per the documentation
Only superusers can use ALTER SYSTEM. Also, since this command acts directly on the file system and cannot be rolled back, it is not allowed inside a transaction block or function.
Im trying to understand if its possible to execute this type of command with hibernate and what I need to do to be able to do that?

DB2 SQL replication: drop member command is not working

I am trying to drop a member from a subscription set. below command seems to be correct but getting the error. Please check and assist ?
I have set the capture, control and apply server before running drop member command.
DROP MEMBER FROM SETNAME SET22 APPLYQUAL MYQUAL22
SOURCE DB2WCS.CATENTDESC TARGET DB2WCS.CATENTDESC;
ASN1950E ASNCLP : An unexpected token "SETNAME" was found. Valid
tokens include "FROM".
ASN1954E ASNCLP : Command failed.
If the Db2 server runs on Linux/Unix/Windows, and is either Version 10.5.0.8 or V11.1 then you may be experiencing this bug. You might want to contact IBM support.
Thanks for the update.
IBM support suggested below workaround,
Regarding the problem in question, I've found an APAR fixed in Fixpack 9.
http://www-01.ibm.com/support/docview.wss?uid=swg1JR57130
If you can't upgrade to FP9, there're 2 workarounds, although are not shown in APAR:
1.- Specify a second "FROM" into the ASNCLP like
DROP MEMBER FROM FROM SETNAME ... APPLYQUAL ... SOURCE ... TARGET ...
2.- Use the INCLUDE HISTORY clause like:
DROP MEMBER INCLUDE HISTORY FROM SETNAME ....

must be owner of extension plpgsql error when executing pg_restore

i was trying to restore database on amazon rds.. i am getting error message like:
ERROR: must be owner of extension plpgsql CREATE EXTENSION
ERROR: must be owner of extension dblink CREATE EXTENSION
ERROR: must be owner of extension pgcrypto
Any idea how to solve this issue ?.
I believe both of those extensions are supported by RDS.
See:
$SHOW rds.extensions;
Retrieved from this link
As for enabling the syntax should be along the lines of
#enable_extension "dblink";
As Craig Ringer mentioned rds_super isn't a real superuser. So, you can't create the extensions. However, you should be able to enable them.
As in this example
So, you can ignore the errors, but need to manually enable whatever extensions you need. Also I think pl/pgsql may be already there. Try
$\dx

ERROR: function addgeometrycolumn does not exist: When trying to import file into POSTGIS database by QGIS DB Manager

I am trying to import a shapefile via db manager in QGIS to my POSTGIS database but I get an error, that I do not know to resolve:
ERROR: function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('demoschema','Bomen',NULL,31370,'MU...
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
So what do I need to do?
Without postgis extension in postgresSQL, if you try to add any spatial layers to postgresSQL , you get above error.
In pgadmin right click on extensions and check whether postgis extension is saved or not.
if in extensions postgis option is absent ,you can follow these steps to
install postgis in postgres https://www.youtube.com/watch?v=afK8GWpb8RU
The 3rd parameter is the column name, which is Null in your case. Make sure you specify it in the interface

PhpStorm - ERROR: type "hstore" does not exist

I use primary pgAdmin to browse and edit my PostgreSQL database. Now I would like to use PhpStorm.
In PhpStorm I can browse my tables, but I can not edit data. When I try I get error:
[42704] ERROR: type "hstore" does not exist
Kde: compilation of PL/pgSQL function "on_update" near line 3
Function on_update is on update trigger and it save old row to history table and it uses hstore type.
PhpStorm uses postgresql-9.4-1201.jdbc4.jar driver. I don't know if it is driver error or PhpStorm error. I know that in pgAdmin it works and in PhpStorm not.
I work with same environment as Vojtěch and I have found that the extension is indeed created and present. But in different schema (public) then the current connection operates (the PostgreSQL search_path). There is probably bug in PhpStorm as its not respecting PostgreSQL user's default search_path.
Some workarounds (for DB console only):
In database console you use RESET SEARCH_PATH; statement.
You can enforce search_path on JDBC connection, see the question.