plproxy.git
11 years agoremote_wait_for_cancel: avoid unnecessary warning master
Marko Kreen [Tue, 5 Nov 2013 22:37:56 +0000 (00:37 +0200)]
remote_wait_for_cancel: avoid unnecessary warning

If the remote server cannot be connected and query is canceled,
don't show random warning about "Unfinished connection".

Patch by Fazal Majid

11 years agoUse setseed() in RUN ON ANY regtest.
Marko Kreen [Sat, 24 Aug 2013 15:51:12 +0000 (18:51 +0300)]
Use setseed() in RUN ON ANY regtest.

Without it, the test can fail occasionally.

Reported by Peter Eisentraut.

11 years agoremote_wait_for_cancel: move pending check before poll()
Marko Kreen [Mon, 8 Jul 2013 15:00:52 +0000 (18:00 +0300)]
remote_wait_for_cancel: move pending check before poll()

Otherwise it can still hang.

12 years agoInstead 2.5.1, use 2.6 as next ver.
Marko Kreen [Mon, 15 Apr 2013 11:56:41 +0000 (14:56 +0300)]
Instead 2.5.1, use 2.6 as next ver.

the validator is too big change for 2.5.1

12 years agoComment typo
Marko Kreen [Mon, 15 Apr 2013 11:54:01 +0000 (14:54 +0300)]
Comment typo

12 years agoremote_wait_for_cancel: wait only C_QUERY_READ connections.
Marko Kreen [Mon, 15 Apr 2013 11:45:49 +0000 (14:45 +0300)]
remote_wait_for_cancel: wait only C_QUERY_READ connections.

Previous check was too broad and left plproxy hanging.

Reported-By: Tarvi Pillessaar
12 years agoAdd language validator
Peter Eisentraut [Thu, 31 Jan 2013 15:01:32 +0000 (10:01 -0500)]
Add language validator

Refactor some internals to make this possible.  Mainly, FunctionCallInfo
is not available when validating, so avoid accessing that if not
required.  Rename plproxy_compile() to plproxy_compile_and_cache() and
the previously internal fn_compile() to plproxy_compile().  This matches
their purpose better and allows the validator to call plproxy_compile()
without invoking execution-time dependent code.

Many error test cases have changed because the validator catches errors
when the function is created, not when it is called.

Raise the extension version to 2.5.1 to be able to upgrade from
non-validator installations.

12 years agoAdd more test cases for error conditions
Peter Eisentraut [Thu, 31 Jan 2013 16:30:16 +0000 (11:30 -0500)]
Add more test cases for error conditions

12 years agoAdd additional built files to .gitignore
Peter Eisentraut [Thu, 31 Jan 2013 16:30:03 +0000 (11:30 -0500)]
Add additional built files to .gitignore

12 years agodeb cleanup
Marko Kreen [Fri, 4 Jan 2013 08:34:54 +0000 (10:34 +0200)]
deb cleanup

* use installed pg_buildext
* use installed pgxs_debian_control.mk
* don't override 'clean' target in debian/rules
* 'make deb' forces control file regeneration

This reduces crap maintained locally.

It also does mean that to build against server-dev-X.Y package
that is not for Debians default Postgres version, following packages
need to be installed from PGDG (wiki.postgresql.org/wiki/Apt) repo:

  postgresql-client-common
  postgresql-common
  postgresql-server-dev-all

12 years agov2.5 plproxy_2_5
Marko Kreen [Tue, 27 Nov 2012 13:04:52 +0000 (15:04 +0200)]
v2.5

12 years agoMerge pull request #4 from petere/master
Marko Kreen [Fri, 23 Nov 2012 07:28:37 +0000 (23:28 -0800)]
Merge pull request #4 from petere/master

Fix build with PostgreSQL 9.3devel

12 years agoFix build with PostgreSQL 9.3devel
Peter Eisentraut [Fri, 23 Nov 2012 03:23:31 +0000 (22:23 -0500)]
Fix build with PostgreSQL 9.3devel

