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

2015-07-11 Thread James Cloos
> "VK" == Vick Khera writes: VK> openssl s_client -connect HOST:PORT -CAfile /path/to/CA.pem See: http://debian-administration.org/users/dkg/weblog/103 Also, check out: https://github.com/nabla-c0d3/sslyze You'll need to add support for pg's protocol, but it should be straight forwar

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

2015-07-11 Thread James Cloos
> "FR" == Francisco Reyes writes: FR> I bought a SSL cert and installed it, but the program is still having FR> the issue. Did you include the intermediate cert(s) in the bundle which the server presents to the client? And did you confirm that the client trusts the issuer's root? Some requ

[GENERAL] Confirming - materialized views cannot have foreign key constraints.

2015-07-11 Thread David G. Johnston
Working with 9.3 at the moment and I don't see any syntax that would let me create one... Thanks David J.

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Dane Foster
Hi Michael, You nailed it. I am reading the documentation cover to cover. I started chapter 9 two weeks ago but haven't found the time to read beyond 9.1 yet. But for day to day usage on the MySQL to PostgreSQL migration project that I'm working on I jump around in the docs as needed to find speci

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Michael Nolan
On Sat, Jul 11, 2015 at 4:53 PM, Vincent Veyron wrote: > On Sat, 11 Jul 2015 16:55:44 -0400 > Dane Foster wrote: > . After a while, you'll find your way around the documentation. > > I've been doing it almost every day for years, still learning every time. > I highly recommend reading the d

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Vincent Veyron
On Sat, 11 Jul 2015 16:55:44 -0400 Dane Foster wrote: > Thank you for the additional reference links but my concern was less about > how to find out what a function (formerly magic constant) that I > encountered in the wild did but more about having a list that would educate > newcomers/me about

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Adrian Klaver
On 07/11/2015 01:55 PM, Dane Foster wrote: Hello Adrian, Thank you for the additional reference links but my concern was less about how to find out what a function (formerly magic constant) that I encountered in the wild did but more about having a list that would educate newcomers/me about what

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Charles Clavadetscher
Hi Dane There is a list of reserved keywords, including the ones that you mentioned. http://www.postgresql.org/docs/9.5/static/sql-keywords-appendix.html However you still need to search for their meaning. Mayb

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Dane Foster
Hello Adrian, Thank you for the additional reference links but my concern was less about how to find out what a function (formerly magic constant) that I encountered in the wild did but more about having a list that would educate newcomers/me about what is automatically available for use. For exam

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Adrian Klaver
On 07/11/2015 12:21 PM, Raymond O'Donnell wrote: On 11/07/2015 20:07, Dane Foster wrote: As a recent convert to the Church of Postgres I've been consuming vast Welcome to the One True Faith! :-) amounts of information on PostgreSQL, and SESSION_USER is not the first nor only, what I'm cal

Re: [GENERAL] A table of magic constants

2015-07-11 Thread Raymond O'Donnell
On 11/07/2015 20:07, Dane Foster wrote: > As a recent convert to the Church of Postgres I've been consuming vast Welcome to the One True Faith! :-) > amounts of information on PostgreSQL, and SESSION_USER is not the first > nor only, what I'm calling magic constant, that I've seen. Off the top

[GENERAL] A table of magic constants

2015-07-11 Thread Dane Foster
Hello, My reason/excuse for asking what I'll eventually ask is that I'm a new PostgreSQL practitioner so the amount of things I don't know about PostgreSQL is depressingly large. While reading through the recent "Row level security - notes and questions" thread I saw this SQL statement: CREATE P

Re: [GENERAL] timestamp check

2015-07-11 Thread Adrian Klaver
On 07/10/2015 05:54 AM, Ramesh T wrote: select current_timestamp-to_timestamp(to_char(current_date,'-MM-DD HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM pg_catalog.pg_timezone_names WHERE name='US/Eastern'),'-MM-DD HH24'||':'||'MI'||':'||'SS')::timestamptz; it's not displa

Re: [GENERAL] xmltable in postgres like in oracle..?

2015-07-11 Thread Adrian Klaver
On 07/11/2015 08:32 AM, Ramesh T wrote: Hi, is xmltable available in postgres..?,if not please give me a advice to replace the xmtable in postgres..? What is xmltable? Go to: http://www.postgresql.org/docs/9.4/interactive/index.html and in the Search field type xml -- Adrian Klaver

Re: [GENERAL] timestamp check

2015-07-11 Thread Raymond O'Donnell
On 10/07/2015 13:54, Ramesh T wrote: > > select current_timestamp-to_timestamp(to_char(current_date,'-MM-DD > HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM > pg_catalog.pg_timezone_names > WHERE name='US/Eastern'),'-MM-DD > HH24'||':'||'MI'||':'||'SS')::timestamptz; > > it

Re: [GENERAL] timestamp check

2015-07-11 Thread Adrian Klaver
On 07/10/2015 05:54 AM, Ramesh T wrote: select current_timestamp-to_timestamp(to_char(current_date,'-MM-DD HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM pg_catalog.pg_timezone_names WHERE name='US/Eastern'),'-MM-DD HH24'||':'||'MI'||':'||'SS')::timestamptz; it's not displa

Re: [GENERAL] xmltable in postgres like in oracle..?

2015-07-11 Thread Chris Mair
> Hi, > is xmltable available in postgres..?,if not please give me a > advice to replace the xmtable in postgres..? Hi, PostgreSQL has a native XML type and related functions: http://www.postgresql.org/docs/9.4/static/datatype-xml.html http://www.postgresql.org/docs/9.4/static/functions-xm

Re: [GENERAL] timestamp check

2015-07-11 Thread David G. Johnston
On Fri, Jul 10, 2015 at 8:54 AM, Ramesh T wrote: > > select current_timestamp-to_timestamp(to_char(current_date,'-MM-DD > HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM > pg_catalog.pg_timezone_names > WHERE name='US/Eastern'),'-MM-DD > HH24'||':'||'MI'||':'||'SS')::timestamp

[GENERAL] xmltable in postgres like in oracle..?

2015-07-11 Thread Ramesh T
Hi, is xmltable available in postgres..?,if not please give me a advice to replace the xmtable in postgres..?

[GENERAL] timestamp check

2015-07-11 Thread Ramesh T
select current_timestamp-to_timestamp(to_char(current_date,'-MM-DD HH24'||':'||'MI'||':'||'SS')||' '||(SELECT utc_offset FROM pg_catalog.pg_timezone_names WHERE name='US/Eastern'),'-MM-DD HH24'||':'||'MI'||':'||'SS')::timestamptz; it's not displaying timezone..any help..?

Re: [GENERAL] Row level security - notes and questions

2015-07-11 Thread Charles Clavadetscher
Hi Stephen, hi Adrian Thank you a lot! My huge mistake in understanding how policies work was to assume that within a single policy FOR ALL the USING clause would be used *only* for SELECT while WITH CHECK would be used by the modifying commands. Now it is clear why it did not work as I wanted. I

Re: [GENERAL] Row level security - notes and questions

2015-07-11 Thread Adrian Klaver
On 07/10/2015 10:28 PM, Charles Clavadetscher wrote: 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 u

Re: [GENERAL] Row level security - notes and questions

2015-07-11 Thread Stephen Frost
Charles, * Charles Clavadetscher (clavadetsc...@swisspug.org) wrote: > I have been testing the new row level security feature of 9.5 and I have > some notes and questions on it. Great! Glad to hear it. > My first test is to enable row level security on the table without a policy > in place. Acc

Re: [GENERAL] Bounded Zone Offset Query

2015-07-11 Thread Francisco Olarte
Hi Robert: On Fri, Jul 10, 2015 at 6:55 PM, Robert DiFalco wrote: >>> I want to do a query from an application that returns all devices who's >>> time is between 10am or 10pm for a given instant in time. . > Thanks John, let me revise my original query to give a CORRECT and working > example,