Re: Information on savepoint requirement within transctions

2018-02-01 Thread Robert Zenz
On 31.01.2018 19:58, David G. Johnston wrote: > ​Now that I've skimmed the tutorial again I think pointing the reader of > the SQL Commands there to learn how it works in practice is better than > trying to explain it in BEGIN and/or SAVEPOINT. That seems like a good idea, yeah. > I decided to ad

Master-Slave error: the database system is starting up

2018-02-01 Thread Сергей Злобин
Hello, I was advised to write a letter to you Windows Server 2012 Postgres 9.6 I made a replication with the master server. On the slave server service postgres is running, but in log files slave's server "FATAL: the database system is starting up" message will continue. when I try from the com

Re: Master-Slave error: the database system is starting up

2018-02-01 Thread Andreas Kretschmer
Am 01.02.2018 um 15:43 schrieb Сергей Злобин: Hello, I was advised to write a letter to you Windows Server 2012 Postgres 9.6 I made a replication with the master server. On the slave server service postgres is running, but in log files slave's server "FATAL:  the database system is starting u

Re: PG Sharding

2018-02-01 Thread Dan Wierenga
On Wed, Jan 31, 2018 at 7:48 PM, Steven Lembark wrote: > On Mon, 29 Jan 2018 15:34:18 +0100 > Matej wrote: > > > Hi Everyone. > > > > We are looking at a rather large fin-tech installation. But as > > scalability requirements are high we look at sharding of-course. > > > > I have looked at many

What is your psql tip?

2018-02-01 Thread Joshua D. Drake
Folks, So today I was digging into the backend of PostgresConf.Org which runs on a highly modified version of OSEM (which is an awesome conference platform). I was very quickly losing my mind because the content in the public schema did not match what I was seeing on the website. I checked co

Searching Postgresql Database with psycopg2

2018-02-01 Thread brandon wallace
I have created a function to search a Postgresql database but it only pulls up the first row of the database no matter what value I search for. Why would it only pull up the first row of the database? I am using Psycopg2 2.6 and Python 3.5. All my other functions to update, add, delete, view all r

Re: Searching Postgresql Database with psycopg2

2018-02-01 Thread Rob Sargent
> On Feb 1, 2018, at 1:50 PM, brandon wallace wrote: > > I have created a function to search a Postgresql database but it only pulls > up the first row of the database no matter what value I search for. Why would > it only pull up the first row of the database? I am using Psycopg2 2.6 and > Py

Re: Searching Postgresql Database with psycopg2

2018-02-01 Thread David Kohn
Because you're only getting the first row of the query result, even though the cursor that contains the result (should be server side in this case) does have more rows. On Thu, Feb 1, 2018 at 3:50 PM brandon wallace wrote: > I have created a function to search a Postgresql database but it only >

Rolls

2018-02-01 Thread Andrew Bartley
Hi all, I am trying to work out a way to create a roll/user that can only execute one particular function and nothing else. The particular function has been created with "SECURITY DEFINER". Regards Andrew Bartley

Re: Rolls

2018-02-01 Thread Rob Sargent
On 02/01/2018 02:22 PM, Andrew Bartley wrote: Hi all, I am trying to work out a way to create a roll/user that can only execute one particular function and nothing else. The particular function has been created with "SECURITY DEFINER". Regards Andrew Bartley And I thought you we offeri

Re: Rolls

2018-02-01 Thread Andrew Bartley
Sorry Roles On Fri, 2 Feb 2018 at 08:29 Rob Sargent wrote: > > > On 02/01/2018 02:22 PM, Andrew Bartley wrote: > > Hi all, > > > > I am trying to work out a way to create a roll/user that can only > > execute one particular function and nothing else. The particular > > function has been cre

Re: Rolls

2018-02-01 Thread David G. Johnston
On Thursday, February 1, 2018, Andrew Bartley wrote: > Hi all, > > I am trying to work out a way to create a roll/user that can only execute > one particular function and nothing else. The particular function has been > created with "SECURITY DEFINER". > Never tried it but "REVOKE PUBLIC FROM r

Re: Recreating functions after starting the database server.

2018-02-01 Thread raf
Konrad Witaszczyk wrote: > Hi, > > I'm considering changing my database schema upgrade routines to recreate > functions and all objects depending on them (e.g. triggers, views) just after > the database server is started. It would make the routines much simpler since > they wouldn't have to depen

Re: Issue with WAL logs temporary not replaying

2018-02-01 Thread Tomas Vondra
On 02/01/2018 08:17 AM, Eugene Pirogov wrote: > Tomas, > > Indeed, I haven't put enough detail in the original post. That is a fair > point, thank you. Let me follow up on each of your comments. > > unfortunately your message is missing some pretty important > information, like for exam

Re: pgaudit?

2018-02-01 Thread Devrim Gündüz
Hi, On Fri, 2018-01-19 at 12:53 -0800, Adrian Klaver wrote: > I cannot find it either, so I have to believe this is an oversight. You > might want to contact the Yum team directly: > > https://yum.postgresql.org/contact.php Just to follow this up: I pushed pgaudit12_10 (pgaudit 1.2 for Postgre

Re: pgaudit?

2018-02-01 Thread Simon Riggs
On 1 February 2018 at 23:46, Devrim Gündüz wrote: > > Hi, > > On Fri, 2018-01-19 at 12:53 -0800, Adrian Klaver wrote: >> I cannot find it either, so I have to believe this is an oversight. You >> might want to contact the Yum team directly: >> >> https://yum.postgresql.org/contact.php > > Just to

Create schema with in a specific database from a script file

2018-02-01 Thread Abhra Kar
Hi, I have to write script for psql in a xyz.sh file which should create a schema in a specific data.In psql prompt I achieve it like -- postgres=# \c ABC ABC=# create schema authorization myschema In xyz.sh I executed the following script --- *su -c "psql -c \"\c ABC \"" postgres*

Re: Create schema with in a specific database from a script file

2018-02-01 Thread Melvin Davidson
On Thu, Feb 1, 2018 at 9:09 PM, Abhra Kar wrote: > Hi, > >I have to write script for psql in a xyz.sh file which should create a > schema in a specific data.In psql prompt I achieve it like -- > > > postgres=# \c ABC > > ABC=# create schema authorization myschema > > > > In xyz.sh I exec

Re: Create schema with in a specific database from a script file

2018-02-01 Thread Abhra Kar
*sudo **-u** postgres createdb ABC* *su **-c* *"**psql -d ABC**"* *if [* *$3* *==* *'x'* *]* *then* *su **-c* *"**psql -c **\"**grant all privileges on database ABC** to * *\"**"** postgres* *su **-c* *"**psql -c **\"**create schema authorization **\"**"** postgres* *else* *su **

Re: Create schema with in a specific database from a script file

2018-02-01 Thread Melvin Davidson
On Thu, Feb 1, 2018 at 9:42 PM, Abhra Kar wrote: > *sudo **-u** postgres createdb ABC* > > *su **-c* *"**psql -d ABC**"* > > *if [* *$3* *==* *'x'* *]* > > *then* > > *su **-c* *"**psql -c **\"**grant all privileges on database ABC** to > **\"**"** postgres* > > *su **-c* *"**psql -c **\"

Create schema with in a specific database from a script file

2018-02-01 Thread David G. Johnston
On Thursday, February 1, 2018, Abhra Kar wrote: > > In xyz.sh I executed the following script --- > > *su -c "psql -c \"\c ABC \"" postgres* > > *su -c "psql -c \"create schema authorization myschema\"" postgres* > > > > In the terminal got message “connected to ABC database”. But schema > c