Some needed declarations have been moved to the new header
htup_details.h.

stringinfo.h needs to be included explicitly now.  It should always have
been necessary, but might have come in through other headers.

12 years agoMove RANGE to acceptable types, add tests
Marko Kreen [Sat, 17 Nov 2012 16:13:50 +0000 (18:13 +0200)]
Move RANGE to acceptable types, add tests

12 years agoTest for "RETURNS TABLE (..)" functions
Marko Kreen [Sat, 17 Nov 2012 16:17:50 +0000 (18:17 +0200)]
Test for "RETURNS TABLE (..)" functions

12 years agoUse PROVOLATILE constant
Marko Kreen [Sat, 17 Nov 2012 16:04:55 +0000 (18:04 +0200)]
Use PROVOLATILE constant

12 years agoUse TYPTYPE symbolic constants
Marko Kreen [Sat, 17 Nov 2012 16:03:23 +0000 (18:03 +0200)]
Use TYPTYPE symbolic constants

12 years agoAccept 't' proargmode, use symbolic names.
Marko Kreen [Fri, 16 Nov 2012 13:28:45 +0000 (15:28 +0200)]
Accept 't' proargmode, use symbolic names.

Also throw error on unknown proargmode.

Fixes crash reported by Sébastien Lardière.

12 years agov2.5rc1 plproxy_2_5_rc1
Marko Kreen [Wed, 31 Oct 2012 12:41:12 +0000 (14:41 +0200)]
v2.5rc1

12 years agodebclean target
Marko Kreen [Wed, 31 Oct 2012 13:07:00 +0000 (15:07 +0200)]
debclean target

12 years agoBump ext ver to 2.5.0, add upgrade scripts
Marko Kreen [Wed, 31 Oct 2012 12:36:06 +0000 (14:36 +0200)]
Bump ext ver to 2.5.0, add upgrade scripts

12 years agoRename table alter test
Marko Kreen [Thu, 11 Oct 2012 21:13:28 +0000 (00:13 +0300)]
Rename table alter test

12 years agoAfter sending cancel req, wait for remote error
Marko Kreen [Thu, 11 Oct 2012 09:06:37 +0000 (12:06 +0300)]
After sending cancel req, wait for remote error

Previously, as soon as cancel requests were send,
plproxy re-throwed the error, without waiting for
reaction from backend.  Such behaviour creates
2 problems:

- If plproxy backend is closed immediately, the bouncer will
  see plproxy close before cancel from backend, thus seeing
  mid-tx close, thus dropping the connection.

- If new query comes in to plproxy backend, plproxy itself
  will see dirty connection, closing it, thus also causing
  close of server connection in bouncer.

In both cases it can cause server connection drop in pooler.
New behaviour of waiting query result should fix it.

12 years agoTable invalidation
Marko Kreen [Thu, 11 Oct 2012 12:16:58 +0000 (15:16 +0300)]
Table invalidation

On each call, recheck type relation rowstamp.

If it proves to be noticeable, we can use
syscache callback infrastructure for that,
but it will be much more complex.

12 years agoSupport for dropped fields
Marko Kreen [Thu, 11 Oct 2012 11:45:54 +0000 (14:45 +0300)]
Support for dropped fields

13 years agov2.4 plproxy_2_4
Marko Kreen [Mon, 7 May 2012 14:06:11 +0000 (17:06 +0300)]
v2.4

13 years agoPGVER: add quoting
Marko Kreen [Mon, 7 May 2012 11:02:53 +0000 (14:02 +0300)]
PGVER: add quoting

This avoids breakage if pg_config is not found
and PGVER stays empty.

13 years agov2.4rc2
Marko Kreen [Fri, 13 Apr 2012 11:42:20 +0000 (14:42 +0300)]
v2.4rc2

13 years agoProper init and cleanup for ConnectionState
Marko Kreen [Fri, 13 Apr 2012 10:21:31 +0000 (13:21 +0300)]
Proper init and cleanup for ConnectionState

