Re: [GENERAL] repeated characters in SQL

2016-01-23 Thread David Rowley
On 24 January 2016 at 12:44, Govind Chettiar  wrote:
> I have a simple table consisting of a bunch of English words.  I am trying
> to find words that have repeated characters in them, for example
> apple
> tattoo
>
> but not
>
> orange
> lemon
>
> I know that only a maximum of one repetition can occur
>
> I tried various options like
> SELECT word FROM  public."SpellItWords"
>  WHERE word ~ E'(.)\1{2,}'
>
> SELECT word FROM  public."SpellItWords"
>  WHERE word ~ E'([a-z])\1{2}'
>
> What finally worked was this
> SELECT word FROM  public."SpellItWords"
>  WHERE word ~ E'(.)\\1'
>
> But I don't really understand what this does...Can you explain?

The ~ operator is a regular expression matching operator, and the
(.)\1 is a regular expression. More details here
http://www.postgresql.org/docs/current/static/functions-matching.html

The regular expression . matches a single character, since that . is
wrapped in () the regex engine captures the match and stores it in a
variable, this is called a capture group. Since this is the first such
capture group in the regular expression, then the value matching the .
gets stored in the variable \1, so your regex basically says; "match a
single character which has the same single character to its immediate
right hand side". The extra \ is just an escape character.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Regina Obe
This is mostly in response to David's recent comments.  I should say David,
you are really beginning to make me feel unsafe.
By unsafe I mean my mental safety of being able to speak truthfully without
fear of being kicked out of a community I love.

I do not think we need a Coc and if we do, it's only to protect me from
people like this Kurtis guy:

https://twitter.com/siloraptor/status/690637345972981760

So if we have a Coc, I want all people who are on Core and Coc committee  to
be exempt from it.  Because if I can't trust them I can't trust anybody in
the PostgreSQL group.

So here are some comments to your comments David:


> 3. If I understand correctly, the impetus for adopting a CoC (which,
believe me, I laud in no uncertain terms) was this post by Randi Harper
about her experience reporting abuse to the FreeBSD community:

  >
http://blog.randi.io/2015/12/31/the-developer-formerly-known-as-freebsdgirl/

> Ideally, by adopting a CoC and an enforcement policy, we can try to
prevent bad experiences for people reporting abuse. However, in this
example, the abuse, which came from a 
> FreeBSD committer and was aimed at another, took place on Twitter, not in
a FreeBSD forum. However, the rules of the FreeBSD community at that time
did not cover abuse outside 
> sanctioned community forums. As a result, the FreeBSd core:

I brought that up by the way and is what broke my camel's back about simply
ignoring this nonsense and going about my business doing PostGIS and tech
writing.
I personally went and talked to all the people that supposedly harassed
Randi and guess what?
They happened to be very nice people, that seemed emotionally traumatized by
her unjust assaults and her hiding behind (I'M A WOMAN YOU CAN'T TOUCH ME -
trump card). 
 In search of the truth, I found new friends.  

I don't want to even go into detail about the torture in community and
outside she put this poor guy thru what she put him thru I would expect her
to pay a million dollars in law-suits.

https://twitter.com/siloraptor/status/689969604102328320

As for her, she blocked me because I said after studying the evidence I
found her accusations baseless.


> Look, I'm not an authority on this stuff, either. But I understand that
rules, such as those in a Code of Conduct, must be explicit and as
unambiguous as language will allow.

Those who claim to be authorities are the most narrow-minded, self-absorbed,
culturally sheltered people I have ever met.  They can only think of
unambiguity in their own minds.

Chis Travers has demonstrated, that though he's white, he's been exposed to
so many cultures that he has a sense of how each feels. His experiences make
him an authority.
George Winkless has faced abuse and bullying.  He knows what it is when he
sees it.  Forget he's white.  His experiences make him an authority.
Josh Drake has to put up with 2 women every day being the only guy in his
immediate family.  Ironically he probably has a better perspective on the
"How women feel?" story than I do.

Now as for me true I'm a mixed race (Half-black, Half-white, woman, and I'm
a dual citizen - Half-Nigerian/ Half American and married to a Chinese man).
I should be the master authority, but guess what, I don't consider myself
one.

If I'm in an all black group I'm asked -- "You're part white, what do you
think white people think about this?" - I say, if you have a group of white
people, they'll all disagree with each other

If I'm in an all white group I'm asked -- "You're black what do black people
think?" - Well Nigerians think very differently than non-Nigerians, and I'm
not usually in an all black group that is not my extended Nigerian family.

If I'm in my husband's family meeting -- "Hmm Regina likes this food, I
wonder if that means all non-Chinese will like this" - curiously enough they
all pass me there - Red-bean porridge dessert, and I remain puzzled why
Chinese hand out desserts that their people don't seem to care for.

if I'm in an all-male group, I'm asked, "You're a woman, do you feel FOSS is
a rape culture.  Has someone tried to rape you in conferences? Do you feel
unsafe"   And I'll 

a) Point them to Josh Drake, cause he's had more experience dealing with
women than I have
b) Also point out that I've lived under the shadow of my older brothers,
following them around, had boy hand-me down toys, had a mother who was
"Daddy's favorite girl".
So essentially I'm a Tom-boy that feels extremely uncomfortable in all
female groups.  They look like me, but they are foreign creatures to me.  I
feel I understand the "male" psyche better if there is such a thing.

Finally I've suffered a lot of bullying in youth (and I mean real unsafe
kind like running from the bus when being chased by a gang of Italian boys
in an all-italian neighborhoo ready to lynch you kind of bullying) and I bet
most geeks have, so we are all very experienced on the subject and I would
hope wouldn't wish it on anyone else.  We don't need a Coc to tell us that.
I a

Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Steve Litt
On Sat, 23 Jan 2016 15:43:11 -0800
"Joshua D. Drake"  wrote:


