Re: [GENERAL] Support functions for GiST index on citext

2014-08-18 Thread Chris Hanks
On Sat, Aug 16, 2014 at 7:02 PM, Chris Hanks wrote: > Thanks, I have considered it, and I'd like to stick with an array for > my use case if possible. Also, if citext is being advised against, I'd > like to know about it, since I use it extensively and have never had > an issue with it. Can anyone

Re: [GENERAL] logfile character encoding

2014-08-18 Thread Holger.Friedrich-Fa-Trivadis
➢ Yeah, more digging on my part seems to indicate that no matter what you ➢ do Windows is going to set the locale to some variety of a codepage. ➢ Unfortunately, I do not use Windows enough to go much further with this. ➢ Hopefully someone more Microsoft fluent can weigh in on this, as this ➢ i

[GENERAL] select top_countries and for each country, select top_cities in that country, in 1 query

2014-08-18 Thread Dorian Hoxha
I have CREATE TABLE t (country text, city text); I want to get with 1 query, select count(country),country GROUP BY country ORDER BY count(country) DESC And for each country, to get the same for cities. Is it possible ? Thanks

Re: [GENERAL] logfile character encoding

2014-08-18 Thread Redoute
Am 18.08.2014 15:31, schrieb holger.friedrich-fa-triva...@it.nrw.de: Wikipedia says that UTF-8 is code page 65001, in Microsoft notation (see http://en.wikipedia.org/wiki/Code_page). Does this help in any way (i.e. does German_Germany.65001 work for you)? No, I tried that value yesterday, see

Re: [GENERAL] logfile character encoding

2014-08-18 Thread Holger.Friedrich-Fa-Trivadis
What about taking a cue from the link provided by Adrian, http://www.g-loaded.eu/2011/02/27/locale-windows/, and initdb a new empty database cluster not like initdb.exe --locale=German_Germany.UTF-8 which you say does not work, but rather like initdb.exe --locale=German_Germany --encoding=UTF

Re: [GENERAL] select top_countries and for each country, select top_cities in that country, in 1 query

2014-08-18 Thread John McKown
On Mon, Aug 18, 2014 at 9:28 AM, Dorian Hoxha wrote: > I have CREATE TABLE t (country text, city text); > > I want to get with 1 query, > > select count(country),country GROUP BY country ORDER BY count(country) DESC > > > And for each country, to get the same for cities. > > Is it possible ? > >

FW: [GENERAL] logfile character encoding

2014-08-18 Thread Holger.Friedrich-Fa-Trivadis
Sorry for misquoting, the command line that reportedly worked had --encoding=UTF8 not --encoding=UTF-8. I apologize for not paying more attention. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of holger.friedrich-fa-

Re: [GENERAL] logfile character encoding

2014-08-18 Thread Redoute
Am 18.08.2014 17:50, schrieb holger.friedrich-fa-triva...@it.nrw.de: initdb.exe --locale=German_Germany --encoding=UTF-8 which the link implies seems to have worked for its author? I have tried a bunch of similar program calls and posted them last night as answer to Adrian. --encoding=UTF-8

Re: [GENERAL] logfile character encoding

2014-08-18 Thread Kai Borgolte
Am 18.08.2014 15:31, schrieb holger.friedrich-fa-triva...@it.nrw.de: Wikipedia says that UTF-8 is code page 65001, in Microsoft notation (see http://en.wikipedia.org/wiki/Code_page). Does this help in any way (i.e. does German_Germany.65001 work for you)? No, I tried that value yesterday, s

Re: [GENERAL] .pgpass being ignored

2014-08-18 Thread Granthana
In case someone is facing the same problem again, solution is to add * in .pgpass in place of ip address. -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgpass-being-ignored-tp5760421p5815268.html Sent from the PostgreSQL - general mailing list archive at Nabble.co

[GENERAL] New wrapper library: QUINCE

2014-08-18 Thread Michael Shepanski
Hi PostgreSQLers, I've released an open-source library called quince (QUeries In C++ Expressions) that helps you access PostgreSQL from C++. I know, I know: you've got plenty of those already, but this one is different ... It's an EDSL (Embedded Domain-Specific Language), which lets you buil

[GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
Hi. I'm working with a couple of machines that have Postgres/Apache on Linux setups. Connections to Postgres are currntly TCP/IP to localhost. (We're also using itk, so that the apache connections are per-user.) We began looking into about encrypting these connections with SSL, but now I'm thin

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread John R Pierce
On 8/18/2014 4:55 PM, Ken Tanzer wrote: So I've got two questions. One is whether there are any downsides to using sockets, or any "gotchas" to be aware of. The second is whether there is anything to do to increase the security of sockets? (e.g., analagous to encrypting localhost conenctions

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Tom Lane
John R Pierce writes: > On 8/18/2014 4:55 PM, Ken Tanzer wrote: >> So I've got two questions. One is whether there are any downsides to >> using sockets, or any "gotchas" to be aware of. The second is whether >> there is anything to do to increase the security of sockets? (e.g., >> analagous

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Matt S
I went through the same process a little while ago - worth reading is the pg_hba.conf documentation: http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html Specifically: * Don't enable "trust" auth (i.e. any OS user as any DB user) - that's rarely what you want on a multi-user machine. *

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
Thanks all for the input. Sounds like there aren't downsides to sockets, and they are at least as secure. I do have on follow-up question though: * "peer" auth (OS user == DB user name) is typically the way to go in I used to have my db and linux usernames match, until this issue came along: h

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread John R Pierce
On 8/18/2014 5:45 PM, Ken Tanzer wrote: I used to have my db and linux usernames match, until this issue came along: http://www.postgresql.org/support/security/faq/2013-04-04/. It specifically mentions potentially increased vulnerability if the names match. So when I set up a new server I had

Re: [GENERAL] New wrapper library: QUINCE

2014-08-18 Thread Jov
A cool project! Jov blog: http:amutu.com/blog 2014-08-19 6:43 GMT+08:00 Michael Shepanski : > Hi PostgreSQLers, > > I've released an open-source library called quince (QUeries In C++ > Expressions) that helps you access PostgreSQL from C++. I know, I know: > you've got

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Ken Tanzer
Thanks. I'm not really worried about this particular vulnerability, just wondering about the more general idea that having db user name = os user could reduce your security, even if only slightly. Is it just as conceivable that a vulnerability could come along that was more exploitable only if th

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread John R Pierce
On 8/18/2014 6:45 PM, Ken Tanzer wrote: Thanks. I'm not really worried about this particular vulnerability, just wondering about the more general idea that having db user name = os user could reduce your security, even if only slightly. Is it just as conceivable that a vulnerability could com

Re: [GENERAL] Localhost vs. Unix Domain Sockets?

2014-08-18 Thread Matt S
> To put it another way, keeping the two sets of names distinct is incrementally more complex to manage. Which might be worth it if there really is any gain. Is this a "best practice," or is it really a manifestation of its closely-related cousin, the "silly practice?" :) It's ultimately up to y