Re: [GENERAL] change column data type of a big table

2012-08-09 Thread John R Pierce
On 08/09/12 10:31 PM, Anibal David Acosta wrote: I have a very big table, in fact only this table uses approx. 60% space of disk. The table is an standalone table (no one inherit from this and this is not inherit from another). I need to change a int column to bigint. But aparentely this

[GENERAL] change column data type of a big table

2012-08-09 Thread Anibal David Acosta
I have a very big table, in fact only this table uses approx. 60% space of disk. The table is an standalone table (no one inherit from this and this is not inherit from another). I need to change a int column to bigint. But aparentely this alter recreate the table, my problem is the space, th

Re: [GENERAL] Revoking table & function creation privileges

2012-08-09 Thread Mike Blackwell
The second line in the list of privilges shows the default grant of UC to "public" for that schema. Until you revoke that, the individual grants are superfluous. On Thu, Aug 9, 2012 at 12:53 PM, Moshe Jacobson wrote: > I posted this in Devshed forums > (here

[GENERAL] Revoking table & function creation privileges

2012-08-09 Thread Moshe Jacobson
I posted this in Devshed forums (here) but no one seems to be responding. Hopefully someone here can help. How do I keep a user from being able to create tables in the public schema? I have tried REVOKE CRE

[GENERAL] documentation — version switch

2012-08-09 Thread Geert Mak
I want to congratulate whoever came up with the idea for the version switch in the documentation! I am still furious about Google still "finding" and displaying on top the documentation of 7.x long after 8.x was out… ;) -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To ma

[GENERAL] Function to dump function ddl

2012-08-09 Thread Little, Douglas
Hi, In deploying new versions of function source, I want to export the current definition to a file. After looking around it seems that I needed to create my own function. I got the function to work, but am having a slight problem with the execution of the exported file. It seems that if I inclu

Re: [GENERAL] Slow query

2012-08-09 Thread Kevin Grittner
Nicholas Wieland wrote: > Hi, I've tried to post on stackoverflow, but nobody is apparently > able to help me. > I'm not going to repeat everything here, there's quite some code > in there that is nicely formatted, but if this is a problem I can > repost it in here. > What seems incredibly str

Re: [GENERAL] Slow query

2012-08-09 Thread David Johnston
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Nicholas Wieland Sent: Thursday, August 09, 2012 11:47 AM To: pgsql-general@postgresql.org Subject: [GENERAL] Slow query Hi, I've tried to post on stackoverflow, but nobody is apparently able to hel

[GENERAL] Slow query

2012-08-09 Thread Nicholas Wieland
Hi, I've tried to post on stackoverflow, but nobody is apparently able to help me. I'm not going to repeat everything here, there's quite some code in there that is nicely formatted, but if this is a problem I can repost it in here. http://stackoverflow.com/questions/11865504/postgresql-slow-que

Re: [GENERAL] JSON in 9.2: limitations

2012-08-09 Thread Merlin Moncure
On Tue, Aug 7, 2012 at 7:26 PM, Craig Ringer wrote: > On 08/08/2012 03:45 AM, Merlin Moncure wrote: > >> Given that you can do that, if you had the ability to emit json from >> an hstore the OP's problem would be trivially handled. > > > That's where my thinking went at first too, but there's a wr

Re: [GENERAL] Expression alias not recognized in WHERE clause (ERROR: relation "p" does not exist)

2012-08-09 Thread David Johnston
On Aug 9, 2012, at 7:32, Stefan Keller wrote: > Hi > > I have two (hopefully) equivalent - and unfortunately very slow - queries > which > "Select all buildings that have >1 pharmacies and >1 schools within 1000m". > > In the first query there is an expression alias "b" and in the second > the

Re: [GENERAL] Expression alias not recognized in WHERE clause (ERROR: relation "p" does not exist)

2012-08-09 Thread Tomas Vondra
On 9 Srpen 2012, 13:32, Stefan Keller wrote: > Hi > > I have two (hopefully) equivalent - and unfortunately very slow - queries > which > "Select all buildings that have >1 pharmacies and >1 schools within > 1000m". > > In the first query there is an expression alias "b" and in the second > there a

Re: [GENERAL] Expression alias not recognized in WHERE clause (ERROR: relation "p" does not exist)

2012-08-09 Thread Alban Hertroys
> SELECT b.way AS building_geometry > FROM > (SELECT way FROM osm_polygon > WHERE tags @> hstore('building','yes') > ) AS b, > (SELECT way, tags->'amenity' as value FROM osm_poi > WHERE (tags ? 'amenity') > ) AS p > WHERE > (SELECT count(*) > 1 FROM p > WHERE p.value = 'pharmacy' > A

[GENERAL] Expression alias not recognized in WHERE clause (ERROR: relation "p" does not exist)

2012-08-09 Thread Stefan Keller
Hi I have two (hopefully) equivalent - and unfortunately very slow - queries which "Select all buildings that have >1 pharmacies and >1 schools within 1000m". In the first query there is an expression alias "b" and in the second there are two expression aliases: "b" and "p". Can someone tell me,

Re: [GENERAL] Problem running "ALTER TABLE...", ALTER TABLE waiting

2012-08-09 Thread Sergey Konoplev
On Thu, Aug 9, 2012 at 4:58 AM, Tom Lane wrote: > Brian McNally writes: >> Ok, I'm running with all available updates and kernel 2.6.18-308.4.1.el5 >> but am still having the same problem. > > It's fairly clearly blocked on a lock ... have you looked into the > pg_locks view to see what is holdin

Re: [GENERAL] processing large amount of rows with plpgsql

2012-08-09 Thread Marc Mamin
oops, > and then call your function with the values 1..15 (when using 16 it should of course be 0..15 Marc Mamin > -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Marc Mamin > Sent: Donnerstag, 9. August 2012 0

Re: [GENERAL] processing large amount of rows with plpgsql

2012-08-09 Thread Marc Mamin
> > There is (almost) no way to > > force commit inside a function -- > > So what you are saying is that this behavior is normal and we should > either equip ourselves with enough disk space (which I am trying now, > it is a cloud server, which I am resizing to gain more disk space and > see what