Package: postgresql-extension-installer
Get Started withPostgresql Extension InstallerGetting StartedUse our step-by-step guide to get started withPostgresql Extension Installerin minutes.1. Download PythonGet started with Python to use everything in thePostgresql Extension Installer. We recommend using the 3.6 version.Download Python2. Get the command line toolpipinstallpostgresql-extension-installer3. Download PostgreSQLGet started with PostgreSQL to use everything in thePostgresql Extension Installer. We recommend using the latest version.4. Enabling Contrib-- Must be python3uCREATEEXTENSIONpython3u;5. Enabling PostgreSQL Extension InstallerCREATEORREPLACEFUNCTIONm_installer_setup()RETURNSTEXTLANGUAGE'plpython3u'COST100VOLATILEAS$BODY$#-- ==========================================================#--    Installer#--    Copyright 2019 LEE DONG GUN(2019.12.28)#-- ==========================================================frompostgresql_extension_installerimportInstallerinstaller=Installer(plpy)return"ok"$BODY$;DocumentationAPI Reference.Query FormatIt is similar to XML.Info-->Info<----<Name>---- INSERT UNIQUE NAME HERE (e.q com.example.packagename)--<Version>---- INSERT VERSION HERE--<Provider>---- INSERT PROVIDER HERE--<lib>---- INSERT PYTHON LIBRARY HEREExample-->Info<----<Name>--me.faena.postgresql_extension_installer--<Version>--2019.12.22.1010--<Provider>--https://raw.githubusercontent.com/Sotaneum/PostgreSQL-Extension-Installer/master/tests/test.queryhttps://raw.githubusercontent.com/Sotaneum/PostgreSQL-Extension-Installer/alpha/tests/test.query--<lib>--postgresql_deepgeoTable-->Table<----<TABLE_NAME>--CREATETABLETABLE_NAME(-- INSERT HERE COLUMN);Example-->Table<----<sql_list>--CREATETABLEsql_list(sqljson);2 or more-->Table<----<sql_list>--CREATETABLEsql_list(sqljson);--<log_list>--CREATETABLElog_list(logtext);Function-->Function<----<FUNCTION_NAME>--CREATEORREPLACEFUNCTIONFUNCTION_NAME()-- INSERT HERE FUNCTIONALTERFUNCTIONFUNCTION_NAME();Example-->Function<----<print_info>--CREATEORREPLACEFUNCTIONprint_info()RETURNSTEXTLANGUAGE'plpython3u'COST100VOLATILEAS$BODY$#-- ==========================================================#--    Installer#--    Copyright 2019 LEE DONG GUN(2019.12.22)#-- ==========================================================return'TEST'$BODY$;2 or more-->Function<----<print_info>--CREATEORREPLACEFUNCTIONprint_info()RETURNSTEXTLANGUAGE'plpython3u'COST100VOLATILEAS$BODY$#-- ==========================================================#--    Installer#--    Copyright 2019 LEE DONG GUN(2019.12.22)#-- ==========================================================return'TEST'$BODY$;ALTERFUNCTIONprint_info();--<create_table>--CREATEORREPLACEFUNCTIONcreate_table(charactervarying)RETURNStextLANGUAGE'plpgsql'COST100VOLATILESTRICTAS$BODY$DECLAREf_table_namealiasfor$1;model_name_strtext;BEGINsql:='CREATE TABLE '||f_table_name||'(log TEXT);';EXECUTEsqlINTOmodel_name_str;RETURNquote_literal(model_name_str);END;$BODY$;ALTERFUNCTIONcreate_table(charactervarying);COMMENTONFUNCTIONcreate_table(charactervarying)IS'args: table_name';Type-->Type<----<TYPE_NAME>--CREATETYPETYPE_NAMEAS(-- INSERT HERE COLUMN);Example-->Type<----<point>--CREATETYPEpointAS(xint,yint);2 or more-->Type<----<point>--CREATETYPEpointAS(xint,yint);--<mpoint>--CREATETYPEmpointAS(pointpoint[]);OtherOther SQL usage is possible if supported by PostgreSQL.Support FunctionsInstallExampleSELECTm_installer_install()UpdateWill try to reinstall base on the installed information.ExampleSELECTm_installer_update();UninsallWill try to uninstall base on the installed information.ExampleSELECTm_installer_uninstall();Python Library Install(Update)Will try to Install about Python Library based on the installed information.ExampleSELECTm_installer_pylib_update();Remove CacheTry delete the space used for the installation.ExampleSELECTm_installer_delete_cache();Log2019.12.28.1256createloaderfrom db, file, defaultpyhon_packageinstall python libqueryutil2019.12.22.1618defualt format modifyProvider Bug fix2019.12.22.0216Python library InstallBug fixCopyrightCopyright (C) 2019 LEE DONG GUN. (gnyontu39@gmail.com) and contributors