Re: [GENERAL] Need help on compiling postgres source code from cloned repo

2017-07-02 Thread rajan
Thanks, Adrian. Able to install 10beta1 successfully. - -- Thanks, Rajan. -- View this message in context: http://www.postgresql-archive.org/Need-help-on-compiling-postgres-source-code-from-cloned-repo-tp5969667p5969696.html Sent from the PostgreSQL - general mailing list archive at Nabble.

Re: [GENERAL] Need help on compiling postgres source code from cloned repo

2017-07-02 Thread Adrian Klaver
On 07/01/2017 11:31 PM, rajan wrote: Hi, I have a cloned repository of postgres and I want to compile the source for *REL_10_BETA1* alone. Or just go here and grab the tarball: https://www.postgresql.org/ftp/source/v10beta1/ Following are the steps I am planning to do, -> git checkout -b r

[GENERAL] Need help on compiling postgres source code from cloned repo

2017-07-01 Thread rajan
Hi, I have a cloned repository of postgres and I want to compile the source for *REL_10_BETA1* alone. Following are the steps I am planning to do, -> git checkout -b rel10beta1 REL_10_BETA1 (and verifying current branch is newly created one) -> Execute ./configure --prefix=/opt/PostgreSQL/10beta

Re: [GENERAL] Need help on postgres related to insertion of a tuple.

2015-07-16 Thread Adrian Klaver
On 07/16/2015 01:18 AM, M Tarkeshwar Rao wrote: Hi all, We have a table name auditTrailLogEntry where we were not able to able to insert in auditTrailLogEntry table. we have reindex the table and insertion issue has been resolved . we executed following command: *_Audit tail insertion issue.

Re: [GENERAL] Need help on postgres related to insertion of a tuple.

2015-07-16 Thread Michael Paquier
On Thu, Jul 16, 2015 at 5:18 PM, M Tarkeshwar Rao wrote: > a. How can we prevent "This has been seen to occur with buggy kernels; > consider updating your system" alarm ? > b. how can resolve "This has been seen to occur with buggy kernels; consider > updating your system" alarm ? This defense ha

[GENERAL] Need help on postgres related to insertion of a tuple.

