Re: [GENERAL] Script to check replication

2016-03-09 Thread Jehan-Guillaume de Rorthais
Le Fri, 4 Mar 2016 19:35:16 +, Ashish Chauhan a écrit : > Hi, > > We are running Streaming replication with Hot standby in our current > production. I do have below script to check replication status and > replication lag. Does anyone have script which runs every 15 mins to check > replicati

Re: [GENERAL] script not working in php

2011-10-06 Thread Robert Buckley
Thankssimple but important! Von: Rodrigo Gonzalez An: Robert Buckley Cc: "pgsql-general@postgresql.org" Gesendet: 14:39 Donnerstag, 6.Oktober 2011 Betreff: Re: [GENERAL] script not working in php On 10/06/2011 09:22 AM, Robert Buckley

Re: [GENERAL] script not working in php

2011-10-06 Thread Rodrigo Gonzalez
On 10/06/2011 09:22 AM, Robert Buckley wrote: Hi, this works ok in pgadmin3 select name[i], kw[i] from ( select generate_series(1,6) as i, array['Biomasse', 'Deponiegas', 'Solar', 'Wasser', 'Wind','GESAMT'] as name, array[biomasse_kw, deponiegas_kw, solar_kw,wasser_

Re: [GENERAL] script not working in php

2011-10-06 Thread Raymond O'Donnell
On 06/10/2011 13:22, Robert Buckley wrote: > Hi, > > this works ok in pgadmin3 > > select name[i], kw[i] > from ( select generate_series(1,6) as i, > array['Biomasse', 'Deponiegas', 'Solar', 'Wasser', > 'Wind','GESAMT'] as name, > array[biomasse_kw, deponiegas_kw, so

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Adrian Klaver
On 03/04/2011 07:48 AM, Thufir Hawat wrote: I cannot get the script here: https://docs.google.com/leaf?id=0B5hKxkS1VyAxOGMzZjY4ZjktZjZkOS00Zjc3LWExYmEtYTU3ZThjYzZiMjk3&hl=en to run correctly. Looking at the output, many, many, errors, it seems to assume tables exist which don't. Is that correc

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Adrian Klaver
On 03/04/2011 07:48 AM, Thufir Hawat wrote: I cannot get the script here: https://docs.google.com/leaf?id=0B5hKxkS1VyAxOGMzZjY4ZjktZjZkOS00Zjc3LWExYmEtYTU3ZThjYzZiMjk3&hl=en to run correctly. Looking at the output, many, many, errors, it seems to assume tables exist which don't. Is that correc

Re: [GENERAL] script errors or PEBKAC?

2011-03-04 Thread Michael Black
I would check the order in which things are being created in your process. What I usually do is create all the tables sans indexing or constraints (except primary key). Once the table are done, load the data in to the tables that need to be populated. Then constraints, triggers and then index

Re: [GENERAL] Script to export all privileges to csv or similar

2008-08-22 Thread Terry Lee Tucker
On Friday 22 August 2008 05:15, Anton Melser wrote: > Hi, > Does anyone know of a script/tool that allows one to export all users > with all privileges? I realise I could construct a query to do it but > google turned up nothing and if someone else has done the good work... > Cheers > Anton > > --

Re: [GENERAL] Script errors on run

2008-06-04 Thread Ralph Smith
I've tried SO MANY variations of w/ and w/o the apostrophes, but apparently not just the right one. As you knew and I doubted, it NOW WORKS! Whew! You can bet that I'm keeping this snippet of code handy. Thank you very much, Ralph == On Jun 4, 2008, at 4:34 PM,

Re: [GENERAL] Script errors on run

2008-06-04 Thread Stephan Szabo
On Wed, 4 Jun 2008, Ralph Smith wrote: >-- == >good_date := to_date(year||'-'||month||'-'||day , '-MM-DD') ; > >RAISE INFO 'good_date = %', good_date ; > >UsecsD := EXTRACT(EPOCH FROM DATE 'good_date') ; You want something like: UsecsD

Re: [GENERAL] Script errors on run

2008-06-04 Thread Ralph Smith
like programming javascript. The code is right but the interpreter doesn't think so.) Thanks all, Ralph == On Jun 4, 2008, at 4:18 PM, GW wrote: -Original Message- From: [EMAIL PROTECTED] on behalf of Ralph Smith Sent: Wed 6/4/2008 4:04 PM To: pgs

Re: [GENERAL] Script errors on run

2008-06-04 Thread Gregory Williamson
: [EMAIL PROTECTED] on behalf of Ralph Smith Sent: Wed 6/4/2008 4:04 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Script errors on run Same problem, see below On Jun 4, 2008, at 3:30 PM, Stephan Szabo wrote: > On Wed, 4 Jun 2008, Ralph Smith wr

Re: [GENERAL] Script errors on run

2008-06-04 Thread Ralph Smith
Same problem, see below On Jun 4, 2008, at 3:30 PM, Stephan Szabo wrote: On Wed, 4 Jun 2008, Ralph Smith wrote: date_string := to_date(year||'-'||month||'-'||day , '-MM-DD') ; RAISE INFO 'date_string = %', date_string ; good_date := to_timestamp(date

Re: [GENERAL] Script errors on run

2008-06-04 Thread Stephan Szabo
On Wed, 4 Jun 2008, Ralph Smith wrote: >date_string := to_date(year||'-'||month||'-'||day , '-MM-DD') ; >RAISE INFO 'date_string = %', date_string ; >good_date := to_timestamp(date_string, '-MM-DD') ; >RAISE INFO 'good_date = %', good_date ; This seems like alot of extra

Re: [GENERAL] Script errors on run

2008-06-04 Thread Ralph Smith
On Jun 4, 2008, at 2:56 PM, Stephan Szabo wrote: On Wed, 4 Jun 2008, Ralph Smith wrote: -- == good_date := to_date(year||'-'||month||'-'||day , '-MM-DD') ; RAISE NOTICE 'good_date = %',good_date ; Usecs := EXTRACT(EPOCH FROM TIMESTAMP good

Re: [GENERAL] Script errors on run

2008-06-04 Thread Stephan Szabo
On Wed, 4 Jun 2008, Ralph Smith wrote: >-- == >good_date := to_date(year||'-'||month||'-'||day , '-MM-DD') ; >RAISE NOTICE 'good_date = %',good_date ; >Usecs := EXTRACT(EPOCH FROM TIMESTAMP good_date) ; > END ; > > QUERY: SELECT EXTR

Re: [GENERAL] Script to reset all sequence values in the a given DB?

2007-12-10 Thread Vivek Khera
please don't hijack old threads ("partitioned table query question" in this case) and change the subject line to start your new question. it messes up threaded mail readers. thanks. On Dec 10, 2007, at 3:00 PM, Nathan Wilhelmi wrote: Hello - Does anyone happen to have a SQL script or funct

Re: [GENERAL] Script to reset all sequence values in the a given DB?

2007-12-10 Thread Obe, Regina
TECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pavel Stehule Sent: Monday, December 10, 2007 4:33 PM To: Nathan Wilhelmi Cc: PGSQL Mailing List Subject: Re: [GENERAL] Script to reset all sequence values in the a given DB? On 10/12/2007, Nathan Wilhelmi <[EMAIL PROTECTED]> wrote: > Hello

Re: [GENERAL] Script to reset all sequence values in the a given DB?

2007-12-10 Thread Pavel Stehule
On 10/12/2007, Nathan Wilhelmi <[EMAIL PROTECTED]> wrote: > Hello - Does anyone happen to have a SQL script or function that can > reset all the sequence values found in a given DB? When we rebuild the > DB it would be handy to be able to set all the sequence back to a known > starting place. > cr

Re: [GENERAL] script for taking incremental backup in postgres in LINUX

2007-05-04 Thread Ray Stell
On Thu, May 03, 2007 at 02:12:12AM -0700, pumesh wrote: > may lost. So what should i do to make the backup continuously or during > these intervals. http://www.postgresql.org/docs/8.2/interactive/continuous-archiving.html ---(end of broadcast)--- TI

Re: [GENERAL] Script for reading flat file without delimiters

2006-06-29 Thread Tino Wildenhain
Mehdi Aboulkassim schrieb: If I had to write it in java, I wouldn't mail this issue. I somewhat a Neophyte in Postrgres that's why I need your help. I've searched in the netbut I haven't found a script in Plpgsql that can read a file. Can you tell me if we can do this in Plpgsql? No you c

Re: [GENERAL] Script for reading flat file without delimiters

2006-06-29 Thread Michael Fuhr
On Thu, Jun 29, 2006 at 03:10:03PM +0200, Mehdi Aboulkassim wrote: > I have to write a function that takes a flat file name in parameter > and load a table with the file information. Does it matter if this function runs on the server side or in the client? > I think that it has to read the fi

Re: [GENERAL] Script for reading flat file without delimiters

2006-06-29 Thread Tino Wildenhain
Mehdi Aboulkassim schrieb: Hy everybody, I have to write a function that takes a flat file name in parameter and load a table with the file information. Which programming languages do you plan to use? I think that it has to read the file line per line and parse each one to retreive each co

Re: [GENERAL] script

2005-11-10 Thread Nicolay A Vasiliev
Hello! How do you get the list of id's? If you get it while some calculating you may get the list of them (1, 3, 6,...) and then produce the query select * from tablename where id in (your_list) Hope this helps, Nicolay Maik Trömel wrote: Hello! I want to run a shell script with variables

Re: [GENERAL] script

2005-11-10 Thread A. Kretschmer
am 10.11.2005, um 10:10:22 +0100 mailte Maik Trömel folgendes: > Hello! > > I want to run a shell script with variables under Postgresql. > > An example: > I want to make the following query; > > select * from tablename where id=1; > select * from tablename where id=2; > select * from tab

Re: [GENERAL] script variables

2005-03-15 Thread Richard Huxton
Paul Cunningham wrote: I use a bash script (similar to following example) to update tables. psql -v passed_in_var=\'some_value\' -f script_name Is it possible to pass a value back from psql to the bash script? You can pass the textual output of psql back with backticks: echo `psql ...` --

Re: [GENERAL] Script Location

2000-11-15 Thread Lamar Owen
Paul M Foster wrote: > > When I dump a database (creating a script from the pg_dump command), I > can't just put it in any old directory and point psql at it. I have to > put it in the /var/lib/pgsql subdirs before postgresql will accept it. > Is this right? Am I doing something wrong? Is this a

Re: [GENERAL] Script Location

2000-11-15 Thread GH
On Thu, Nov 16, 2000 at 12:22:34AM -0500, some SMTP stream spewed forth: > When I dump a database (creating a script from the pg_dump command), I > can't just put it in any old directory and point psql at it. I have to > put it in the /var/lib/pgsql subdirs before postgresql will accept it. > Is