plpgsql_check on Windows

345 views
Skip to first unread message

adam.bar...@gmail.com

unread,
Apr 11, 2014, 6:31:23 AM4/11/14
to postgresql-ext...@googlegroups.com
Hello,
I compiled the plpgsql_check plugin on Win32 platform.
I'm not C++ developer but it seems that the plpgsql_check plugin works. I checked about 1500 stored functions.

My general steps to compile plpgsql_check plugin on Windows 7:
1. Download and install PostgreSQL 9.3.4 for Win32 from http://www.enterprisedb.com
2. Download and install Microsoft Visual C++ 2010 Express
3. Lern tutorial http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows
4. The plpgsql_check depends on plpgsql and we need to add plpgsql.lib to the library list. Unfortunately PostgreSQL 9.4.3 does not contain this library.
5. Create a plpgsql.lib from plpgsql.dll as described in http://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll
6. Change plpgsql_check.c file, add PGDLLEXPORT line before evry extension function, as described in http://blog.2ndquadrant.com/compiling-postgresql-extensions-visual-studio-windows
...
PGDLLEXPORT
Datum plpgsql_check_function_tb(PG_FUNCTION_ARGS);
PGDLLEXPORT
Datum plpgsql_check_function(PG_FUNCTION_ARGS);
...
PGDLLEXPORT
Datum
plpgsql_check_function(PG_FUNCTION_ARGS)
{
    Oid            funcoid = PG_GETARG_OID(0);
...
PGDLLEXPORT
Datum
plpgsql_check_function_tb(PG_FUNCTION_ARGS)
{
    Oid            funcoid = PG_GETARG_OID(0);
...
7. Build plpgsql_check.dll
8. Install plugin
  - copy plpgsql_check.dll to PostgreSQL\9.3\lib
  - copy plpgsql_check.control and plpgsql_check--0.8.sql to PostgreSQL\9.3\share\extension

Regards
Adam
plpgsql_check_win32_postgresql-9.3.4.zip
Message has been deleted

adam.bar...@gmail.com

unread,
Aug 29, 2014, 5:44:53 AM8/29/14
to postgresql-ext...@googlegroups.com
plpgsql_check v 0.9 win32 PostgreSQL 9.3.5
plpgsql_check_0.9_20140828_win32_postgresql_9.3.5.zip

Pavel Stehule

unread,
Aug 29, 2014, 6:09:21 AM8/29/14
to adam.bar...@gmail.com, postgresql-ext...@googlegroups.com
Hi Adam

nice,

can I publish your instructions ?

Regards

Pavel


--
You received this message because you are subscribed to the Google Groups "postgresql-extensions-hacking" group.
To unsubscribe from this group and stop receiving emails from it, send an email to postgresql-extension...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

adam.bar...@gmail.com

unread,
Aug 29, 2014, 8:30:00 AM8/29/14
to postgresql-ext...@googlegroups.com, adam.bar...@gmail.com
Yes, of course
Adam

Pavel Stehule

unread,
Aug 29, 2014, 11:50:00 AM8/29/14
to adam.bartoszewicz, postgresql-extensions-hacking
Thank you

Pavel


adam.bar...@gmail.com

unread,
Jan 13, 2015, 11:53:31 AM1/13/15
to postgresql-ext...@googlegroups.com
plpgsql_check v 0.9.3 win32 PostgreSQL 9.3.5
plpgsql_check_0.9.3_win32_postgresql_9.3.5.zip
Reply all
Reply to author
Forward
0 new messages