> I have been accused of being a fat hater. My crime? I suggested that 
> generally speaking, obesity is a matter of diet and exercise. Worse?
> The individual started the conversation and I am also classified as
> obese (barely, I won't be in a month).

Perfect!

I know a person who is fat because his/her (I'll call the person male
from now on) thyroid was removed, and weight control is extremely
difficult under those circumstances. Do you think he'd feel welcome on
a list where somebody said "generally speaking, obesity is a matter of
diet and exercise?"[1] And then perhaps someone else says he thinks fat
people are lazy.

Is my overweight friend going to set you straight? Probably not. He
knows how much antifat prejudice exists in the employment marketplace,
and doesn't want to do anything do the slightest thing to "out" himself
to potential networking associates who haven't seen him in person.

And for what? What does a person's weight have to do with a great
and powerful Open Source relational database? Not a dam thing.

Hey, if the conflict is about technology, by all means have at it. It's
an argument that needs to happen in order to produce the best result.
But when it comes to gender, gender preference, gender-assignment,
race, nationality, religion, body shape, or political party (unless the
party takes a stand on technology), the CoC should ban negative
statements about that crap.

[1] I'm not faulting your example. Your example is relevant to the
discussion. I'm faulting a hypothetical person who comes on the list
and says that, apropos to nothing.

SteveT

Steve Litt 
January 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28




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


Re: [GENERAL] CoC [Final v2]

2016-01-23 Thread Joshua D. Drake

On 01/23/2016 04:00 PM, David E. Wheeler wrote:

On Jan 22, 2016, at 6:47 PM, Joshua D. Drake  wrote:


This document provides community guidelines for a safe, respectful, productive, and 
collaborative place for any person who is willing to contribute to the PostgreSQL 
community. It applies to all "collaborative space", which is defined as 
community communications channels (such as mailing lists, IRC, submitted patches, commit 
comments, etc.).


We need to also cover abuse by members of the community made outside the 
community. Otherwise we’ll appear to give safe harbor to abusers.


The private lives of members are the private lives of members. Let 
whatever space they are in and the requirements of that space dictate 
the response to their behaviour.





* Participants will be tolerant of opposing views.


This statement can be used in defense of abusive behavior (“I was just 
expressing an opposing view!”).


Can you provide an example of said behaviour that does not also violate 
the below?





* Participants must ensure that their language and actions are free
of personal attacks and disparaging personal remarks.

* When interpreting the words and actions of others, participants
should always assume good intentions.


This statement can be used in defense of abusive behavior (“You should 
recognize the intention behind what I said was benign!”).


Yes it can and then when they are corrected, if they continue, the below 
kicks in.





* Behaviour which can be reasonably considered harassment will not be tolerated.


Link to enforcement policy will of course be required.


Yes but as mentioned earlier, first comes the CoC, then comes the 
enforcement policy.


Sincerely,

Joshua D. Drake



Best,

David




--
Command Prompt, Inc.  http://the.postgres.company/
 +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Steve Litt
On Sat, 23 Jan 2016 17:09:32 -0500
Melvin Davidson  wrote:

> I been pretty quiet about this whole discussion, but now I have to
> ask the following questions.
> 
> This is an INTERNET SUPPORT FORUM.
> Just how in the hell is it possible for anyone to have their actual
> sex detected unless they voluntarily provide it?

Given that my name is "Steve", I doubt anyone thinks I'm a woman. If I
were a woman named "Stephanie", should I be expected to assume a
different name in preference to making rules against saying bad things
about people and groups, unrelated to the topic of the mailing list?

> Further to the point, how is it possible to harass sexually (or
> physically) molest anyone in this forum unless they provide
> information and agree to meet in person.

I could tell crude jokes about rape. I could a woman's worth is
proportional to her looks. I could arbitrarily attribute the lower
female participation in tech to lack of intelligence. If it were just
me, it would be just one asshole mouthing off. 

But add a couple more like me, with minimal repudiation by others, and
perhaps the same old cast of characters shouting down any repudiation
with that tired old "free speech" argument that some always seem to
apply to completely offtopic negative spew, and some women who might
have made big contributions have left the project.

> Please, drop the argument about protecting against physical or verbal
> abuse, 

Yeah, if everyone else does. But a code of conduct is actually a good
idea, because there are a lot of vicious, worthless clowns out there
who like to issue gratuitous insults.

> because it does not apply to this forum.

False.

SteveT

Steve Litt 
January 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28




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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Steve Litt
On Sun, 24 Jan 2016 00:00:27 +
Geoff Winkless  wrote:

> On 23 January 2016 at 21:59, Steve Litt 
> wrote:
> > I'm reminded of a person on a computer on a no-Internet-connection
> > LAN saying that everyone needs equal protection from firewalls.
> > Ummm, no. The Internet connected firewall has many, many more
> > attempts made against it than the guy on the island LAN.  
> 
> Did I say we all need equal protection? No. I said we're all entitled
> to the same level of protection. 

The preceding two sentences form a distinction that will need some
elaboration.

> I'm also making the point that your
> Island guy might have a mobile phone that's linked to his computer
> that you don't know about and you're assuming that cos he's on an
> island he has no right to have an opinion on firewalls.

Come on, the preceding is contrived to the point of being silly. You
know exactly what I mean.

SteveT

Steve Litt 
January 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28




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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Geoff Winkless
On 23 January 2016 at 23:39, David E. Wheeler  wrote:
> I get that my short, snarky posts don’t help my argument, but I admit to 
> being a bit frustrated that the posts wherein I have tried to lay out a 
> position get little or no response. So let me try again.

They get a response; however it's not the response you want, so you
seem to ignore it.

> 1. Items in the current draft of the CoC can be manipulated by abusers to 
> claim that they were just expressing an opinion or were ignorant of their 
> tone.

No, they can't. I've explained elsewhere how this is not the case, you
haven't responded.

> 2. This document has been written and edited, in the main, by people who have 
> not, to my knowledge, experienced the kind of abuse we want to prevent.
[snip]
> I think we should bring in the expertise to help us craft a document that’s 
> likely to be the most effective.

Feel free to bring them in, but be aware of the absolute limits of
what the postgres community is prepared to be responsible for.

> As a result, the FreeBSd core weren’t willing to take action on threats 
> because they didn’t happen on the mailing list — despite them happening in a 
> venue where the committer publicly identified himself as a member of the 
> project.
>
> The proposed CoC does not cover this situation, either, at least not as 
> directly as it should.

No. It shouldn't. That's the point that everyone is trying to make to
you and the point that you are stubbornly refusing to accept.

> This isn’t about compromise, mind. If what we want to do is to let people 
> know that they are safe from abuse in this community and from members of this 
> community, that we take abuse seriously and will act on reports 
> expeditiously, then I don’t see how the proposed CoC get us there.

It doesn't help that you appear to be hearing and not listening.

Geoff


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread David E. Wheeler
On Jan 23, 2016, at 3:43 PM, Joshua D. Drake  wrote:

> I have been accused of being a fat hater. My crime? I suggested that 
> generally speaking, obesity is a matter of diet and exercise. Worse? The 
> individual started the conversation and I am also classified as obese 
> (barely, I won't be in a month).
> 
> I have been accused of being sexist because I asked if there was chalk (for 
> bouldering) that was better for women because their skin is generally softer 
> and the chalk wasn't staying on the respective persons hand. A scientific 
> sexist fact.
> 
> I have been accused of being sexist because I said it wasn't sexist that 
> Samsung doesn't make full feature/performance phones that are smaller for a 
> woman's hands.

So are you able to recognize the ways in which those statements can come across 
as prejudiced? We *all* make mistakes. Ideally what one does is to try to 
recognize them and take responsibility for them. An *abuser* will do neither.

Best,

David



smime.p7s
Description: S/MIME cryptographic signature


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread David E. Wheeler
On Jan 23, 2016, at 1:59 PM, Steve Litt  wrote:

> We all need the necessary protection, which is not necessarily equal
> protection, because some of us are subjected to much more harassment.
> And I think we all need to walk a mile in other peoples shoes before
> assuming others need only the meager amount of protection we need.

Thank you, Steve, well said.

Best,

David



smime.p7s
Description: S/MIME cryptographic signature


Re: [GENERAL] CoC [Final v2]

2016-01-23 Thread David E. Wheeler
On Jan 22, 2016, at 6:47 PM, Joshua D. Drake  wrote:

> This document provides community guidelines for a safe, respectful, 
> productive, and collaborative place for any person who is willing to 
> contribute to the PostgreSQL community. It applies to all "collaborative 
> space", which is defined as community communications channels (such as 
> mailing lists, IRC, submitted patches, commit comments, etc.).

We need to also cover abuse by members of the community made outside the 
community. Otherwise we’ll appear to give safe harbor to abusers.

> * Participants will be tolerant of opposing views.

This statement can be used in defense of abusive behavior (“I was just 
expressing an opposing view!”).

> * Participants must ensure that their language and actions are free
> of personal attacks and disparaging personal remarks.
> 
> * When interpreting the words and actions of others, participants
> should always assume good intentions.

This statement can be used in defense of abusive behavior (“You should 
recognize the intention behind what I said was benign!”).

> * Behaviour which can be reasonably considered harassment will not be 
> tolerated.

Link to enforcement policy will of course be required.

Best,

David



smime.p7s
Description: S/MIME cryptographic signature


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Geoff Winkless
On 23 January 2016 at 21:59, Steve Litt  wrote:
> I'm reminded of a person on a computer on a no-Internet-connection LAN
> saying that everyone needs equal protection from firewalls. Ummm, no.
> The Internet connected firewall has many, many more attempts made
> against it than the guy on the island LAN.

Did I say we all need equal protection? No. I said we're all entitled
to the same level of protection. I'm also making the point that your
Island guy might have a mobile phone that's linked to his computer
that you don't know about and you're assuming that cos he's on an
island he has no right to have an opinion on firewalls.

> We all need protection --- this is true. But the transsexual has much
> more bad verbiage aimed at "his (her) kind" than a run of the mill,
> average person, whatever that may be.

Fear and mistrust and a lack of understanding. The way to defeat that
is education and talking, not forcing a plan of action down the
throats of the people who are most likely to be inclined to be open
and accepting.

> When you go to computer conferences, how often does someone put their
> hands all over you?

I don't go to computer conferences because they're filled with people
who are far too smart and therefore it tends to make me uncomfortable.
Maybe there should be protection for my type (I'd describe myself only
as a good jobbing coder with a better-than-average problem-solving
skill) against ubergeeks so I'm not made to feel uncomfortable at
conferences? Forget that the ubergeeks are the people who make the
stuff work that the conference is there for, it's not fair that they
make me feel left out because my brain is wired differently, now is
it?

> If you think the author of the preceding article is lying, google the
> combination of "groped" and "Linux conference". Women are the minority
> at these conferences, yet many more hands reach out and grab them.

And there are laws designed to stop that sort of behaviour. It's
called assault and the police will get involved, because that's their
job. It's not ours.

Geoff


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


Re: [GENERAL] A motion

2016-01-23 Thread Joshua D. Drake

On 01/23/2016 03:40 PM, Andres Freund wrote:

On 2016-01-23 15:31:02 -0800, Joshua D. Drake wrote:

With respect Adrian, that is a motion that never stands a chance. If you
don't want to read it, set up a filter that sends it right to the round
file.


It'd help if there weren't six, but one thread...


I tried to keep it to one but a few people decided the weeds were more 
useful than a productive and constructive conversation.


I am continuing down the CoC that has been produced with productive and 
constructive feedback over the last few weeks. If people would like to 
contribute to that CoC that many contributors have already put quite of 
bit of energy into, that is awesome. IF they want to continue to start 
new threads that achieve nothing but an argument, I am done with those 
(as of my last email on the subject).


Sincerely,

Joshua D. Drake








--
Command Prompt, Inc.  http://the.postgres.company/
 +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.


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


[GENERAL] repeated characters in SQL

2016-01-23 Thread Govind Chettiar
I have a simple table consisting of a bunch of English words.  I am trying
to find words that have repeated characters in them, for example
apple
tattoo

but not

orange
lemon

I know that only a maximum of one repetition can occur

I tried various options like
SELECT word FROM  public."SpellItWords"
 WHERE word ~ E'(.)\1{2,}'

SELECT word FROM  public."SpellItWords"
 WHERE word ~ E'([a-z])\1{2}'

What finally worked was this
SELECT word FROM  public."SpellItWords"
 WHERE word ~ E'(.)\\1'

But I don't really understand what this does...Can you explain?

Thanks!


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Joshua D. Drake

On 01/23/2016 01:59 PM, Steve Litt wrote:


We all need the necessary protection, which is not necessarily equal
protection, because some of us are subjected to much more harassment.
And I think we all need to walk a mile in other peoples shoes before
assuming others need only the meager amount of protection we need.


Everyone needs protection in some form or another.

The point, is that everyone deserves a fair shake and equal shake. There 
is no arguing that except to make a argument on false pretence.


If a woman is being harassed in this community, it is not o.k.
If a man is being harassed in this community, it is not o.k.
If a transgender is being harassed in this community, it is not o.k.
If a homosexual is being harassed in this community, it is not o.k.

I have been accused of being a fat hater. My crime? I suggested that 
generally speaking, obesity is a matter of diet and exercise. Worse? The 
individual started the conversation and I am also classified as obese 
(barely, I won't be in a month).


I have been accused of being sexist because I asked if there was chalk 
(for bouldering) that was better for women because their skin is 
generally softer and the chalk wasn't staying on the respective persons 
hand. A scientific sexist fact.


I have been accused of being sexist because I said it wasn't sexist that 
Samsung doesn't make full feature/performance phones that are smaller 
for a woman's hands.


The tl;dr; here is:

If a "human" is being harassed in this community, it is not o.k..
If a human is not being respected in this community, it is not o.k..

Anything that tries to create an unbalanced protected class is a 
non-starter.



Sincerely,

JD


--
Command Prompt, Inc.  http://the.postgres.company/
 +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.


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


Re: [GENERAL] A motion

2016-01-23 Thread Adrian Klaver

On 01/23/2016 03:31 PM, Joshua D. Drake wrote:

On 01/23/2016 03:08 PM, Adrian Klaver wrote:

On 01/23/2016 03:03 PM, Berend Tober wrote:

Adrian Klaver wrote:

Motion:

The Coc  discussion be moved to its own list where those who care can
argue to their hearts content and leave the rest of us to deal with
technical questions. Upon a decision on said list the result be posted
to the Postgres web site for consideration.


Been suggested already, and rejected:

http://www.postgresql.org/message-id/56970135.6060...@computer.org


I'm an optimist.


With respect Adrian, that is a motion that never stands a chance. If you
don't want to read it, set up a filter that sends it right to the round
file.


Not sure why, there is precedence:

http://www.postgresql.org/message-id/47227e15.6030...@agliodbs.com



JD









--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] A motion

2016-01-23 Thread Andres Freund
On 2016-01-23 15:31:02 -0800, Joshua D. Drake wrote:
> With respect Adrian, that is a motion that never stands a chance. If you
> don't want to read it, set up a filter that sends it right to the round
> file.

It'd help if there weren't six, but one thread...


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread David E. Wheeler
Hi PostgreSQL General.

I get that my short, snarky posts don’t help my argument, but I admit to being 
a bit frustrated that the posts wherein I have tried to lay out a position get 
little or no response. So let me try again.

1. Items in the current draft of the CoC can be manipulated by abusers to claim 
that they were just expressing an opinion or were ignorant of their tone. The 
ability to say that, and reference a specific item in the CoC when doing so, 
introduces an element of inconsistency that can lead people to doubt that 
statements are in violation of the CoC. One might think that “You can not 
violate one part of the CoC and use the other part as the reason”, and yet that 
is exactly what is likely to happen. One can, and one will, and then how will 
those evaluating a case of reported abuse handle it? If someone says, “I was 
abused as defined in Bullet 2,” but the abuser says, “I am protected in my 
speech by Bullets 1 and 3,” what’s going to happen?

Related: http://paddy.io/posts/professional-concerns/

2. This document has been written and edited, in the main, by people who have 
not, to my knowledge, experienced the kind of abuse we want to prevent. Nor do 
they have experience in writing a document like this in such a way to make it 
consistent and effective, and to make targets of abuse feel safe here. We 
really should be taking advantage of the expertise of those who have 
experienced these issues, who have seen what has worked and what hasn’t, and 
can advise us on the most likely approach for success. The Contributor Covenant 
tries to encapsulate such expertise in a way that’s easy for communities to 
develop. But if our community doesn’t like the Covenant, I think we should 
bring in the expertise to help us craft a document that’s likely to be the most 
effective. There are a number of consultants in this space who have 
tremendously helped other communities I’ve participated in, such as the XOXO 
Festival.

3. If I understand correctly, the impetus for adopting a CoC (which, believe 
me, I laud in no uncertain terms) was this post by Randi Harper about her 
experience reporting abuse to the FreeBSD community:

  http://blog.randi.io/2015/12/31/the-developer-formerly-known-as-freebsdgirl/

Ideally, by adopting a CoC and an enforcement policy, we can try to prevent bad 
experiences for people reporting abuse. However, in this example, the abuse, 
which came from a FreeBSD committer and was aimed at another, took place on 
Twitter, not in a FreeBSD forum. However, the rules of the FreeBSD community at 
that time did not cover abuse outside sanctioned community forums. As a result, 
the FreeBSd core:

> weren’t willing to take action on threats because they didn’t happen on the 
> mailing list — despite them happening in a venue where the committer publicly 
> identified himself as a member of the project. 

The proposed CoC does not cover this situation, either, at least not as 
directly as it should. So if someone who identified as a PostgreSQL community 
member abused someone else on Twitter or Facebook, and that abuse was reported 
to the PostgreSQL community (by whatever policy the community will need to 
spell out), will the abuse enforcement team be able to do anything about it, by 
the proposed CoC? I suspect not. The third bullet item refers only to the 
community “collaborative space”. It should also cover forums outside the 
community’s own collaborative spaces. Otherwise, if someone in our community 
abuses someone in an outside forum, but is allowed to continue to participate 
in the community, then the target of that abuse will not feel safe here. The 
abuser, however, will. Is that an outcome we really want? If not, how do we 
make explicit that it won’t happen?

Look, I’m not an authority on this stuff, either. But I understand that rules, 
such as those in a Code of Conduct, must be explicit and as unambiguous as 
language will allow. And it’s pretty easy for me, a non-expert in the fields of 
law or abuse mitigation, to see oversights and contradictions that can and will 
be exploited by abusers. We should close them. Ideally the core organization 
would hire one or more experts to help us out, or else would take advantage of 
the fruits of their past labors and adopt something that has already been 
thought-through by experts and adopted by a wide range of communities. Will it 
be perfect? No. Can we make it good enough to make people feel safe? Absolutely.

This isn’t about compromise, mind. If what we want to do is to let people know 
that they are safe from abuse in this community and from members of this 
community, that we take abuse seriously and will act on reports expeditiously, 
then I don’t see how the proposed CoC get us there.

Best,

David



smime.p7s
Description: S/MIME cryptographic signature


Re: [GENERAL] A motion

2016-01-23 Thread Joshua D. Drake

On 01/23/2016 03:08 PM, Adrian Klaver wrote:

On 01/23/2016 03:03 PM, Berend Tober wrote:

Adrian Klaver wrote:

Motion:

The Coc  discussion be moved to its own list where those who care can
argue to their hearts content and leave the rest of us to deal with
technical questions. Upon a decision on said list the result be posted
to the Postgres web site for consideration.


Been suggested already, and rejected:

http://www.postgresql.org/message-id/56970135.6060...@computer.org


I'm an optimist.


With respect Adrian, that is a motion that never stands a chance. If you 
don't want to read it, set up a filter that sends it right to the round 
file.


JD






--
Command Prompt, Inc.  http://the.postgres.company/
 +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.


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


Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread Johannes
Am 23.01.2016 um 23:38 schrieb John R Pierce:
> On 1/23/2016 2:19 PM, Johannes wrote:
>> I save my images as large object, which afaik is in practise not
>> readable with a binary cursor (we should use the lo_* functions). And of
>> course I already use the LargeObjectManager of the postgresql jdbc
>> library.
> 
> 
> afaik, Large Objects are completely independent of the other mode
> stuff.they are stored and transmitted in binary.


Depends on the client. It can be transfered as text or binary. And the
data is sliced into bytea segements [1] and afaik it is stored as binary
string.


> I haven't read this whole ongoing thread, just glanced at messages as
> they passed by over the past week or whatever, but I have to say, I
> would NOT be storing 11MB images directly in SQL, rather, I would store
> it on a file server, and access it with nfs or https or whatever is most
> appropriate for the nature of the application.   I would store the
> location and metadata in SQL.


The 11MB file is the biggest image one, the rest is normal. I know about
the arguments, but there are pros I want to use in production
(transactions, integrity). But if it fails (amount of space?, slow
import?) I may exclude the image data.

[1] http://www.postgresql.org/docs/9.5/static/catalog-pg-largeobject.html



signature.asc
Description: OpenPGP digital signature


Re: [GENERAL] A motion

2016-01-23 Thread Adrian Klaver

On 01/23/2016 03:03 PM, Berend Tober wrote:

Adrian Klaver wrote:

Motion:

The Coc  discussion be moved to its own list where those who care can
argue to their hearts content and leave the rest of us to deal with
technical questions. Upon a decision on said list the result be posted
to the Postgres web site for consideration.


Been suggested already, and rejected:

http://www.postgresql.org/message-id/56970135.6060...@computer.org


I'm an optimist.

--
Adrian Klaver
adrian.kla...@aklaver.com


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


[GENERAL] A motion

2016-01-23 Thread Adrian Klaver

Motion:

The Coc  discussion be moved to its own list where those who care can 
argue to their hearts content and leave the rest of us to deal with 
technical questions. Upon a decision on said list the result be posted 
to the Postgres web site for consideration.


Thanks,

--
Adrian Klaver
adrian.kla...@aklaver.com


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


Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread John R Pierce

On 1/23/2016 2:19 PM, Johannes wrote:

I save my images as large object, which afaik is in practise not
readable with a binary cursor (we should use the lo_* functions). And of
course I already use the LargeObjectManager of the postgresql jdbc library.



afaik, Large Objects are completely independent of the other mode 
stuff.they are stored and transmitted in binary.


I haven't read this whole ongoing thread, just glanced at messages as 
they passed by over the past week or whatever, but I have to say, I 
would NOT be storing 11MB images directly in SQL, rather, I would store 
it on a file server, and access it with nfs or https or whatever is most 
appropriate for the nature of the application.   I would store the 
location and metadata in SQL.




--
john r pierce, recycling bits in santa cruz



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


Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread Johannes
Am 23.01.2016 um 01:25 schrieb Daniel Verite:
>   Johannes wrote:
> 
>> psql
>> select lo_get(12345);
>> +ssl -compression 6.0 sec
>> -ssl  4.4 sec
> 
> psql requests results in text format so that SELECT does not
> really test the transfer of binary data.
> With bytea_output to 'hex', contents are inflated by 2x.
> 
> Can you tell how fast this goes for you, as a comparison point:
>\lo_export 12345 /dev/null
> ?
> 
> Many client interfaces use the text format, but you want to
> avoid that if possible with large bytea contents.
> In addition to puttingtwice the data on the wire, the server has to
> convert the bytes to hex and the client has to do the reverse operation,
> a complete waste of CPU time on both ends.
> 
> At the SQL level, the DECLARE name BINARY CURSOR FOR query
> can help to force results in binary, but as the doc says:
> 
>  http://www.postgresql.org/docs/current/static/sql-declare.html
> 
>   "Binary cursors should be used carefully. Many applications, including
>   psql, are not prepared to handle binary cursors and expect data to
>   come back in the text format."
> 
> Personally I don't have experience with JDBC, but looking at the doc:
> https://jdbc.postgresql.org/documentation/94/binary-data.html
> 
> I see this:
> 
> "To use the Large Object functionality you can use either the
> LargeObject class provided by the PostgreSQL™ JDBC driver, or by using
> the getBLOB() and setBLOB() methods."
> 
> If the data lives on the server as large objects, I would think that
> this LargeObject class has the best potential for retrieving them
> efficiently, as opposed to "SELECT lo_get(oid)" which looks like
> it could trigger the undesirable round-trip to the text format.
> You may want to test that or bring it up as a question to JDBC folks.
> 
> 
> Best regards,


\lo_export 12345 /dev/null is completed in 0.86 seconds.

I save my images as large object, which afaik is in practise not
readable with a binary cursor (we should use the lo_* functions). And of
course I already use the LargeObjectManager of the postgresql jdbc library.

You said, the server has to convert the bytes to hex string before
sending it over the wire. In my understanding bytea values are stored as
strings and are may compressed in TOAST storage.
> The bytea data type allows storage of binary strings [1]
What is correct?

Your post gave me the hint. I found a binary transfer parameter in the
postgresql jdbc library available [2], [3].

But turning it on, doesn't speed anything up. It seems the binary
transfer mode is active by default. The byte counter (iptables -v) is
nearly as big as the image itself. It is already optimal.

  packets  byte counter
psql  +ssl   8514  23M
psql  -ssl   8179  23M
pgadmin   -ssl  11716  33M
pgadmin   +ssl -compress12196  34M
pgadmin   +ssl +compress12193  34M
java jdbc +ssl  14037  24M
java jdbc -ssl   5622  12M (3.1 seconds)
java jdbc -ssl binarytransfer=true   5615  12M (3.1 seconds)

In fact I do not understand what is the bottleneck. OK my server, runs
in a Raspberry 2b+, thats maybe not the best hardware. But the scp
command could be finished from there in 1.3 seconds. So the bottleneck
is not the network speed. And also not the USB diskdrive. Maybe it is
the slow java program? I pointed my java program to my local postgresql
instance (with the same image as large object, same mtu, no loopback
device, no unix socket, but better system) it was finished in 400 ms.
The java progam is out too. Did I forget anything?

I'm afraid I have to live with it and may use thumbnail images.

Best regards

[1] http://www.postgresql.org/docs/current/static/datatype-binary.html
[2] https://wiki.postgresql.org/wiki/JDBC-BinaryTransfer
[3]
https://jdbc.postgresql.org/documentation/94/connect.html#connection-parameters



signature.asc
Description: OpenPGP digital signature


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Melvin Davidson
I been pretty quiet about this whole discussion, but now I have to ask the
following questions.

This is an INTERNET SUPPORT FORUM.
Just how in the hell is it possible for anyone to have their actual sex
detected unless they voluntarily provide it?
Further to the point, how is it possible to harass sexually (or physically)
molest anyone in this forum unless they provide information
and agree to meet in person.

Please, drop the argument about protecting against physical or verbal
abuse, because it does not apply to this forum.


On Sat, Jan 23, 2016 at 4:59 PM, Steve Litt 
wrote:

> On Sat, 23 Jan 2016 20:12:15 +
> Geoff Winkless  wrote:
>
> > On 23 January 2016 at 18:07, David E. Wheeler 
> > wrote:
> > > On Jan 22, 2016, at 6:14 PM, Joshua D. Drake 
> > > wrote:
> > >> A Code of Conduct should protect all, equally and without bias.
> > >
> > > Says someone who requires no protection at all.
> >
> > I must object to the repeated assertions that certain people in this
> > community require no protection, or have no reason to, as a way of
> > discounting their arguments.
> >
> > In addition you might appreciate the irony if you took the time to
> > consider the (reasonably recent) history of people with names like his
> > before stating that Josh requires no protection. Everyone is entitled
> > to the same level of protection, whatever their race, gender
> > alignment, sexuality or whatever, and that includes us white
> > middle-class men, however guilty you appear to feel the need to be
> > about being one.
>
> I'm reminded of a person on a computer on a no-Internet-connection LAN
> saying that everyone needs equal protection from firewalls. Ummm, no.
> The Internet connected firewall has many, many more attempts made
> against it than the guy on the island LAN.
>
> We all need protection --- this is true. But the transsexual has much
> more bad verbiage aimed at "his (her) kind" than a run of the mill,
> average person, whatever that may be.
>
> When you go to computer conferences, how often does someone put their
> hands all over you? Read this:
>
> http://blog.valerieaurora.org/2010/11/08/its-not-just-noirin/
>
> If you think the author of the preceding article is lying, google the
> combination of "groped" and "Linux conference". Women are the minority
> at these conferences, yet many more hands reach out and grab them.
>
> We all need the necessary protection, which is not necessarily equal
> protection, because some of us are subjected to much more harassment.
> And I think we all need to walk a mile in other peoples shoes before
> assuming others need only the meager amount of protection we need.
>
> SteveT
>
> Steve Litt
> January 2016 featured book: Twenty Eight Tales of Troubleshooting
> http://www.troubleshooters.com/28
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Steve Litt
On Sat, 23 Jan 2016 20:12:15 +
Geoff Winkless  wrote:

> On 23 January 2016 at 18:07, David E. Wheeler 
> wrote:
> > On Jan 22, 2016, at 6:14 PM, Joshua D. Drake 
> > wrote:  
> >> A Code of Conduct should protect all, equally and without bias.  
> >
> > Says someone who requires no protection at all.  
> 
> I must object to the repeated assertions that certain people in this
> community require no protection, or have no reason to, as a way of
> discounting their arguments.
> 
> In addition you might appreciate the irony if you took the time to
> consider the (reasonably recent) history of people with names like his
> before stating that Josh requires no protection. Everyone is entitled
> to the same level of protection, whatever their race, gender
> alignment, sexuality or whatever, and that includes us white
> middle-class men, however guilty you appear to feel the need to be
> about being one.

I'm reminded of a person on a computer on a no-Internet-connection LAN
saying that everyone needs equal protection from firewalls. Ummm, no.
The Internet connected firewall has many, many more attempts made
against it than the guy on the island LAN.

We all need protection --- this is true. But the transsexual has much
more bad verbiage aimed at "his (her) kind" than a run of the mill,
average person, whatever that may be.

When you go to computer conferences, how often does someone put their
hands all over you? Read this:

http://blog.valerieaurora.org/2010/11/08/its-not-just-noirin/

If you think the author of the preceding article is lying, google the
combination of "groped" and "Linux conference". Women are the minority
at these conferences, yet many more hands reach out and grab them.

We all need the necessary protection, which is not necessarily equal
protection, because some of us are subjected to much more harassment.
And I think we all need to walk a mile in other peoples shoes before
assuming others need only the meager amount of protection we need.

SteveT

Steve Litt 
January 2016 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28




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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Geoff Winkless
On 23 January 2016 at 18:07, David E. Wheeler  wrote:
> On Jan 22, 2016, at 6:14 PM, Joshua D. Drake  wrote:
>> A Code of Conduct should protect all, equally and without bias.
>
> Says someone who requires no protection at all.

I must object to the repeated assertions that certain people in this
community require no protection, or have no reason to, as a way of
discounting their arguments.

In addition you might appreciate the irony if you took the time to
consider the (reasonably recent) history of people with names like his
before stating that Josh requires no protection. Everyone is entitled
to the same level of protection, whatever their race, gender
alignment, sexuality or whatever, and that includes us white
middle-class men, however guilty you appear to feel the need to be
about being one.

Geoff


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Joshua D. Drake

On 01/23/2016 10:07 AM, David E. Wheeler wrote:

On Jan 22, 2016, at 6:14 PM, Joshua D. Drake  wrote:


You can not violate one part of the CoC and use the other part as the reason.


You say, that, and yet someone will. Think about law: if laws contradict each 
other, a person accused of violating one law will use the other in their 
defense.


A Code of Conduct should protect all, equally and without bias.


Says someone who requires no protection at all.


David,

I appreciate that this topic is close to your heart and that you are 
very passionate about it. I would counsel you to try and be objective 
and work toward a solution that people will be willing to support. That 
support will require compromise.


Sincerely,

Joshua D. Drake




--
Command Prompt, Inc.  http://the.postgres.company/
 +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.


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


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread David E. Wheeler
On Jan 22, 2016, at 6:14 PM, Joshua D. Drake  wrote:

> You can not violate one part of the CoC and use the other part as the reason.

You say, that, and yet someone will. Think about law: if laws contradict each 
other, a person accused of violating one law will use the other in their 
defense.

> A Code of Conduct should protect all, equally and without bias.

Says someone who requires no protection at all.

Best,

David




smime.p7s
Description: S/MIME cryptographic signature


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Geoff Winkless
On 22 January 2016 at 23:31, David E. Wheeler  wrote:
> On Jan 22, 2016, at 3:15 PM, Kevin Grittner  wrote:
>
>> I do wonder what it is that made you terrified of a shitstorm, and
>> what it is that you're hoping for that you don't feel is already
>> present.
>
> Regina linked to some shitstorms in the Opal and Ruby communities. Shitstorms 
> are not unusual when people ask for a CoC.

No, shitstorms are not unusual when people aggressively and
unreasonably shout and scream like spoilt children to get their own
way. Thus far there has mostly been reasonable argument on both sides.

> My own behavior earlier is not a terrible example. By one point on the CoC (“ 
> language and actions are free
> of personal attacks and disparaging personal remarks”), it seems problematic 
> if not an outright violation.
> But one can argue by another point (“tolerant of people’s right to have 
> opposing views”) that it’s totally within bounds.

I and many others have already invalidated this point and yet without
answering them you continue to push it as truth. You're currently
hovering extremely close to the "destructive troll" box, to be honest.

> What if they psychologically abused someone in person, perhaps another member 
> of the community,
> but in a non-community context? Should there be no repercussions?

Here? No. Postgres is not in the business of enforcing the law, or
indeed of enforcing one person's idea of acceptable behaviour.

> In my above example, the victim of the abuse would not feel safe in our 
> community, because their
> abuser would still be a member in good standing. Even if they reported that 
> behavior, the would have
> no expectation of anything being done to address it. In this example, the 
> abuser ends up protected by
> the CoC while the victim is not.

Not true. The victim has the same level of protection as the abuser
within the community context.

Outside the community context Postgres has little or no impact. We
(when I say "we" I mean the community) could bar someone from the
community and it would have no impact on the hypothetical situation
you describe. Further, we do not have the resource to investigate to a
legal satisfaction any evidence that may or may not exist, so we would
(if we arbitrarily made decisions about a community member based on
another member's say-so) lay ourselves open to legal challenge if the
actions we took did actually impact on that member's ability to earn a
living.

> This is a very real thing that happens to real people in communities every 
> day. IME, we want people to feel safe reporting incidents even if they occur 
> outside the community, and that such reports will be taken seriously, with an 
> explicit policy for doing so.

Please don't put "we want" when it's been made explicitly clear that a
significant number of "we" do not, unless you meant "IMO" rather than
"IME"

> Limiting the policy to community forums is insufficient for making people 
> feel safe.
> This is the whole reason for v1.3.0 of the Contributor Covenant:

It was made clear very early on in the discussion that that is the
reason why it will not be adopted.

Geoff


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


Re: [GENERAL] 9.5 new features

2016-01-23 Thread Melvin Davidson
http://www.postgresql.org/docs/9.5/interactive/brin-intro.html

62.1. Introduction
...
"A block range is a group of pages that are physically adjacent in the
table; for each block range, some summary info is stored by the index."

>From the above, may I presume that it is best to cluster (or sort), the
table based on the intended BRIN
column(s) before actually creating the index to insure the pages are
adjacent? If so, should that not be included in the documentation, instead
of implied?


On Sat, Jan 23, 2016 at 5:49 AM, FarjadFarid(ChkNet) <
farjad.fa...@checknetworks.com> wrote:

> Sounds like a great feature.
>
> How can it be tested?
>
> I am particularly thinking of window servers and effect of this on a live
> system and any performance issues.
>
> It is an exciting feature. Thanks guys.
>
>
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:
> pgsql-general-ow...@postgresql.org] On Behalf Of David Rowley
> Sent: 23 January 2016 03:14
> To: John R Pierce
> Cc: PostgreSQL
> Subject: Re: [GENERAL] 9.5 new features
>
> On 23 January 2016 at 09:49, John R Pierce  wrote:
> > one of my coworkers says he thought that 9.5 has some enhancements in
> > partitioning, but looking at the release notes I don't see anything
> specific
> > ?do BRIN's play into partitioned tables ?
> >
> > in our case, we partition very large 'event' tables by week with 6
> > month retention
>
> BRIN can be seen as a form of "automatic partitioning", and I have seen it
> described as such in documents relating to the BRIN project, so perhaps
> that description has made its way further afield and that's maybe what your
> coworker heard about.
>
> If you view the inheritance partitioning feature as a method of
> eliminating scans of partitions which can be proved unneeded at planning
> time, then BRIN can eliminate blocks from a scan of a single relation (or
> rather "pages_per_range") during execution time. So I agree with the
> "automatic partitioning" description.
>
> --
>  David Rowley   http://www.2ndQuadrant.com/
>  PostgreSQL Development, 24x7 Support, Training & Services
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To
> make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



-- 
*Melvin Davidson*
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.


Re: [GENERAL] Building PostgreSQL 9.6devel sources with Microsoft Visual C++ 2015?

2016-01-23 Thread Michael Paquier
On Fri, Jan 22, 2016 at 9:06 PM, Yury Zhuravlev
 wrote:
> Please look at the new patch. It is filled with black magic, but it looks
> still more true.
> He agreed with the internal API.

+__crt_locale_data_public* public_loct =
__acrt_get_locale_data_prefix(loct);
Where did you get that?
-- 
Michael


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


Re: [GENERAL] Connecting to SQL Server from Windows using FDW

2016-01-23 Thread John J. Turner
> On 23 January 2016 at 04:40, John J. Turner  wrote:
> On Jan 22, 2016, at 1:05 PM, ivo silvestre  wrote:
> 
> > I need to create a linked server between 2 Windows servers. In one I've 
> > PostgreSQL with admin privileges and in the other MS SQL with only read 
> > access.
> >
> > I need to create a view (or a foreign table?) in PostgreSQL from a table in 
> > MS SQL in another server ...
> > ... I found GeoffMontee's Github, but I don't know how to install it on 
> > Windows...
> 
> Perhaps this link may help:
> https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/
> 
> The only caveat I see offhand is the use of the 'sa' account, but I can't 
> vouch for that being a required mapping.


On Jan 23, 2016, at 4:08 AM, ivo silvestre  wrote:
> Hi John,
> 
> Thanks, but I already saw that link. The problem is to installing the tds_fwd 
> extension on postgres. And I don't know how to (never tried) compile it...
> 
> What comes with postgres by default is the postgres fdw, that allow to link 2 
> different postgres servers, but in this case that doesn't help me.


Sorry Ivo, my bad - I managed to gloss over the salient point for your issue in 
this link - you're on Windows, his Postgres was on Linux!

Compiling an extension on Windows, last time I tried many moons ago was 
unfortunately not successful, which involved compiling the whole pg source tree 
via MinGW.

Hazarding a thought - although it's discontinued, it might be worth checking 
out Windows Subsystem for UNIX-based Applications (SUA):
https://en.wikipedia.org/wiki/Windows_Services_for_UNIX

But I suspect anything you managed to compile with that would still be 
incompatible with your pg instance...

Beyond that, perhaps the gurus here have some sage advice...

- John

Re: [GENERAL] 9.5 new features

2016-01-23 Thread FarjadFarid(ChkNet)
Sounds like a great feature. 

How can it be tested? 

I am particularly thinking of window servers and effect of this on a live 
system and any performance issues.  

It is an exciting feature. Thanks guys. 


-Original Message-
From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David Rowley
Sent: 23 January 2016 03:14
To: John R Pierce
Cc: PostgreSQL
Subject: Re: [GENERAL] 9.5 new features

On 23 January 2016 at 09:49, John R Pierce  wrote:
> one of my coworkers says he thought that 9.5 has some enhancements in 
> partitioning, but looking at the release notes I don't see anything specific
> ?do BRIN's play into partitioned tables ?
>
> in our case, we partition very large 'event' tables by week with 6 
> month retention

BRIN can be seen as a form of "automatic partitioning", and I have seen it 
described as such in documents relating to the BRIN project, so perhaps that 
description has made its way further afield and that's maybe what your coworker 
heard about.

If you view the inheritance partitioning feature as a method of eliminating 
scans of partitions which can be proved unneeded at planning time, then BRIN 
can eliminate blocks from a scan of a single relation (or rather 
"pages_per_range") during execution time. So I agree with the "automatic 
partitioning" description.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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



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


Re: [GENERAL] 9.5 new features

2016-01-23 Thread David Rowley
On 23 January 2016 at 22:41, Vik Fearing  wrote:
> On 01/23/2016 10:28 AM, John R Pierce wrote:
>> anyways, yeah, BRIN sounds very cool for very large tables with
>> relatively stable data.
>
> I have found it particularly efficient when the BRIN index contains all
> columns of the table.  Just using it on one or two columns is not a win
> over btree.

I've found it to be very useful for very large INSERT only tables with
a column which increments with each insert, e.g. a timestamp. This
allows large portions on the table to be skipped during a scan, and
also maintains sequential read speeds which I don't think would work
quite as efficiently with btree index performing heap lookups.

-- 
 David Rowley   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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


Re: [GENERAL] 9.5 new features

2016-01-23 Thread Vik Fearing
On 01/23/2016 10:28 AM, John R Pierce wrote:
> On 1/23/2016 12:35 AM, Vik Fearing wrote:
>>> >ok, but it doesn't deal with our use case of needing to bulk delete a 6
>> I can't really parse the end of that sentence, but you are correct that
>> BRIN does not help at all with partition dropping.  Think of it more as
>> a Seq Scan optimization.
> 
> yeah, it was supposed to say, bulk delete 6 month old data once a week,
> while the database is still under a full production load of new data.
> 
> anyways, yeah, BRIN sounds very cool for very large tables with
> relatively stable data.

I have found it particularly efficient when the BRIN index contains all
columns of the table.  Just using it on one or two columns is not a win
over btree.
-- 
Vik Fearing  +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support


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


Re: [GENERAL] long transfer time for binary data

2016-01-23 Thread George Neuner
On Fri, 22 Jan 2016 22:05:24 +0100, Johannes  wrote:

>Thanks for explanation. Im writing a client software in java/jdbc. Most
>images are in jpeg format. Some have high quality, most medium.

Unfortunately I'm not terribly conversant in Java ... I can
read/understand it, but I rarely write any.


>Rendering this 11MB Image in eog (Eye Of Gome) takes 0.5 sec, in GIMP it
>is very fast.

I'm not familiar with EoG, but GIMP uses both SIMD code to process the
image and OpenGL (which in turn uses your GPU if possible) to draw
directly to the video buffer.  That makes a big difference vs drawing
to a generic GUI window context.


>In Java the object createion takes nearly all time, the drawing is done 
>very quickly.

I have zero experience with jdbc - but if it's anything like ODBC,
then it may be reading the images inefficiently (at least by default).
In ODBC connections have a settable MTU size - BLOBs that are bigger
than 1 MTU get transferred in pieces.

That is fine if you don't know the size of the object beforehand, but
it can be much slower than necessary if you do (or can approximate
it).  ODBC's default MTU is quite small by today's multimedia data
standards.

If it's something other than this - e.g., you need to process the
image faster from Java - then I'm afraid you'll have to look to
other's for help.


>The size of the binary string representation of this image is 22MB. I
>guess there are not other special transfer mechanism for binary data
>than plain text via sql, or?

You said originally it was a bytea column?  If so, the BLOB shouldn't
be any longer than the original image file.  It would be different if
you stored the image in a text column, e.g., as escaped ASCII or as
ROT64 encoded, etc.

Characters in Java are 16-bit values.  If you convert the BLOB into a
printable string [or your debugger does to view it], that string will
be twice as long as the binary.

Hope this helps,
George



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


Re: [GENERAL] 9.5 new features

2016-01-23 Thread John R Pierce

On 1/23/2016 12:35 AM, Vik Fearing wrote:

>ok, but it doesn't deal with our use case of needing to bulk delete a 6

I can't really parse the end of that sentence, but you are correct that
BRIN does not help at all with partition dropping.  Think of it more as
a Seq Scan optimization.


yeah, it was supposed to say, bulk delete 6 month old data once a week, 
while the database is still under a full production load of new data.


anyways, yeah, BRIN sounds very cool for very large tables with 
relatively stable data.


--
john r pierce, recycling bits in santa cruz



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


Re: [GENERAL] Connecting to SQL Server from Windows using FDW

2016-01-23 Thread ivo silvestre
Hi John,

Thanks, but I already saw that link. The problem is to installing the
tds_fwd extension on postgres. And I don't know how to (never tried)
compile it...

What comes with postgres by default is the postgres fdw
, that
allow to link 2 different postgres servers, but in this case that doesn't
help me.


On 23 January 2016 at 04:40, John J. Turner  wrote:

> On Jan 22, 2016, at 1:05 PM, ivo silvestre  wrote:
>
> > I need to create a linked server between 2 Windows servers. In one I've
> PostgreSQL with admin privileges and in the other MS SQL with only read
> access.
> >
> > I need to create a view (or a foreign table?) in PostgreSQL from a table
> in MS SQL in another server ...
> > ... I found GeoffMontee's Github, but I don't know how to install it on
> Windows...
>
> Perhaps this link may help:
>
> https://www.mssqltips.com/sqlservertip/3663/sql-server-and-postgresql-foreign-data-wrapper-configuration--part-3/
>
> The only caveat I see offhand is the use of the 'sa' account, but I can't
> vouch for that being a required mapping.
>
> Cheers,
> John
>
>


-- 
Ivo Silvestre
__
*técnico sig | gis technician*


__


Re: [GENERAL] Let's Do the CoC Right

2016-01-23 Thread Chris Travers
On Fri, Jan 22, 2016 at 6:25 AM, David E. Wheeler 
wrote:

> Fellow PostgreSQLers,
>
> I can’t help that there are a whole lot of white guys working on this
> document, with very little feedback from the people who it’s likely to
> benefit (only exception I spotted in a quick scan was Regina; sorry if I
> missed you). I suspect that most of you, like me, have never been the
> target of the kinds os behaviors we want to forbid. Certainly not to the
> level of many women, transgendered, and people of color I know of
> personally, in this community and others, who have. If those people are not
> speaking up here, I suspect it’s because they don’t expect to be heard. A
> bunch of white guys who run the project have decided what it’s gonna be,
> and mostly cut things out since these threads started.
>

I am married to someone from a very different culture and have now lived
and worked in three very different cultures and continents.  One problem I
have seen is that once one starts making these distinction "white guys"
then the rhetorical framework is complex enough it turns to benefit the
same powers it is supposed to restrict.


> But a *whole* lot of thought has gone into the creation of CoCs by the
> people who need them, and those who care about them. They have considered
> what sorts of things should be covered, what topics specifically addressed,
> and how to word them so as to enable the most people possible to feel safe,
> and to appropriately address issues when they inevitably arise, so that
> people continue to feel safe.
>
> So I’d like to propose that we not try to do this ourselves. Instead, I
> propose that we take advantage of the ton of thought others have already
> put into this, and simply:
>
> * Follow the example of many other successful communities (Swift, Mono,
> Rails, and 10,000 others) and adopt the open-source Contributor Covenant,
> unmodified.
>
>   http://contributor-covenant.org
>
> Does the phrase "solution in search of a problem" come to mind?


> * Put this document in the root directory of the project as
> CODE_OF_CONDUCT.md, so that anyone who wants to contribute can. It should
> also be listed on the main web site and referenced from appropriate places
> (such as the mail lists pages).
>
> * Spell out a policy and procedure for enforcement and include it as a
> separate document, again in the Git rep and on the site. The reporting
> address should be included in the Covenant. The Covenant web site has links
> to a number of existing guides we ought to crib from.
>

The problem isn't as I understand it an enforcement problem.  It is the
fact that in a genuinely diverse group of people, there are going to be
major differences in perspective and it is very easy to find something to
be offended at.  If the goal is a frankly Western-exclusive view of
diversity which includes some perspectives but is hostile to other
perspectives then it is entirely self-defeating.

As I have mentioned before people in many countries may (legitimately!) see
folks pushing GLBT rights as an effort to corrode the traditional
multi-generation family structures which both care for the elderly and
provide business continuity in a family business (i.e. self-employment,
small business, unincorporated, nonindustrial) economy.  And therefore we
white guys can then justify our racist paternalism using our perception of
their homophobia (without even trying to understand where they are coming
from!) My point here isn't on the wisdom of policies but on the nature
of discourse and the point that the quest to appear diverse to some
interests requires squashing diversity in other dimensions (particularly
where ideology and culture come together).

Because I see things from multiple cultural perspectives let me give a
hypothetical that I think shows how these things conflict.  I might be
getting quoted sources slightly wrong.  My point here is to highlight
differences in perspective and how people may find this exclusionary.

Suppose someone in the community (we will call this Person A) adds an email
signature which says:

"Marriage is an institution for the benefit of the spouses, not for the
purposes of binding parents to their children." -- Ted Olsen arguing for
same-sex marraige.

Suppose person B takes offense, and changes the email signature to read:

"
*If mutual consent makes a sexual act moral, whether within marriage or
without, and, by parity of reasoning, even between members of the same sex,
the whole basis of sexual morality is gone and nothing but misery and
defect awaits the youth of the country..." -- Mohandas Gandhi*

Person A appeals to the core community saying that person B's signature is
hostile to gays and lesbians (and it is).  Person B responds that person
A's signature is deeply culturally insensitive and undermines any hope of
cultural diversity on the list (and it does).  Person A points out that
they consider India a horrible abuser of gay rights, and person B points
out that perso

Re: [GENERAL] 9.5 new features

2016-01-23 Thread Vik Fearing
On 01/23/2016 04:42 AM, John R Pierce wrote:
> On 1/22/2016 7:13 PM, David Rowley wrote:
>> BRIN can be seen as a form of "automatic partitioning", and I have
>> seen it described as such in documents relating to the BRIN project,
>> so perhaps that description has made its way further afield and that's
>> maybe what your coworker heard about.
>>
>> If you view the inheritance partitioning feature as a method of
>> eliminating scans of partitions which can be proved unneeded at
>> planning time, then BRIN can eliminate blocks from a scan of a single
>> relation (or rather "pages_per_range") during execution time. So I
>> agree with the "automatic partitioning" description.
> 
> ok, but it doesn't deal with our use case of needing to bulk delete a 6

I can't really parse the end of that sentence, but you are correct that
BRIN does not help at all with partition dropping.  Think of it more as
a Seq Scan optimization.
-- 
Vik Fearing  +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support


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