Otherwise there can be garbage in struct

13 years agoAnother get_role_oid() fixup
Marko Kreen [Fri, 13 Apr 2012 10:03:01 +0000 (13:03 +0300)]
Another get_role_oid() fixup

13 years agoUse container_of() to get main struct from node
Marko Kreen [Thu, 12 Apr 2012 11:46:12 +0000 (14:46 +0300)]
Use container_of() to get main struct from node

Direct casts hardwire the assumption that node
is always first member of struct.

13 years agoProvide get_role_oid() on older Postgres
Marko Kreen [Thu, 12 Apr 2012 11:33:29 +0000 (14:33 +0300)]
Provide get_role_oid() on older Postgres

13 years agoFix 'make tgz' plproxy_2_4_rc1
Marko Kreen [Thu, 5 Apr 2012 15:24:55 +0000 (18:24 +0300)]
Fix 'make tgz'

13 years agov2.4rc1
Marko Kreen [Thu, 5 Apr 2012 14:51:06 +0000 (17:51 +0300)]
v2.4rc1

13 years agoconfig.txt: missing dot
Marko Kreen [Thu, 5 Apr 2012 14:50:19 +0000 (17:50 +0300)]
config.txt: missing dot

13 years agoNew config var: 'default_user'
Marko Kreen [Mon, 2 Apr 2012 10:12:11 +0000 (13:12 +0300)]
New config var: 'default_user'

This allows to fall back to old default of 'session_user'.

New default is 'current_user'.

13 years agoClear old config before loading new one.
Marko Kreen [Mon, 2 Apr 2012 10:11:03 +0000 (13:11 +0300)]
Clear old config before loading new one.

This allows falling back to defaults when
some value is dropped from config.

13 years agoTest SQL/MED with SECURITY DEFINER
Marko Kreen [Thu, 29 Mar 2012 15:14:37 +0000 (18:14 +0300)]
Test SQL/MED with SECURITY DEFINER

13 years agoRefresh SPLIT test - order changed.
Marko Kreen [Thu, 29 Mar 2012 15:07:01 +0000 (18:07 +0300)]
Refresh SPLIT test - order changed.

Now connections are added to active_list in order
they get tagged from hash function.

13 years agoSwitch from session_user to current_user.
Marko Kreen [Thu, 29 Mar 2012 15:04:47 +0000 (18:04 +0300)]
Switch from session_user to current_user.

Plus minor cleanups.

13 years agoUser mapping now almost works on sql/med too
Marko Kreen [Wed, 28 Mar 2012 19:12:15 +0000 (22:12 +0300)]
User mapping now almost works on sql/med too

13 years agorowstamp: allow usage on zeroed stamp
Marko Kreen [Wed, 28 Mar 2012 19:09:17 +0000 (22:09 +0300)]
rowstamp: allow usage on zeroed stamp

13 years agoPer-user mapping for non-sqlmed clusters
Marko Kreen [Wed, 28 Mar 2012 10:47:30 +0000 (13:47 +0300)]
Per-user mapping for non-sqlmed clusters

13 years agoPut per-cluster connect strings into tree
Marko Kreen [Tue, 27 Mar 2012 15:29:33 +0000 (18:29 +0300)]
Put per-cluster connect strings into tree

13 years agoConvert real cluster to tree
Marko Kreen [Tue, 27 Mar 2012 12:09:02 +0000 (15:09 +0300)]
Convert real cluster to tree

13 years agoUse binary tree for fake cluster storage
Marko Kreen [Tue, 27 Mar 2012 11:51:33 +0000 (14:51 +0300)]
Use binary tree for fake cluster storage

- Add aatree.[ch]
- Dont run maintenance if no init is done
- Simplify header deps in Makefile
- Store fake cluster in binary tree

13 years agoCreate separate structure for current connection
Marko Kreen [Tue, 27 Mar 2012 10:49:47 +0000 (13:49 +0300)]
Create separate structure for current connection

