[BUGS] Fails to build from source with multiarched python3.3 on Debian-like systems

2012-10-25 Thread Dmitrijs Ledkovs
On debian and ubuntu, python3.3 has two include locations instead of one:

 -I/usr/include//python3.3 -I/usr/include/python3.3

are needed.

Here is patch against postgresql 9.1 to fix fail to build from source
against such pythons.

-- 
Regards,
Dmitrijs.
Description: detect both python3.3 includes locations
Author: Dmitrijs Ledkovs 
Forwarded: yes
Last-Update: 2012-10-25

Index: postgresql-9.1-9.1.6/config/python.m4
===
--- postgresql-9.1-9.1.6.orig/config/python.m4	2012-09-19 22:50:31.0 +0100
+++ postgresql-9.1-9.1.6/config/python.m4	2012-10-25 11:08:37.0 +0100
@@ -34,6 +34,11 @@
 python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
 python_configdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'"`
 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
+python_platincludespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc(plat_specific=True))"`
+if test x"$python_includespec" != x"$python_platincludespec"
+then
+python_includespec="$python_includespec $python_platincludespec"
+fi
 
 AC_SUBST(python_majorversion)[]dnl
 AC_SUBST(python_version)[]dnl
Index: postgresql-9.1-9.1.6/configure
===
--- postgresql-9.1-9.1.6.orig/configure	2012-09-19 22:50:31.0 +0100
+++ postgresql-9.1-9.1.6/configure	2012-10-25 11:09:45.587362563 +0100
@@ -7305,6 +7305,11 @@
 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
 python_configdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'"`
 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
+python_platincludespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc(plat_specific=True))"`
+if test x"$python_includespec" != x"$python_platincludespec"
+then
+python_includespec="$python_includespec $python_platincludespec"
+fi
 
 # This should be enough of a message.
 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5


signature.asc
Description: OpenPGP digital signature


[BUGS] BUG #7622: Incorrect aggregate level processing

2012-10-25 Thread andrew
The following bug has been logged on the website:

Bug reference:  7622
Logged by:  Andrew Gierth
Email address:  and...@tao11.riddles.org.uk
PostgreSQL version: 9.2.1
Operating system:   n/a
Description:

Tested on git-master, 9.2.1, various older versions.

select (select array_agg(random()*i) from (values (1),(2)) v(a)) from
generate_series(1,3) i;

Expected output is three rows each with a 2-element array; actual output
is:

ERROR:  more than one row returned by a subquery used as an expression

Looking at the explain, the aggregate is being pulled out of the subplan and
evaluated at the top query level. (This came up while doing some random data
generation, I've simplified it a bit.)



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs