Re: [GENERAL] Schema version control

2011-02-11 Thread Andre Lopes
Hi, Where can we donwload dbsteward? Best Regards, On Fri, Feb 11, 2011 at 5:16 AM, Bill Moran wrote: > In response to Glenn Maynard : > >> On Thu, Feb 10, 2011 at 6:44 PM, Bill Moran wrote: >> >> > dbsteward can do downgrades ... you just feed it the old schema and >> > the new schema in rev

[GENERAL] Auto-Increment in Postgres

2011-02-11 Thread Adarsh Sharma
Dear all, I have an Integer column in Postgres database table. Let's say the column has below values : 1 2 3 4 5 6 7 8 9 10 Now if i deleted some rows where id= 3 ,5 and 8 or it have these type of data then The data look like as : 1 2 4 6 7 9 10 I want to have it id's as 1 2 3 4 5 6

Re: [GENERAL] Auto-Increment in Postgres

2011-02-11 Thread Thom Brown
On 11 February 2011 11:13, Adarsh Sharma wrote: > Dear all, > > > I have an Integer column in Postgres database table. Let's say the column > has below values : > > > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > > > Now if i deleted some rows where id= 3 ,5 and 8  or it have these type of > data then

Re: [GENERAL] Auto-Increment in Postgres

2011-02-11 Thread Fredric Fredricson
On 02/11/2011 12:13 PM, Adarsh Sharma wrote: Dear all, I have an Integer column in Postgres database table. Let's say the column has below values : 1 2 3 4 5 6 7 8 9 10 Now if i deleted some rows where id= 3 ,5 and 8 or it have these type of data then The data look like as : 1 2 4 6

Re: [GENERAL] GUC configuration

2011-02-11 Thread Θάνος Παπαπέτρου
On 10 Φεβ 2011, at 7:45 ΜΜ, Wappler, Robert wrote: Are you looking for custom variable classes? http://www.postgresql.org/docs/8.4/interactive/runtime-config-custom.htm No, thanks for the interest though. I am not developing an add-on in order to use such kind of functionality. I have made

Re: [GENERAL] Auto-Increment in Postgres

2011-02-11 Thread David Johnston
"But this adds the column at the end." - column order in the table definition is unreliable; when you output you should specify the column order yourself. As to populating within a sequence that has missing values that is more trouble than it is worth. If you want to add a column and make i

Re: [GENERAL] Schema version control

2011-02-11 Thread Bill Moran
In response to Andre Lopes : > Hi, > > Where can we donwload dbsteward? You can't yet. We're still in the process of getting everything lined up to release it. We've registerd dbsteward.org, so when we have things ready, that'll be where you can go. Expect it to come live in the next few mont

Re: [GENERAL] Schema version control

2011-02-11 Thread Daniel Popowich
Glenn Maynard writes: > - Adding a NOT NULL constraint (without adding a DEFAULT). You often want > to precede this with filling in any existing NULL values, so the new > constraint doesn't fail. > - Updating triggers, functions and their effects. For example, when I have > an FTS index with a t

Re: [GENERAL] Schema version control

2011-02-11 Thread Bill Moran
In response to Alban Hertroys : > On 10 Feb 2011, at 23:59, Bill Moran wrote: > > > The overview: > > You store your schema and data as XML (this is easy to migrate to, because > > it includes a tool that makes the XML from a live database) > > Keep your XML schema files in some RCS. > > That re

Re: [GENERAL] plsql question

2011-02-11 Thread Bill Thoen
On 2/10/2011 6:40 PM, Geoffrey Myers wrote: I am trying to write a plsql routine that will delete a range of characters based on their octal or hexadecimal values. Something like the 'tr' shell command will do: cat file| tr -d ['\177'-'\377'] Can't seem to figure this one out. Pointers woul

Re: [GENERAL] pg_dump: schema with OID 58698 does not exist

2011-02-11 Thread David Kerr
On 02/09/2011 11:23 AM, David Kerr wrote: On Wed, Feb 09, 2011 at 02:15:06PM -0500, Tom Lane wrote: - David Kerr writes: -> Ok, I found the bad entries, 2 tables a sequence and 2 primary key indexes are associated -> with the wrong (invalid / nonexistant ) schema. - -> However, there are cor

Re: [GENERAL] pg_dump: schema with OID 58698 does not exist

2011-02-11 Thread Tom Lane
David Kerr writes: > So i removed the 5 entries from pg_class, but i still get that error > when trying to pg_dump: > pg_dump: schema with OID 58698 does not exist > Any other ideas where i could look? Well, it could be any catalog with a namespace column. But I'm wondering about pg_depend li

Re: [GENERAL] Schema version control

2011-02-11 Thread Glenn Maynard
id integer DEFAULT 1 NOT NULL CHECK (id = 1), >major integer NOT NULL, >minor integer NOT NULL, >patch integer NOT NULL >); > What both Rails and my own system does is, rather than having a version, each migration has a name; for example, "20110211-

Re: [GENERAL] Multithreaded query onto 4 postgresql instances

2011-02-11 Thread pasman pasmański
I think this is bad idea. Better you use cursors. 2011/2/10, Alessandro Candini : > Here you are my probably uncommon situation. > > I have installed 4 different instances of postgresql-9.0.2 on the same > machine, on ports 5433, 5434, 5435, 5436. > On these instances I have splitted a huge databa

[GENERAL] More log detail on deadlock detection

2011-02-11 Thread Burcher, Greg
I am looking for help in debugging a deadlock situation that occurs intermittently. I am aware of queries that I can use against system tables/views such as pg_locks and pg_stat_activity to get good information about current process statements and locks. However, by the time postgresql reports dead