2015-07-16 Thread M Tarkeshwar Rao
Hi all, We have a table name auditTrailLogEntry where we were not able to able to insert in auditTrailLogEntry table. we have reindex the table and insertion issue has been resolved . we executed following command: Audit tail insertion issue. INSERT INTO auditTrailLogEntry (event, inNodeID, i

Re: [GENERAL] Need help in tuning

2014-08-06 Thread David G Johnston
Phoenix Kiula wrote > My PG server is still going down. After spending the weekend doing a > CLUSTER of my largest table (it's a RAID 1 system with SATA hard disks > and 4 GB memory, mostly devoted to PG) I still have this issue. > > When I do a "top" command, 99% of the CPU and about 15% of the m

[GENERAL] Need help in tuning

2014-08-06 Thread Phoenix Kiula
My PG server is still going down. After spending the weekend doing a CLUSTER of my largest table (it's a RAID 1 system with SATA hard disks and 4 GB memory, mostly devoted to PG) I still have this issue. When I do a "top" command, 99% of the CPU and about 15% of the memory is being taken by PG. Wh

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
Thank you very much to everyone, it worked -Original Message- From: Khangelani Gama [mailto:kg...@argility.com] Sent: Thursday, May 22, 2014 3:01 PM To: 'Igor Neyman'; 'Andrew Sullivan'; 'pgsql-general@postgresql.org' Subject: RE: [GENERAL] Need help on t

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Adrian Klaver
On 05/22/2014 06:01 AM, Khangelani Gama wrote: Many Thanks, I will try it now In the link I sent previously: http://www.postgresql.org/docs/9.3/interactive/plpgsql-trigger.html there is a handy section (40.9.1. Triggers on data changes) that explains what information is available to a plpgs

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
Many Thanks, I will try it now -Original Message- From: Igor Neyman [mailto:iney...@perceptron.com] Sent: Thursday, May 22, 2014 2:55 PM To: Khangelani Gama; Andrew Sullivan; pgsql-general@postgresql.org Subject: RE: [GENERAL] Need help on triggers - postgres 9.1.2 > > -Or

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Karsten Hilbert
On Thu, May 22, 2014 at 02:48:48PM +0200, Khangelani Gama wrote: > > CREATE OR REPLACE FUNCTION check_center_changes() RETURNS TRIGGER AS > > $center_changed$ > > > > BEGIN > > > > IF (TG_OP = 'UPDATE') THEN > > INSERT INTO center_changed SELECT c_cde, now(); PostgreSQL probab

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Igor Neyman
> > -Original Message- > > From: Khangelani Gama [mailto:kg...@argility.com] > > Sent: Thursday, May 22, 2014 9:38 AM > > To: 'Adrian Klaver'; 'pgsql-general@postgresql.org' > > Subject: RE: [GENERAL] Need help on triggers - postgres 9.1.

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
Thanks , I will try that -Original Message- From: Raymond O'Donnell [mailto:r...@iol.ie] Sent: Thursday, May 22, 2014 2:54 PM To: Khangelani Gama; Andrew Sullivan; pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help on triggers - postgres 9.1.2 On 22/05/2014 13:48, Khang

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Raymond O'Donnell
On 22/05/2014 13:48, Khangelani Gama wrote: > Hi > > My problem is on two lines, INSERT statements, I get an error saying c_cde > does not exist > > INSERT INTO center_changed SELECT c_cde, now(); - My problem is here: I > get an error saying c_cde does not exist, I cant how I can give You nee

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
ts. Center table has got many rows so I need to only get c_cde for only the row that was inserted. -Original Message- From: Andrew Sullivan [mailto:a...@crankycanuck.ca] Sent: Thursday, May 22, 2014 2:39 PM To: Khangelani Gama Subject: Re: [GENERAL] Need help on triggers - postgres 9.1.2

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
Please help -Original Message- From: Khangelani Gama [mailto:kg...@argility.com] Sent: Thursday, May 22, 2014 9:38 AM To: 'Adrian Klaver'; 'pgsql-general@postgresql.org' Subject: RE: [GENERAL] Need help on triggers - postgres 9.1.2 Hi all Something it's t

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-22 Thread Khangelani Gama
check_center_changes(); -Original Message- From: Khangelani Gama [mailto:kg...@argility.com] Sent: Wednesday, May 21, 2014 9:34 PM To: 'Adrian Klaver'; 'pgsql-general@postgresql.org' Subject: RE: [GENERAL] Need help on triggers - postgres 9.1.2 Thank you very m

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-21 Thread Khangelani Gama
Thank you very much, I will have a look. -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, May 21, 2014 3:20 PM To: Khangelani Gama; pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help on triggers - postgres 9.1.2 On 05/21/2014 02:54 AM

Re: [GENERAL] Need help on triggers - postgres 9.1.2

2014-05-21 Thread Adrian Klaver
On 05/21/2014 02:54 AM, Khangelani Gama wrote: Hi I have a postgres 9 database, inside this database I need to create a new table called *center_changed* that gets inserted by any change that take place in a table called *center*. So I need to create trigger to do this. *Example: * Table name*

[GENERAL] Need help on triggers - postgres 9.1.2

2014-05-21 Thread Khangelani Gama
Hi I have a postgres 9 database, inside this database I need to create a new table called *center_changed* that gets inserted by any change that take place in a table called *center*. So I need to create trigger to do this. *Example: * Table name*: center*(c_cde, c_dsc, ops_cde, grp_cde);

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-16 Thread John R Pierce
On 1/16/2014 1:52 AM, itishree sukla wrote: we have Database, but not ready for Geocode use. what i understood from different blog, we should have latitude and longitude either based on addresses, or postal code we have. However if I will get the lat and long, need to calculate earth distance

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-16 Thread Gavin Flower
Please see the comment at the bottom of this post. On 16/01/14 22:52, itishree sukla wrote: Thanks for your reply, i am totally new to Postgis. At least you've got into it, I keep meaning do do so myself. we have Database, but not ready for Geocode use. what i understood from different blo

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-16 Thread itishree sukla
Thanks for your reply, i am totally new to Postgis. we have Database, but not ready for Geocode use. what i understood from different blog, we should have latitude and longitude either based on addresses, or postal code we have. However if I will get the lat and long, need to calculate earth dist

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-15 Thread Oleg Bartunov
check knn search, http://www.sai.msu.su/~megera/postgres/talks/pgcon-2010-1.pdf On Wed, Jan 15, 2014 at 8:04 PM, itishree sukla wrote: > Deal all, > > In my project, there is a requirement to implement proximity search feature. > We are running a mobile app, for which proximity search is require.

[GENERAL] Need Help to implement Proximity search feature

2014-01-15 Thread itishree sukla
Deal all, In my project, there is a requirement to implement proximity search feature. We are running a mobile app, for which proximity search is require. Can any one guide me how i can achieve this using postgis, or is there any other way i can achieve this. We are using postgresql 9.2. Thanks

Re: [GENERAL] Need Help Restoring Old Backup

2013-12-17 Thread Adrian Klaver
On 12/15/2013 11:00 AM, Steve Knott wrote: Hi, I have a really old database (5+ years old) that was backed up stored away for a while. Now I want some data out of it. Not sure what you mean here? Do you mean you stored the database data directory or did a dump and stored that? I origina

[GENERAL] Need Help Restoring Old Backup

2013-12-17 Thread Steve Knott
Hi, I have a really old database (5+ years old) that was backed up stored away for a while. Now I want some data out of it. I originally thought that if I made a backup and kept around the original database install.exe file, I could reinstall the db & restore the data. It looks like that i

Re: [GENERAL] Need help with upsert

2013-12-05 Thread Kevin Grittner
Richard Dunks wrote: > I will run this command 7 times with different daily table. > [ ... ] a WHERE NOT EXISTS (SELECT * FROM upsert b WHERE a.firewall [ ... ] > > When I run the command I get an  error > ERROR:  column reference "firewall" is ambiguous > LINE 3: ... a WHERE NOT EXISTS (SELECT

Re: [GENERAL] Need help with upsert

2013-12-04 Thread Richard Dunks
Hello, On Dec 4, 2013, at 12:39 PM, Eric Lamer wrote: > Hi, > >I need some help with upsert. > >Some info on what I want to do: > >Each day I create a table for my firewall logs. I have one entry for one > occurrence of all the field except sum, which is the number of occur

[GENERAL] Need help with upsert

2013-12-04 Thread Eric Lamer
Hi, I need some help with upsert. Some info on what I want to do: Each day I create a table for my firewall logs. I have one entry for one occurrence of all the field except sum, which is the number of occurrence I have of each log that match all the field. My table has the f

Re: [GENERAL] Need help with upsert

2013-12-04 Thread Vincent Veyron
Le mercredi 04 décembre 2013 à 17:48 +, Eric Lamer a écrit : > > > Each day I want to copy the last 7 days into one table so I have one > table with the last 7 days of logs. > > > > So I want to copy the data from 7 tables into 1. If the row does > not exist I just insert and if

Re: [GENERAL] Need help with upsert

2013-12-04 Thread Eric Lamer
M To: Eric Lamer Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help with upsert Hi, > ERROR: column reference "firewall" is ambiguous > LINE 3: ... a WHERE NOT EXISTS (SELECT * FROM upsert b WHERE b.firewall... set firewal = misses a table HTH Kind rega

Re: [GENERAL] Need help with upsert

2013-12-04 Thread Serge Fonville
Hi, > ERROR: column reference "firewall" is ambiguous > LINE 3: ... a WHERE NOT EXISTS (SELECT * FROM upsert b WHERE b.firewall... set firewal = misses a table HTH Kind regards/met vriendelijke groet, Serge Fonville http://www.sergefonville.nl 2013/12/4 Eric Lamer > Hi, > > > >I nee

[GENERAL] Need help with upsert

2013-12-04 Thread Eric Lamer
Hi, I need some help with upsert. Some info on what I want to do: Each day I create a table for my firewall logs. I have one entry for one occurrence of all the field except sum, which is the number of occurrence I have of each log that match all the field. My table has the f

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-25 Thread Vincent Veyron
Le vendredi 25 octobre 2013 à 04:50 +0200, Andreas a écrit : > > > well, not quite > > We are not talking about files but databases within the db server. > > Lets keep 3 copies total > > the idea is to start with the database db_test today (2013/10/24) > 2013/10/25: rename db_test to db_tes

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread DDT
ct 25, 2013 09:53 AM To: "pgsql-general"; Subject: [GENERAL] Need help how to manage a couple of daily DB copies. Hi, I'd like to set up a DB-Server that keeps copies of our productive db for an external db-assistant. He should prepare cho

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Andreas
Am 25.10.2013 04:15, schrieb Shridhar Daithankar: On Friday, October 25, 2013 03:53:14 AM Andreas wrote: Hi, I'd like to set up a DB-Server that keeps copies of our productive db for an external db-assistant. He should prepare chores on the test-server and mail the sql scripts to me. I'll look

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Shridhar Daithankar
On Friday, October 25, 2013 03:53:14 AM Andreas wrote: > Hi, > > I'd like to set up a DB-Server that keeps copies of our productive db > for an external db-assistant. > He should prepare chores on the test-server and mail the sql scripts to me. > I'll look over those scripts and run them against t

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Michael Paquier
On Fri, Oct 25, 2013 at 10:53 AM, Andreas wrote: > Hi, > > I'd like to set up a DB-Server that keeps copies of our productive db for an > external db-assistant. > He should prepare chores on the test-server and mail the sql scripts to me. > I'll look over those scripts and run them against the pro

Re: [GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Tomas Vondra
On 25 Říjen 2013, 3:53, Andreas wrote: > Hi, > > I'd like to set up a DB-Server that keeps copies of our productive db > for an external db-assistant. > He should prepare chores on the test-server and mail the sql scripts to > me. > I'll look over those scripts and run them against the productive d

[GENERAL] Need help how to manage a couple of daily DB copies.

2013-10-24 Thread Andreas
Hi, I'd like to set up a DB-Server that keeps copies of our productive db for an external db-assistant. He should prepare chores on the test-server and mail the sql scripts to me. I'll look over those scripts and run them against the productive db myself. So I'd like to have a daily cron job d

Re: [GENERAL] Need help with Inet type

2013-09-12 Thread rob stone
On Wed, 2013-09-11 at 21:49 -0700, arohi wrote: > Hi All, > > I am trying to install postgresql-jdbc but facing java error. sun java is > already installed but postgresql-jdbc installing openjdj. please let me know > how to resolve this and if you require any other details. > > > > - > AR

Re: [GENERAL] Need help with Inet type

2013-09-12 Thread arohi
Hi All, I am trying to install postgresql-jdbc but facing java error. sun java is already installed but postgresql-jdbc installing openjdj. please let me know how to resolve this and if you require any other details. - AROHI -- View this message in context: http://postgresql.1045698.n5.nab

Re: [GENERAL] Need help with Inet type

2013-09-10 Thread Christoph Moench-Tegeder
## Eric Lamer (eric.la...@intact.net): > I can do something like: > >Select * From logs Where src_ip IN (Select ip from ip_table where zone > = 'ZONE_a'); > >Of course that does not work since it does not work with Inet type and > I cannot use << because I have more than 1 row return

[GENERAL] Need help with Inet type

2013-09-10 Thread Eric Lamer
Hi, I would like to know if there is a way to do what I need with Postgress. I have a table with logs and a table with a list of subnets. Right now I do the following query in my table: Select * From logs Where src_ip << '10.0.0.0/24' OR src_ip << '10.1.0.0/24' OR src_ip << '172.1

Re: [GENERAL] need help

2013-08-18 Thread Basavaraj
thanks for ur help,this was the requirement which assigned for us,so i had to ask even though we are having many options.thanks again -- View this message in context: http://postgresql.1045698.n5.nabble.com/Here-is-my-problem-tp5766954p5767778.html Sent from the PostgreSQL - general mailing

Re: [GENERAL] need help

2013-08-16 Thread John R Pierce
On 8/16/2013 6:35 AM, Basavaraj wrote: finally the result shoule be name| address|email|mobileNo|firstname|lastName| -- abc some1mail1 1234564 def xyz 5 records | 10 records | First,

[GENERAL] need help

2013-08-16 Thread Basavaraj
i have two unrelated tables as their is no common column to apply joins or anything, so i want to join those tables using simple query(only two tables should be used and no common table) can you pls help me out how to do that. I am new user to postgres this is table format table1

Re: [GENERAL] need help

2013-08-16 Thread David Johnston
Basavaraj wrote > i have two unrelated tables as their is no common column to apply joins or > anything, so i want to join those tables... I can understand being required to join them (for some unstated reason) but a simple want does not seem a strong enough reason to go through the pain... > ..

Re: [GENERAL] Need Help

2013-08-10 Thread Alban Hertroys
On Aug 9, 2013, at 19:59, nandan wrote: > Hello All ; > > Please help me in knowing below queries which are in Mysql to Postgresql. Postgres and MySQL are very different in these respects. Answering these questions is rather pointless, as it will not give you an understanding of how the role

Re: [GENERAL] Need Help

2013-08-09 Thread John R Pierce
On 8/9/2013 10:59 AM, nandan wrote: Hello All ; Please help me in knowing below queries which are in Mysql to Postgresql. 1. SELECT user,host,password FROM mysql.user WHERE password = ''; SET PASSWORD FOR @ = PASSWORD ('newpass'); postgres has no concept of user@host.host restr

[GENERAL] Need Help

2013-08-09 Thread nandan
Hello All ; Please help me in knowing below queries which are in Mysql to Postgresql. 1. SELECT user,host,password FROM mysql.user WHERE password = ''; SET PASSWORD FOR @ = PASSWORD ('newpass'); 2. SELECT user,host,password FROM mysql.user WHERE user = ''; DELETE FROM mysql.user WH

Re: [GENERAL] Need help compiling from souce

2013-06-27 Thread Jake Silverman
I found out what was happening. When the path variables were manually set, something in build.pl was overwriting 64 bit to 32 bit (not sure why. The build was saying 64 was detected and will be used, but then many files were being compiled as 32 bit). I used a cmd prompt that came with Msft vs

Re: [GENERAL] Need help compiling from souce

2013-06-26 Thread Tom Lane
Jake Silverman writes: > Sorry about that, and thanks for taking the time to help me. Here is the > full file: https://www.dropbox.com/s/c4dwf47nob0i7fr/file4.txt [ lots and lots of error C2065: 'BLCKSZ' : undeclared identifier error C2065: 'XLOG_SEG_SIZE' : undeclared identifier etc etc ] It lo

Re: [GENERAL] Need help compiling from souce

2013-06-26 Thread Jake Silverman
Sorry about that, and thanks for taking the time to help me. Here is the full file: https://www.dropbox.com/s/c4dwf47nob0i7fr/file4.txt -Jake (Just realized I didn't hit reply all. I'm sorry for sending you this message twice.) On Wed, Jun 26, 2013 at 11:29 AM, Tom Lane wrote: > Jake Silverma

Re: [GENERAL] Need help compiling from souce

2013-06-26 Thread Tom Lane
Jake Silverman writes: > I'm trying to compile pg 9.3 beta 1 from source using microsoft visual > studio on a computer running windows 7. When I build I run into around 1600 > errors and around 36 warnings. > I imagine I'm doing something horribly wrong. The following is the start of > my error lo

[GENERAL] Need help compiling from souce

2013-06-26 Thread Jake Silverman
I'm trying to compile pg 9.3 beta 1 from source using microsoft visual studio on a computer running windows 7. When I build I run into around 1600 errors and around 36 warnings. I imagine I'm doing something horribly wrong. The following is the start of my error log: http://pastebin.com/PdGdvWT7 A

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Adrian Klaver
On 02/22/2013 02:25 PM, Kevin Grittner wrote: To get owner to be bob you need to do: \c bob set role bob; create extension plpgsql; Good point, I forgot that the user was reset by \c. Either way you still get the error on the COMMENT which is what is tripping up the OP. The good news is

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Kevin Grittner
Adrian Klaver wrote: > On 02/22/2013 11:59 AM, Kevin Grittner wrote: >> Adrian Klaver wrote: >> >>> At this point I am not sure how to do this with out creating role >>> that has superuser privileges. >> >> Something like this?: >> >> -- Set up the template using database superuser. >> create dat

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Adrian Klaver
On 02/22/2013 11:59 AM, Kevin Grittner wrote: Adrian Klaver wrote: At this point I am not sure how to do this with out creating role that has superuser privileges. Something like this?: -- Set up the template using database superuser. create database template2; \c template2 drop extension p

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Kevin Grittner
Adrian Klaver wrote: > At this point I am not sure how to do this with out creating role > that has superuser privileges. Something like this?: -- Set up the template using database superuser. create database template2; \c template2 drop extension plpgsql; vacuum freeze analyze; \c postgres upd

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Adrian Klaver
On 02/22/2013 07:25 AM, James B. Byrne wrote: On Thu, February 21, 2013 20:27, Adrian Klaver wrote: My previous not withstanding there is a reason I can see why this not so. Just because a user does not own an object does not mean they cannot use it. This allows a DBA to set up a template wit

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread James B. Byrne
On Thu, February 21, 2013 20:27, Adrian Klaver wrote: > > My previous not withstanding there is a reason I can see why this not > so. Just because a user does not own an object does not mean they > cannot use it. This allows a DBA to set up a template with a > privilege scheme that suits their ne

Re: [GENERAL] Need help extripating plpgsql

2013-02-22 Thread Tom Lane
"James B. Byrne" writes: > If all the elements contained in the standard templates had their > ownerships changed to that of the owner of the new database then my > problem would never have arisen. I do not understand why this is not > the case. Is there a reason why this is so? I don't see why

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 03:18 PM, James B. Byrne wrote: On Thu, February 21, 2013 16:02, Adrian Klaver wrote: On 02/21/2013 12:14 PM, James B. Byrne wrote: The current arrangement is not really satisfactory as it requires either separate template databases for each userid granted the DBCREATE role or

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 03:18 PM, James B. Byrne wrote: On Thu, February 21, 2013 16:02, Adrian Klaver wrote: On 02/21/2013 12:14 PM, James B. Byrne wrote: The current arrangement is not really satisfactory as it requires either separate template databases for each userid granted the DBCREATE role or

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 16:02, Adrian Klaver wrote: > On 02/21/2013 12:14 PM, James B. Byrne wrote: >> >> The current arrangement is not really satisfactory as it requires >> either separate template databases for each userid granted the >> DBCREATE role or the superuser role has to be granted

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 12:14 PM, James B. Byrne wrote: On Thu, February 21, 2013 13:23, Merlin Moncure wrote: On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne wrote: On Thu, February 21, 2013 12:38, James B. Byrne wrote: I am trying, without success, to create a PG-9.2 database without including the

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Adrian Klaver
On 02/21/2013 09:38 AM, James B. Byrne wrote: I am trying, without success, to create a PG-9.2 database without including the plpgsql extension. I have tried specifying template0 and the database is nonetheless created with plpgsql. I have deleted plpgsql from template1 and the new database is

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 13:23, Merlin Moncure wrote: > On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne > wrote: >> >> On Thu, February 21, 2013 12:38, James B. Byrne wrote: >>> I am trying, without success, to create a PG-9.2 database without >>> including the plpgsql extension. I have tried

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread Merlin Moncure
On Thu, Feb 21, 2013 at 11:48 AM, James B. Byrne wrote: > > On Thu, February 21, 2013 12:38, James B. Byrne wrote: >> I am trying, without success, to create a PG-9.2 database without >> including the plpgsql extension. I have tried specifying template0 >> and the database is nonetheless created

Re: [GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
On Thu, February 21, 2013 12:38, James B. Byrne wrote: > I am trying, without success, to create a PG-9.2 database without > including the plpgsql extension. I have tried specifying template0 > and the database is nonetheless created with plpgsql. I have deleted > plpgsql from template1 and the

[GENERAL] Need help extripating plpgsql

2013-02-21 Thread James B. Byrne
I am trying, without success, to create a PG-9.2 database without including the plpgsql extension. I have tried specifying template0 and the database is nonetheless created with plpgsql. I have deleted plpgsql from template1 and the new database is nonetheless created with plpgsql. I desire to r

Re: [GENERAL] Need help understanding WAL and checkpoints

2013-02-07 Thread drew_hunt1976
Hi Albe --- On Wed, 2013/2/6, Albe Laurenz wrote: > drew_hunt wrote: > > I'm trying to get my head around WAL and checkpoints and need to ask a > > couple of questions before I > > get a headache. > > > > Firstly, I see the terms "WAL log", "WAL file" and "transaction log" all > > over the pl

Re: [GENERAL] Need help understanding WAL and checkpoints

2013-02-06 Thread Albe Laurenz
drew_hunt wrote: > I'm trying to get my head around WAL and checkpoints and need to ask a couple > of questions before I > get a headache. > > Firstly, I see the terms "WAL log", "WAL file" and "transaction log" all over > the place - are these > the same thing (i.e. files in the pg_xlog directo

[GENERAL] Need help understanding WAL and checkpoints

2013-02-06 Thread drew_hunt1976
Hi there I'm trying to get my head around WAL and checkpoints and need to ask a couple of questions before I get a headache. Firstly, I see the terms "WAL log", "WAL file" and "transaction log" all over the place - are these the same thing (i.e. files in the pg_xlog directory)? I'm a bit confu

Re: [GENERAL] Need help for import of text file

2012-12-16 Thread Sheraz Sharif
On Dec 15, 2012, at 1:06 PM, Andreas wrote: > Hi, > > I need to import textfiles that have 5 columns but there is just blanks as > delimitors. > I could use COPY to read them but there is a time column that shows times as > " h:mm.ss,ms" in the morning and "hh:mm.ss,ms" in the afternoon. > > P

Re: [GENERAL] Need help for import of text file

2012-12-16 Thread Peter Bex
On Sun, Dec 16, 2012 at 06:30:24PM -0500, Steve Clark wrote: > why not use the squeeze option of tr. > > tr -s " " I wasn't aware of that one, it's even simpler and more elegant. Thanks! For this particular case, tr(1) won't do for the same reason the simple sed(1) expression I gave won't do: it

Re: [GENERAL] Need help for import of text file

2012-12-16 Thread Steve Clark
On 12/16/2012 01:12 PM, Peter Bex wrote: On Sun, Dec 16, 2012 at 06:48:35PM +0100, Andreas wrote: With sed as startingpoint I figured it out. Those 3 steps make the input files consumable for COPY 1. dos2unix 2. sed -i 's/[ \t]*$//' 3. sed -i 's/ / /g' You can reduce this to one invocation by

Re: [GENERAL] Need help for import of text file

2012-12-16 Thread Peter Bex
On Sun, Dec 16, 2012 at 06:48:35PM +0100, Andreas wrote: > With sed as startingpoint I figured it out. > Those 3 steps make the input files consumable for COPY > > 1. dos2unix > 2. sed -i 's/[ \t]*$//' > 3. sed -i 's/ / /g' You can reduce this to one invocation by separating the commands by a se

Re: [GENERAL] Need help for import of text file

2012-12-16 Thread Andreas
Am 15.12.2012 22:22, schrieb Peter Bex: On Sat, Dec 15, 2012 at 10:16:55PM +0100, Peter Bex wrote: A simple sed(1) expression should do the trick: sed -E 's/ +/ /g' old-file > new-file I just remembered where I could check, and the GNU sed equivalent is: sed -r 's/ +/ /g' old-file > new-file

Re: [GENERAL] Need help for import of text file

2012-12-15 Thread Peter Bex
On Sat, Dec 15, 2012 at 10:16:55PM +0100, Peter Bex wrote: > A simple sed(1) expression should do the trick: > > sed -E 's/ +/ /g' old-file > new-file I just remembered where I could check, and the GNU sed equivalent is: sed -r 's/ +/ /g' old-file > new-file Sorry for the confusion. Cheers, Pe

Re: [GENERAL] Need help for import of text file

2012-12-15 Thread Peter Bex
On Sat, Dec 15, 2012 at 08:06:44PM +0100, Andreas wrote: > Hi, > > Problem here is in the morning the first digit of the hour is shown as a > blank so there are 2 blanks before the time so COPY misstakes this as an > empty column and gets confused. > > Can someone point me in the direction of a

Re: [GENERAL] Need help for import of text file

2012-12-15 Thread Adrian Klaver
On 12/15/2012 11:06 AM, Andreas wrote: Hi, I need to import textfiles that have 5 columns but there is just blanks as delimitors. I could use COPY to read them but there is a time column that shows times as " h:mm.ss,ms" in the morning and "hh:mm.ss,ms" in the afternoon. Problem here is in the

[GENERAL] Need help for import of text file

2012-12-15 Thread Andreas
Hi, I need to import textfiles that have 5 columns but there is just blanks as delimitors. I could use COPY to read them but there is a time column that shows times as " h:mm.ss,ms" in the morning and "hh:mm.ss,ms" in the afternoon. Problem here is in the morning the first digit of the hour i

Re: [GENERAL] Need help in reclaiming disk space by deleting the selected records

2012-09-14 Thread Steve Crawford
On 09/14/2012 05:35 AM, Andres Freund wrote: Hi, On Friday, September 14, 2012 01:29:59 AM Steve Crawford wrote: 2. CLUSTER is typically way faster than VACUUM FULL and rebuilds the indexes as well but it temporarily requires sufficient disk-space to write out a copy of the table being clustere

Re: [GENERAL] Need help in reclaiming disk space by deleting the selected records

2012-09-14 Thread Andres Freund
Hi, On Friday, September 14, 2012 01:29:59 AM Steve Crawford wrote: > 2. CLUSTER is typically way faster than VACUUM FULL and rebuilds the > indexes as well but it temporarily requires sufficient disk-space to > write out a copy of the table being clustered. Thats not the case anymore since 9.0

Re: [GENERAL] Need help in reclaiming disk space by deleting the selected records

2012-09-13 Thread Steve Crawford
On 09/13/2012 06:33 AM, Yelai, Ramkumar IN BLR STS wrote: Hi All, I am a beginner in Postgresql and Databases. I have a requirement that reclaiming disk space by deleting the rows in a selected time span. I went through the documents and articles to know how to get the table size (_http://wiki

[GENERAL] Need help in reclaiming disk space by deleting the selected records

2012-09-13 Thread Yelai, Ramkumar IN BLR STS
Hi All, I am a beginner in Postgresql and Databases. I have a requirement that reclaiming disk space by deleting the rows in a selected time span. I went through the documents and articles to know how to get the table size (http://wiki.postgresql.org/wiki/Disk_Usage) But before let the user d

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Adrian Klaver
On 08/30/2012 03:52 AM, Khangelani Gama wrote: Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont file and restarted the postmaster but when I run “*show autovacuum;* “ query I still see autovacuum

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Khangelani Gama
Thanks at lot. -Original Message- From: Albe Laurenz [mailto:laurenz.a...@wien.gv.at] Sent: Thursday, August 30, 2012 1:22 PM To: Khangelani Gama *EXTERN*; pgsql-general@postgresql.org Subject: RE: [GENERAL] Need help on autovacuum in postgres 9.1.2 Khangelani Gama wrote: > I need h

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Craig Ringer
On 08/30/2012 06:52 PM, Khangelani Gama wrote: Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont postgresql.conf, I presume. Why do you want to turn autovaccum off? That's almost never the righ

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Albe Laurenz
Khangelani Gama wrote: > I need help in turning off autovacuum in the Database that's running postgres 9.1.2 DB. I tried to > turn it off by putting "off" in postgresql.cont file and restarted the postmaster but when I run "show > autovacuum; " query I still see autovacuum set on inside the databas

[GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Khangelani Gama
Hi I need help in turning off autovacuum in the Database that’s running postgres 9.1.2 DB. I tried to turn it off by putting “off” in postgresql.cont file and restarted the postmaster but when I run “*show autovacuum;* “ query I still see autovacuum set on inside the database. autovacuum ---

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-03 Thread Condor
On 2012-08-02 21:32, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Thursday, August 02, 2012 4:35 AM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need help with SQL query

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-02 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Condor > Sent: Thursday, August 02, 2012 4:35 AM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Need help with SQL query and findin

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-02 Thread Condor
On 2012-08-01 23:59, David Johnston wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- ow...@postgresql.org] On Behalf Of Condor Sent: Wednesday, August 01, 2012 4:16 PM To: pgsql-general@postgresql.org Subject: [GENERAL] Need help with SQL query

Re: [GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-01 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Condor > Sent: Wednesday, August 01, 2012 4:16 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Need help with SQL query and find

[GENERAL] Need help with SQL query and finding NULL array_agg

2012-08-01 Thread Condor
Hello ppl, I have a problem with one sql query, can some one help me. My query is: SELECT array_agg(month) AS month, array_agg(status) AS status, array_agg(service) AS service, case when array_upper(array_agg(phone), 1) is not null THEN array_agg(phone) else array_agg(mobile) END FROM bills W

  1   2   3   4   5   >