Re: [GENERAL] Howto sort the result of UNION (without modifying its type)?

2011-04-09 Thread Clemens Eisserer
Hi Robert, > does this work for you? >        select u.id from (your unions) as u order by u.id Unfourtunatly not, it converts my union-results from INTEGER to RECORD. However, it seems to be possible to order the unions directly: > result1 UNION result2 ORDER BY u.id Hmm, the query plan looks

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Carlos Mennens
On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: > I believe you can rename the underlying indexes and the constraints will > follow them.  (This works in HEAD anyway, not sure how far back.) Below is my table: inkpress=# \d marketing Table "public.marketing" Column | Type

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Tom Lane
Carlos Mennens writes: > On Fri, Apr 8, 2011 at 8:35 PM, Tom Lane wrote: >> I believe you can rename the underlying indexes and the constraints will >> follow them.  (This works in HEAD anyway, not sure how far back.) > I renamed the table name from 'accounts' to 'marketing' however all > the co

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Carlos Mennens
On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane wrote: > ALTER INDEX accounts_pkey RENAME TO whatever > > On very old versions of PG you may have to spell that "ALTER TABLE" > instead of "ALTER INDEX", but it's the same thing either way. Thank you so much for clearing that up for me Tom! I just couldn'

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Adrian Klaver
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote: > On Sat, Apr 9, 2011 at 12:58 PM, Tom Lane wrote: > > ALTER INDEX accounts_pkey RENAME TO whatever > > > > On very old versions of PG you may have to spell that "ALTER TABLE" > > instead of "ALTER INDEX", but it's the same thing either

Re: [GENERAL] Rename or Re-Create Constraints?

2011-04-09 Thread Adrian Klaver
On Saturday, April 09, 2011 2:59:06 pm Carlos Mennens wrote: > > > Is there a difference between an INDEX and a CONSTRAINT? Oops forgot to add this to my previous reply. The short version, an INDEX is one form of a CONSTRAINT. For the long version look at the CREATE TABLE section of the docs. I

Re: [GENERAL] could not access status of transaction 1118722281

2011-04-09 Thread Gordon Shannon
Turns out this was most likely the pg_upgrade bug. In our case, I was able to dump and recreate the table in question. Since then, this has been made public: http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix -- View this message in context: http://postgresql.1045698.n5.nabble.com/could-no

Re: [GENERAL] searchable database

2011-04-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, Apr 09, 2011 at 12:10:46PM +0530, quickinfo wrote: > Dear Friends, > > I need help from you. > > We have more than thousand electronic journals. I want to make a searchable > database for easy access. Is there any light wight database availab