Re: [GENERAL] Bad query? Or planner?

2016-12-04 Thread Johann Spies
On 28 November 2016 at 21:11, Devin Smith wrote: > Hi, > > > I recently wrote a query that I thought was easy to reason about, and I > assumed the query planner would execute it efficiently. > > SELECT * FROM xtag_stack_feed > JOIN ( > SELECT DISTINCT ON (do_post_xtag.xtag_ci) * > FROM do_pos

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Johann Spies
Web2py is another (and maybe simpler) alternative to Django. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
On Sun, 4 Dec 2016, John McKown wrote: I'm not really sure what ".. make it an application that my clients can use. ..." really means. John, It has to be simple and useful to naive users. I guess it means that you have some code for an application (which uses PostgreSQL as it's data repos

Re: [GENERAL] Where would I be able to get instructions regarding postgresql installation on Windows 10?

2016-12-04 Thread Melvin Davidson
Just click on the version of Win x-86 32 PostgreSQL you want from here and use the downloaded installer. http://www.enterprisedb.com/products-services-training/pgdownload#windows On Sun, Dec 4, 2016 at 7:57 PM, Varuna Seneviratna < varunasenevira...@gmail.com> wrote: > Hello, > I looked

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread John McKown
On Sun, Dec 4, 2016 at 9:41 AM, Rich Shepard wrote: >I have postgres tables (with data) for a specific application but have > not found the time to learn django to make it an application that my > clients > can use. It occurs to me that the most parsimonious approach is to use > LibreOffice's

[GENERAL] Where would I be able to get instructions regarding postgresql installation on Windows 10?

2016-12-04 Thread Varuna Seneviratna
Hello, I looked through the documentation But was not able to find any information. If possible please guide me Varuna

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Peter Geoghegan
On Sun, Dec 4, 2016 at 4:09 PM, Tom Lane wrote: > Of course, we would also have to teach cost_sort or someplace near there > that non-C sorting is much more expensive than C-collation sorting. Not > sure about exactly how to set that up without it being a kluge. We've talked about that before, i

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Tom Lane
Peter Geoghegan writes: > I wonder what it would take to teach the optimizer to consider the > possibility of a "collation strength reduction". In other words, for > aggregates that perform a sort (or for aggregates that rely on the > presence of a sort node without there being some other dependen

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
On Sun, 4 Dec 2016, Martin Collins wrote: Not tried it myself but have you seen https://www.kde.org/applications/office/kexi/ And if that's no good http://flask.pocoo.org/ is simpler than Django. Martin, The problem with kexi is that it does not run on Microsoft OSes which is what my clien

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Martin Collins
On 04/12/16 11:59, Rich Shepard wrote: > >OK. I spent a lot of time over the past few years looking for a simpler > solution and they just don't exist. > >I'll learn django and take it step-by-step. Not tried it myself but have you seen https://www.kde.org/applications/office/kexi/ And i

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Pavel Stehule
2016-12-04 23:12 GMT+01:00 Peter Geoghegan : > On Sat, Dec 3, 2016 at 5:20 PM, Tomas Vondra > wrote: > > So the sort is probably slow because of CPU, as it compares strings. In > > some locales that may be very expensive - not sure which locale is used > > in this case, as it was not mentioned. >

Re: [GENERAL] Avoid sorting when doing an array_agg

2016-12-04 Thread Peter Geoghegan
On Sat, Dec 3, 2016 at 5:20 PM, Tomas Vondra wrote: > So the sort is probably slow because of CPU, as it compares strings. In > some locales that may be very expensive - not sure which locale is used > in this case, as it was not mentioned. I wonder what it would take to teach the optimizer to co

Re: [GENERAL] Extensions and privileges in public schema

2016-12-04 Thread Paul Ramsey
When you create the student user, remove their create privs in public. Then create a scratch schema and grant them privs there. Finally, alter the student user so that the scratch schema appears FIRST in their search path. This will cause unqualified CREATE statements to create in the scratch schem

[GENERAL] Extensions and privileges in public schema

2016-12-04 Thread Lee Hachadoorian
This question is specifically motivated by my use of the PostGIS extension, but since other extensions create functions and other supporting objects in public schema, I believe it is more general. I'm teaching a university-level class using PostGIS. I have created a scratch schema for students to

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Adrian Klaver
On 12/04/2016 12:01 PM, Rich Shepard wrote: On Sun, 4 Dec 2016, Adrian Klaver wrote: The important questions that forgot to ask before, is how do you plan to deploy this: Or are you looking to deploy a front end/database combination to each client? This way. I've no interest or expertise

Re: [GENERAL] INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries

2016-12-04 Thread Tom Lane
Justin Pryzby writes: > I'm implementing unique indices to allow "upsert" (and pg_repack and..), but > running into a problem when the table has >830 columns (we have some tables > which are at the 1600 column limit, and have previously worked around that > limit using arrays or multiple tables).

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
On Sun, 4 Dec 2016, Adrian Klaver wrote: The important questions that forgot to ask before, is how do you plan to deploy this: Or are you looking to deploy a front end/database combination to each client? This way. I've no interest or expertise in maintaining a web site (my ISP does this

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Adrian Klaver
On 12/04/2016 09:59 AM, Rich Shepard wrote: On Sun, 4 Dec 2016, Adrian Klaver wrote: That is why I ended up learning Django, I could not find a GUI that was cross platform and had the capabilities I needed. Others might have suggestions. It would help though if you could list what you want in a

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
On Sun, 4 Dec 2016, Adrian Klaver wrote: That is why I ended up learning Django, I could not find a GUI that was cross platform and had the capabilities I needed. Others might have suggestions. It would help though if you could list what you want in a GUI platform: OK. I spent a lot of time

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Adrian Klaver
On 12/04/2016 08:47 AM, Rich Shepard wrote: On Sun, 4 Dec 2016, Adrian Klaver wrote: Base is basically a GUI over the database. Adrian, That's what I assumed it to be. That being said my experience with Base is that is not up to the task. It worked for me early on, but development on Bas

Re: [GENERAL] Select works only when connected from login postgres

2016-12-04 Thread Tom Lane
Joseph Brenner writes: >> So what happens when you specify the port in your psql connection, eg: >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5432 >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5433 >> /usr/local/pgsql/bin/psql --dbname=doom --username=doom -p 5434

Re: [GENERAL] count(*) in binary mode returns 0

2016-12-04 Thread Tom Lane
"imagene...@gmail.com" writes: > I have an implementation of binary format communication that is working > quite well but it is failing inexplicably on returning valid results for > the aggregate function count. It returns a correct result for instance for > the aggregate function max. > Here is

Re: [GENERAL] Select works only when connected from login postgres

2016-12-04 Thread Tom Lane
Adrian Klaver writes: > My suspicion is that when you did the source build you got some cross > contamination of libraries. That's the best theory I can come up with either, although libpq's APIs haven't really changed in any non-backwards-compatible fashion in years. I could imagine a newer ps

Re: [GENERAL] Select works only when connected from login postgres

2016-12-04 Thread Joseph Brenner
Yeah, I get the sense I need to simplify the situation, if only to eliminate some distractions from the story. This morning I was thinking I want to play around with pg_hba.conf settings some more, but after that I'll do some pg_dumps and uninstalls and see how things behave. Oh, trying: /usr/

Re: [GENERAL] INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries

2016-12-04 Thread Gmail
> On Dec 4, 2016, at 9:32 AM, Justin Pryzby wrote: > > Our application INSERTs data from external sources, and infrequently UPDATEs > the previously-inserted data (currently, it first SELECTs to determine whether > to UPDATE). > > I'm implementing unique indices to allow "upsert" (and pg_repack

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
On Sun, 4 Dec 2016, Adrian Klaver wrote: Base is basically a GUI over the database. Adrian, That's what I assumed it to be. That being said my experience with Base is that is not up to the task. It worked for me early on, but development on Base lagged relative to the other modules in LO.

[GENERAL] INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries

2016-12-04 Thread Justin Pryzby
Our application INSERTs data from external sources, and infrequently UPDATEs the previously-inserted data (currently, it first SELECTs to determine whether to UPDATE). I'm implementing unique indices to allow "upsert" (and pg_repack and..), but running into a problem when the table has >830 column

[GENERAL] INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries

2016-12-04 Thread Justin Pryzby
Our application INSERTs data from external sources, and infrequently UPDATEs the previously-inserted data (currently, it first SELECTs to determine whether to UPDATE). I'm implementing unique indices to allow "upsert" (and pg_repack and..), but running into a problem when the table has >830 column

Re: [GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Adrian Klaver
On 12/04/2016 07:41 AM, Rich Shepard wrote: I have postgres tables (with data) for a specific application but have not found the time to learn django to make it an application that my clients can use. It occurs to me that the most parsimonious approach is to use LibreOffice's Base for the UI w

Re: [GENERAL] Index size

2016-12-04 Thread Andreas Joseph Krogh
På søndag 04. desember 2016 kl. 16:51:54, skrev Melvin Davidson < melvin6...@gmail.com >: On Sun, Dec 4, 2016 at 4:43 AM, Samuel Williams < space.ship.travel...@gmail.com > wrote: Melvin, of course there are differences. However

Re: [GENERAL] Index size

2016-12-04 Thread Melvin Davidson
On Sun, Dec 4, 2016 at 4:43 AM, Samuel Williams < space.ship.travel...@gmail.com> wrote: > Melvin, of course there are differences. However, I suspect there are at > least SOME tangible differences which can be identified. > > On 4 December 2016 at 15:53, Melvin Davidson wrote: > >> >> >> On Sat,

[GENERAL] Postgres and LibreOffice's 'Base'

2016-12-04 Thread Rich Shepard
I have postgres tables (with data) for a specific application but have not found the time to learn django to make it an application that my clients can use. It occurs to me that the most parsimonious approach is to use LibreOffice's Base for the UI with postgres as the dbms-engine. While I work

Re: [GENERAL] Select works only when connected from login postgres

2016-12-04 Thread Adrian Klaver
On 12/03/2016 09:38 PM, Joseph Brenner wrote: So is the 9.4 instance the production/live database? Essentially, but it's not heavily used: this is me messing around on a dev box. So what happens when you specify the port in your psql connection, eg: /usr/local/pgsql/bin/psql --dbname=doom --u

[GENERAL] count(*) in binary mode returns 0

2016-12-04 Thread imagene...@gmail.com
I have an implementation of binary format communication that is working quite well but it is failing inexplicably on returning valid results for the aggregate function count. It returns a correct result for instance for the aggregate function max. Here is some debug information to illustrate that

Re: [GENERAL] Index size

2016-12-04 Thread Samuel Williams
Melvin, of course there are differences. However, I suspect there are at least SOME tangible differences which can be identified. On 4 December 2016 at 15:53, Melvin Davidson wrote: > > > On Sat, Dec 3, 2016 at 9:32 PM, Steve Atkins wrote: > >> >> > On Dec 3, 2016, at 3:57 PM, Samuel Williams <

Re: [GENERAL] Index size

2016-12-04 Thread Samuel Williams
So, uh, my main question was, does MySQL add null values to an index, and is this different from Postgres. The schema is irrelevant, except that the column allows null values. I noticed when you create an index you can add a where clause. Could it be I should add WHERE the fields are not null? Her