Re: [GENERAL] type "xxxxxxx" does not exist

2017-05-20 Thread Micky Hulse
Hi Adrian, On Fri, May 19, 2017 at 3:02 PM, Adrian Klaver wrote: > FYI, 9.3 is now up to 9.3.17: > At some point, once you have gotten a handle on using Postgres, you should > probably update. Read the Release Notes for each of the minor releases to > see what has been fixed. Ah, good to know! T

Re: [GENERAL] Partitioned Data and Locking

2017-05-20 Thread Tom Lane
Ed Behn writes: > If I run EXPLAIN on the query, I get a result that shows that only the > child tables whose CHECKs are consistent with the WHERE clause are > searched. This is exactly what I expected. > However, when I run the query, AccessShareLocks are obtained by the > transaction for all chi

Re: [GENERAL] Window functions can't be used as LIMIT/FETCH FIRST alternative

2017-05-20 Thread David G. Johnston
On Sat, May 20, 2017 at 2:50 AM, Navrotskiy Artem wrote: > This is especially unpleasant for expressions using RANK and DENSE_RANK, > which can not simply be rewritten using LIMIT. > ​They cannot anyway, at least not DENSE_RANK with ties.​ Others will have to speak to the dynamics involved with

[GENERAL] Window functions can't be used as LIMIT/FETCH FIRST alternative

2017-05-20 Thread Navrotskiy Artem
Hello. I found unexpected query optimization issue: window functions can't be used as LIMIT/FETCH FIRST alternative (as far as I know, before SQL:2008 it was the only standard way to implement LIMIT in the query). The problem is that PostgreSQL does not stop reading the records after reaching the l

[GENERAL] Partitioned Data and Locking

2017-05-20 Thread Ed Behn
I've found what to me is a surprising locking behavior when querying partitioned data as described in section 5.10 of the User's Manual. I have an empty parent table with a number of child tables containing data. Each child has a CHECK condition on the relevant column. I am executing a SELECT quer

Re: [GENERAL] [OT] Help: stories of database security and privacy

2017-05-20 Thread Bruno Wolff III
On Tue, Apr 11, 2017 at 21:48:58 +0200, Lifepillar wrote: I'd like to take the opportunity to also engage students about the topic of privacy (or lack thereof). So, I am here to ask if you have interesting/(in)famous stories to share on database security/privacy "gone wrong" or "done right"(tm

[GENERAL] Beta rpms for Fedora are missing (at this time)

2017-05-20 Thread Bruno Wolff III
This is probably a temporary build problem, but I thought mentioning here might get it fixed faster in case it hasn't already been noticed. https://download.postgresql.org/pub/repos/yum/testing/10/fedora/fedora-25-x86_64/ should have rpms but doesn't. I am using test rpms I got from there about