[GENERAL] Row level security - notes and questions

2015-07-10 Thread Charles Clavadetscher
Hello I have been testing the new row level security feature of 9.5 and I have some notes and questions on it. This is a simple table for the test, with 2 rows and a user named john, who is granted access to the table through a group named users. CREATE TABLE testrls.accounts ( id integer,

[GENERAL] Disconnected but query still running

2015-07-10 Thread Eduardo Piombino
Hi, list. I've been running a query from pgAdmin for a couple of hours, just to realize that the pgAdmin timer that counts ellapsed time had stopped, but the status bar still said "executing". So I first thought it could've been some kind of bug with the counter. However, after some more time, I fo

Re: [GENERAL] How to test SSL cert from CA?

2015-07-10 Thread Jeff Janes
On Thu, Jul 9, 2015 at 9:29 PM, Francisco Reyes wrote: > On 07/09/2015 03:07 PM, Vick Khera wrote: > >> >> On Wed, Jul 8, 2015 at 10:17 PM, Francisco Reyes > > wrote: >> >> openssl s_client -connect HOST:PORT -CAfile /path/to/CA.pem >> > > According to this post: > http:

Re: [GENERAL] regexp_matches for digit

2015-07-10 Thread Ramesh T
nice i'm looking for this,i thought digit don't work in postgres.. thanks On Thu, Jul 9, 2015 at 10:21 PM, Chris Mair wrote: > > Hi, > > in oracle regexp_like(entered > > date,'[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}','i') > > > > for postgres i have regexp_matches ,But i need how

Re: [GENERAL] Bounded Zone Offset Query

2015-07-10 Thread Robert DiFalco
On Fri, Jul 10, 2015 at 9:40 AM, John McKown wrote: > On Fri, Jul 10, 2015 at 11:15 AM, Robert DiFalco > wrote: > >> I have a table something like this: >> >> CREATE TABLE devices ( >> owner_idBIGINT NOT NULL, >> utc_offset_secs INT, >> PRIMARY KEY (uid, platform), >> FOREIGN KEY

Re: [GENERAL] Bounded Zone Offset Query

2015-07-10 Thread John McKown
On Fri, Jul 10, 2015 at 11:15 AM, Robert DiFalco wrote: > I have a table something like this: > > CREATE TABLE devices ( > owner_idBIGINT NOT NULL, > utc_offset_secs INT, > PRIMARY KEY (uid, platform), > FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE CASCADE > ); > > > I wa

[GENERAL] Bounded Zone Offset Query

2015-07-10 Thread Robert DiFalco
I have a table something like this: CREATE TABLE devices ( owner_idBIGINT NOT NULL, utc_offset_secs INT, PRIMARY KEY (uid, platform), FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE CASCADE ); I want to do a query from an application that returns all devices who's time is b

Re: [GENERAL] Dynamic multi dimensional arrays in SQL

2015-07-10 Thread Pavel Stehule
Hi I am afraid, so this functionality is supported only in unreleased PostgreSQL 9.5 postgres=# SELECT ARRAY(SELECT ARRAY[true::text,false::text] FROM generate_series(1,2)); ┌─┐ │array│ ╞═╡ │ {{true,false},{true,false

[GENERAL] Dynamic multi dimensional arrays in SQL

2015-07-10 Thread Dane Foster
Hello, I'm trying to dynamically construct a multi dimensional array where the outer most array's elements are binary arrays. My initial attempt was something to the effect of: SELECT ARRAY(SELECT ARRAY[true::text,false::text] FROM generate_series(1,2)); My expectation is a result of the form: {{

Re: [GENERAL] How to test SSL cert from CA?

2015-07-10 Thread Tom Lane
Francisco Reyes writes: > On 07/09/2015 03:07 PM, Vick Khera wrote: >> openssl s_client -connect HOST:PORT -CAfile /path/to/CA.pem > According to this post: > http://serverfault.com/questions/79876/connecting-to-postgresql-with-ssl-using-openssl-s-client?rq=1 > one can not use openssl to test ss