13 years agoMakefile cleanups
Marko Kreen [Tue, 27 Mar 2012 08:31:33 +0000 (11:31 +0300)]
Makefile cleanups

- remove plproxy.so even when building something else
- Use ctags for tags

13 years agodebian/rules clean: remove per-package dirs
Marko Kreen [Tue, 27 Mar 2012 08:31:22 +0000 (11:31 +0300)]
debian/rules clean: remove per-package dirs

13 years agoReorganize Debian packaging
Marko Kreen [Thu, 8 Mar 2012 22:37:21 +0000 (00:37 +0200)]
Reorganize Debian packaging

Drop yada based packaging, instead use the new pg_buildext
packaging, except include pg_buildext under debian/ so the
package builds on lenny too.

It finds any postgresql-server-dev packages and builds
against them.

Also import Peter Eisentraut's Makefile fixes from official
Debian packaging to support multi-package builds.

Now package is built for all installed server-dev versions.

13 years agoMakefile and tests cleanup
Marko Kreen [Thu, 8 Mar 2012 22:02:44 +0000 (00:02 +0200)]
Makefile and tests cleanup

- Use CREATE EXTENSION in 9.1+ tests
- set verbosity to 'terse' to have less noise
- Less messy Makefile rules

13 years agoUpdate news & authors
Marko Kreen [Wed, 7 Mar 2012 20:49:58 +0000 (22:49 +0200)]
Update news & authors

13 years agoSync with cache invalidation changes in 9.2
Marko Kreen [Mon, 27 Feb 2012 00:09:22 +0000 (02:09 +0200)]
Sync with cache invalidation changes in 9.2

13 years agoAdd printf attribute to vararg error functions
Marko Kreen [Tue, 6 Mar 2012 14:39:38 +0000 (16:39 +0200)]
Add printf attribute to vararg error functions

13 years agoMakefile cleanup
Marko Kreen [Mon, 27 Feb 2012 00:09:36 +0000 (02:09 +0200)]
Makefile cleanup

13 years agoMerge pull request #2 from theory/isc
Marko Kreen [Mon, 27 Feb 2012 18:34:53 +0000 (10:34 -0800)]
Merge pull request #2 from theory/isc

ISC is not known to PGXN, so spell it out.

13 years agoOnly need one license field.
David E. Wheeler [Mon, 27 Feb 2012 17:49:41 +0000 (09:49 -0800)]
Only need one license field.

13 years agoISC is not known to PGXN, so spell it out.
David E. Wheeler [Mon, 27 Feb 2012 17:41:09 +0000 (09:41 -0800)]
ISC is not known to PGXN, so spell it out.

13 years agoFix metainfo
Marko Kreen [Mon, 27 Feb 2012 00:03:14 +0000 (02:03 +0200)]
Fix metainfo

13 years agoplproxy.control: tag as superuser-only
Marko Kreen [Mon, 27 Feb 2012 00:01:47 +0000 (02:01 +0200)]
plproxy.control: tag as superuser-only

As only superusers can create plproxy functions,
it does seem weird to allow regular users to install it.

13 years agoFix sql file location in test/
Marko Kreen [Sun, 26 Feb 2012 23:55:38 +0000 (01:55 +0200)]
Fix sql file location in test/

13 years agoAdd support for PGXN distribution.
David E. Wheeler [Sat, 25 Feb 2012 22:31:10 +0000 (14:31 -0800)]
Add support for PGXN distribution.

Mainly by adding META.json. A new `zip` target has also been added to make it simple to generate the zip file for distribution.

Note that PGXN requires x.y.z versions, so the version has been changed from 2.3 to 2.3.0.

13 years agoAdd .gitattributes.
David E. Wheeler [Sat, 25 Feb 2012 22:20:35 +0000 (14:20 -0800)]
Add .gitattributes.

So that .gitignore can be excluded from the archive. And .gitattributes itself, of course.

13 years agoAdd .gitignore.
David E. Wheeler [Sat, 25 Feb 2012 21:43:06 +0000 (13:43 -0800)]
Add .gitignore.

13 years agoAdd ability to create extenion from unpackaged.
David E. Wheeler [Sat, 25 Feb 2012 21:39:40 +0000 (13:39 -0800)]
Add ability to create extenion from unpackaged.

13 years agoAdd support for building as a 9.1 extension.
David E. Wheeler [Sat, 25 Feb 2012 21:34:01 +0000 (13:34 -0800)]
Add support for building as a 9.1 extension.

13 years agoMove SQL files to sql/ subdirectory.
David E. Wheeler [Sat, 25 Feb 2012 21:26:14 +0000 (13:26 -0800)]
Move SQL files to sql/ subdirectory.

13 years agoMove tests to test subdirectory.
David E. Wheeler [Sat, 25 Feb 2012 21:03:49 +0000 (13:03 -0800)]
Move tests to test subdirectory.

13 years agoFix test failure.
David E. Wheeler [Sat, 25 Feb 2012 20:48:31 +0000 (12:48 -0800)]
Fix test failure.

13 years agotodo: put error-handling related items to "good to have" section
Marko Kreen [Tue, 15 Nov 2011 14:28:47 +0000 (16:28 +0200)]
todo: put error-handling related items to "good to have" section

13 years agoSupport ENUM types.
Zoltán Böszörményi [Sat, 5 Nov 2011 13:52:49 +0000 (15:52 +0200)]
Support ENUM types.

13 years agov2.3 plproxy_2_3
Marko Kreen [Tue, 25 Oct 2011 13:39:11 +0000 (16:39 +0300)]
v2.3

13 years agoMakefile cleanup
Marko Kreen [Tue, 25 Oct 2011 13:57:05 +0000 (16:57 +0300)]
Makefile cleanup

- use git-archive to generate tgz
- make clean better

13 years agoAdd missing files for plproxy_target regtest
Marko Kreen [Tue, 25 Oct 2011 13:43:18 +0000 (16:43 +0300)]
Add missing files for plproxy_target regtest

13 years agoadded deb91 target.
Martin Pihlak [Thu, 13 Oct 2011 10:23:45 +0000 (13:23 +0300)]
added deb91 target.

13 years agov2.3rc2
Marko Kreen [Wed, 12 Oct 2011 09:52:12 +0000 (12:52 +0300)]
v2.3rc2

13 years agoSPLIT: fix elem type info leak
Marko Kreen [Wed, 12 Oct 2011 09:48:56 +0000 (12:48 +0300)]
SPLIT: fix elem type info leak

13 years ago[email protected]: pg9.1 ignores --dbname in REGRESS_OPTS
Marko Kreen [Wed, 14 Sep 2011 10:03:04 +0000 (13:03 +0300)]
[email protected]: pg9.1 ignores --dbname in REGRESS_OPTS

Also it needs 'override' to change CONTRIB_TESTDB

13 years ago[email protected]: ignore errors around 'create language plpgsql'
Marko Kreen [Wed, 14 Sep 2011 10:01:24 +0000 (13:01 +0300)]
[email protected]: ignore errors around 'create language plpgsql'

As of 9.1, there is no clean way to get plpgsql into db
that works across versions.

13 years agov2.3rc1 plproxy_2_3_rc1
Marko Kreen [Tue, 13 Sep 2011 13:25:40 +0000 (16:25 +0300)]
v2.3rc1

13 years agodoc: remove overview.txt, its unmaintained
Marko Kreen [Tue, 13 Sep 2011 13:17:11 +0000 (16:17 +0300)]
doc: remove overview.txt, its unmaintained

it was copy of old wiki page

13 years agodoc: Use ListingBlock for code
Marko Kreen [Tue, 13 Sep 2011 13:14:44 +0000 (16:14 +0300)]
doc: Use ListingBlock for code

