#27213: ArrayField with null throws ProgrammingError but not ValidationError on
Psycopg < 2.6.1
-------------------------------------+-------------------------------------
Reporter: Mark Mikofski | Owner: nobody
Type: Bug | Status: closed
Component: contrib.postgres | Version: 1.9
Severity: Normal | Resolution: wontfix
Keywords: postgres, | Triage Stage:
arrayfield, programmingerror | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mark Mikofski):
Thanks Tim. I updated my linux share to psycopg2-2.6.2 and the issue went
away. I agree, not worth it fix. This issue serves as sufficient
documentation if anyone happens to come across this problem.
For anyone else in the RedHat family with issue
[https://www.postgresql.org/download/linux/redhat/] so you will need to
upgradr , you will need to upgrade both postgresql-9.2 and psycopg2-2.5.3
to newer versions. My version of PostgreSQL on AWS is 9.4.5 (2016/10/7).
There are great directions here
[https://www.postgresql.org/docs/current/static/install-procedure.html].
Note readline is required for postgres, but you can pass `--without-
readline` to skip it.
{{{
~$ curl -Ok
https://ftp.postgresql.org/pub/source/v9.4.5/postgresql-9.4.5.tar.gz
~$ tar -xf postgresql-9.4.5.tar.gz
~$ mkdir build_pgsql
~$ cd build_pgsql/
~/build_pgsql $/home/<username>/postgresql-9.4.5/configure
--prefix=/home/<username>/.local/pgsql
~/build_pgsql make
~/build_pgsql make check
~/build_pgsql make install
}}}
I had trouble building psycopg2 on my linux share because I could not
remove my older version of postgres. I was able to resolve it by using
`--rpath` in `_psycopg2.so` and it seems to work. The documentation on
pscopg2 website [http://initd.org/psycopg/] is useful - you must have
`pg_config` on your path or you can specify it as a `build_ext` option,
and you will need to compile versus
{{{
~$ curl -Ok
http://initd.org/psycopg/tarballs/PSYCOPG-2-6/psycopg2-2.6.2.tar.gz
~$ tar -xf psycopg2-2.6.2.tar.gz
~$ cd psycopg2-2.6.2
~/psycopg2-2.6.2 $ python setup.py build_ext --pg-config
/home/<username>/.local/pgsql/bin/pg_config build --include-
dirs=/home/<username>/.local/pgsql/include --library-
dirs=/home/<username>/.local/pgsql/lib
--rpath=/home/<username>/.local/pgsql/lib:'$ORIGIN'
~$ python setup.py build
~$ python setup.py bdist_wheel
~$ pip install --user dist/psycopg2-2.6.2-cp27-cp27mu-linux_x86_64.whl
}}}
The psycopg2 website recommends adding `pg_config` to your path
temporarily
{{{
~$ export PATH=/home/<username>/.local/pgsql/bin/:$PATH
}}}
You can call `pg_config` to get the lists of `--includes-dirs` and
`--library-dirs`
{{{
~$ pg_config
}}}
You can all use `objdump` or `ldd` to see what postgres libraries psycopg2
is linked to.
{{{
~/psycopg2-2.6.2 $ cd build/lib.linux-x86_64-2.7/psycopg2/
~/psycopg2-2.6.2/build/lib.linux-x86_64-2.7/psycopg2 $ objdump _psycopg.so
-p
~/psycopg2-2.6.2/build/lib.linux-x86_64-2.7/psycopg2 $ ldd _psycopg.so |
grep libpq
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27213#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.0e88cad70e38f46c5021cdb28f28a450%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.