Re: A little RULE help?

2018-01-26 Thread Vik Fearing
On 01/26/2018 04:19 PM, Steven Winfield wrote: > Back to my original attempt at writing an UPDATE rule… > > CREATE RULE rule_test_update AS ON UPDATE TO rule_test_view DO INSTEAD ( > >     UPDATE rule_test SET tt = tstzrange(lower(tt), > CURRENT_TIMESTAMP, '[)') WHERE id = OLD.id; > >   

RE: Using Token (JWT) authentication mechanism in Postgres

2018-01-26 Thread Julio Cesar Tenganan Daza
Hi Alexander, I think we can use PAM authentication with something similar as you did is a good mechanism. And also I have an additional question, can the implemented PAM authentication module be used from JDBC connections? Or they works totally apart? Thank you so much! Regards, Cesar Fr

PostgreSQL Restore Database Without Backup and Log

2018-01-26 Thread fabio.silva
Hi! I had a Ransomware atack and I lost a lot of file from my server. I just have the OID folder and the files inside it. Is it possible restore database using only this data files? I don't have the folder data, I don't have the folder global, I just have Datafiles from my old database. I'm using

Re: Information on savepoint requirement within transctions

2018-01-26 Thread David G. Johnston
On Fri, Jan 26, 2018 at 9:47 AM, Melvin Davidson wrote: > > ...the presence of a version is bad, only the badgering of people asking > questions to provide it when it has no bearing on the answer... > > Really? Is it that hard for someone to provide version and O/S? > ​Its difficult to remember

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Melvin Davidson
> ...the presence of a version is bad, only the badgering of people asking questions to provide it when it has no bearing on the answer... Really? Is it that hard for someone to provide version and O/S? >The timestamp on the email is likely more than sufficient Do you really think op's look for t

Re: Information on savepoint requirement within transctions

2018-01-26 Thread David G. Johnston
On Fri, Jan 26, 2018 at 9:27 AM, Melvin Davidson wrote: > > > >> As far as I'm aware neither PostgreSQL nor OS version do matter for this > > > Yes as of this date. However, that is not to say that the SQL standard (or > PostgreSQL) may change > in the _future_, such that there "may" be a "ROLLBA

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Melvin Davidson
> > As far as I'm aware neither PostgreSQL nor OS version do matter for this Yes as of this date. However, that is not to say that the SQL standard (or PostgreSQL) may change in the _future_, such that there "may" be a "ROLLBACK TO SAVEPOINT OR CONTINUE" after a failure, in which case, someone e

Re: Information on savepoint requirement within transctions

2018-01-26 Thread David G. Johnston
On Fri, Jan 26, 2018 at 8:57 AM, Robert Zenz wrote: > In PostgreSQL the use of savepoints is > required: > > start transaction > insert into A > create savepoint > insert into B but fail > rollback to savepoint > insert into C > commit > > Otherwise the transaction is,

Re: Information on savepoint requirement within transctions

2018-01-26 Thread David G. Johnston
On Fri, Jan 26, 2018 at 8:42 AM, Melvin Davidson wrote: > > On Fri, Jan 26, 2018 at 10:32 AM, Robert Zenz > wrote: > ​The convention for these lists is to inline or bottom-post. Top-posting is discouraged. ​ > Well, no. What I'm looking for is information on how the transactions >> behave in

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Robert Zenz
What I'm looking for is more information/documentation on that topic that I can use as source and link back to (from a blog post). That last paragraph in your first link is exactly what I meant. Let's start to clarify things, put into pseudo code: start transaction insert into A inser

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Melvin Davidson
On Fri, Jan 26, 2018 at 10:32 AM, Robert Zenz wrote: > Well, no. What I'm looking for is information on how the transactions > behave in > an error case, and why there is the requirement to have a savepoint in > place to > be able to continue a transaction after a failed statement. > > As far as

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Robert Zenz
Well, no. What I'm looking for is information on how the transactions behave in an error case, and why there is the requirement to have a savepoint in place to be able to continue a transaction after a failed statement. As far as I'm aware neither PostgreSQL nor OS version do matter for this, I'm

Re: Using Token (JWT) authentication mechanism in Postgres

2018-01-26 Thread Alexander Kukushkin
Hi, > > And also I have an additional question, can the implemented PAM > authentication module be used from JDBC connections? Or they works totally > apart? > I think it should work from JDBC without any additional effort. And basically pam module itself doesn't even know that it is used from p

RE: A little RULE help?

2018-01-26 Thread Steven Winfield
On 01/25/2018 03:14 PM, Steven Winfield wrote: > > https://www.postgresql.org/docs/10/static/rules-triggers.html > > “For the things that can be implemented by both, which is best depends > on the usage of the database. A trigger is fir

Re: Information on savepoint requirement within transctions

2018-01-26 Thread Melvin Davidson
On Fri, Jan 26, 2018 at 9:47 AM, Robert Zenz wrote: > I'm currently doing a small writeup of a bug fix in our framework which > involves > savepoints in PostgreSQL (JDBC). However, I have a hard time locating the > documentation regarding this. I mean, from what I can extract from various > sourc

Information on savepoint requirement within transctions

2018-01-26 Thread Robert Zenz
I'm currently doing a small writeup of a bug fix in our framework which involves savepoints in PostgreSQL (JDBC). However, I have a hard time locating the documentation regarding this. I mean, from what I can extract from various sources, PostgreSQL requires to use savepoints if one wants to contin

Re: AFTER UPDATE trigger updating other records

2018-01-26 Thread Ian Harding
On Thu, Jan 25, 2018 at 2:33 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Jan 25, 2018 at 3:06 PM, Ian Harding > wrote: > >> >> 4 |3 | Top.Bar.Blah >> 5 |4 | Top.Bar.Blah.Scooby >> ​​ >> > > >> barf$# UPDATE area SET areapath = (sele

Re: Deferrable constraint trigger

2018-01-26 Thread Laurenz Albe
Maciej Kołuda wrote: > I am trying to write constraint trigger to assure that at any given point of > time I have an exactly one record "active" based on the time. > To give you some background I would like to have an exactly one box per owner > active in which items will be added. > > And trigg

Re: FW: Setting up streaming replication problems

2018-01-26 Thread Thiemo Kellner
Do you mind me bumping the issue? Zitat von "Thiemo Kellner, NHC Barhufpflege" : Andreas, thanks for your reply. I try to set up synchronous streaming replication as try-out. I use my laptop with Debian 9 and PostgreSQL package 10+189.pgdg90+1. And of this PostgreSQL installation I have tw