Old style used 'literal paragraph' which was nice
in ascii but not as good in HTML.

As the HTML is preferred, optimize for that.

13 years agodoc: mention global options
Marko Kreen [Tue, 13 Sep 2011 12:52:57 +0000 (15:52 +0300)]
doc: mention global options

13 years agoDocumentation for keepalive parameters.
Marko Kreen [Thu, 29 Apr 2010 10:31:23 +0000 (13:31 +0300)]
Documentation for keepalive parameters.

13 years agoKeepalive parameters
Marko Kreen [Wed, 28 Apr 2010 11:07:04 +0000 (14:07 +0300)]
Keepalive parameters

- keepalive_idle
- keepalive_interval
- keepalive_count

13 years agosupport global SQL/MED cluster options
Petr Jelinek [Mon, 15 Aug 2011 09:51:09 +0000 (11:51 +0200)]
support global SQL/MED cluster options

14 years agov2.2 plproxy_2_2
Marko Kreen [Fri, 18 Feb 2011 15:32:28 +0000 (17:32 +0200)]
v2.2

14 years agodoc: fix upload link
Marko Kreen [Wed, 16 Feb 2011 14:24:46 +0000 (16:24 +0200)]
doc: fix upload link

14 years agodeb: v2.2rc1 plproxy_2_2_rc1
Marko Kreen [Wed, 2 Feb 2011 12:54:08 +0000 (14:54 +0200)]
deb: v2.2rc1

14 years agov2.2rc1
Marko Kreen [Wed, 2 Feb 2011 12:46:21 +0000 (14:46 +0200)]
v2.2rc1

14 years agotest argument type quoting
Marko Kreen [Wed, 2 Feb 2011 12:41:32 +0000 (14:41 +0200)]
test argument type quoting

14 years agowin32: poll() compat fix - w32 does not use bitmap
Marko Kreen [Fri, 21 Jan 2011 14:02:28 +0000 (16:02 +0200)]
win32: poll() compat fix - w32 does not use bitmap

14 years agodoc: Remove obsolete target from Makefile
Marko Kreen [Fri, 21 Jan 2011 11:37:10 +0000 (13:37 +0200)]
doc: Remove obsolete target from Makefile

14 years agoNew TARGET satement, to redirect target function.
Marko Kreen [Thu, 20 Jan 2011 15:12:44 +0000 (17:12 +0200)]
New TARGET satement, to redirect target function.

14 years agoscanner: define YY_NO_INPUT to ignore unused yyinput function
Marko Kreen [Thu, 20 Jan 2011 15:11:24 +0000 (17:11 +0200)]
scanner: define YY_NO_INPUT to ignore unused yyinput function

14 years agoMore portable workaround for empty FLEX/BISON
Marko Kreen [Wed, 1 Dec 2010 10:23:47 +0000 (12:23 +0200)]
More portable workaround for empty FLEX/BISON

The $(or ) does not work on older gnu makes, $(if )
is more portable.

Suggested by Peter Eisentraut

14 years agoMake possible to disallow SELECT statement.
Marko Kreen [Mon, 6 Sep 2010 10:49:29 +0000 (13:49 +0300)]
Make possible to disallow SELECT statement.

  make NO_SELECT=1
  make install

14 years agoFix returning of many-column result types
Marko Kreen [Wed, 28 Jul 2010 14:44:48 +0000 (17:44 +0300)]
Fix returning of many-column result types

Old code used FUNC_MAX_ARGS as limit for number of columns,
but composite types can be larger.  Use dynamic allocation instead.

Patch by Hans-Jürgen Schönig

15 years agoSurvive missing sqlstate field on error messages
Marko Kreen [Wed, 28 Apr 2010 07:35:06 +0000 (10:35 +0300)]
Survive missing sqlstate field on error messages

15 years agov2.1 plproxy_2_1
Marko Kreen [Fri, 23 Apr 2010 15:02:18 +0000 (18:02 +0300)]
v2.1