Re: [GENERAL] Query ordering question

2012-07-02 Thread Alban Hertroys
On 3 Jul 2012, at 1:22, ajmcello wrote: > db=# SELECT name,date,percent,price,time,amount FROM name WHERE amount >= > '100' AND date='$today' ORDER BY percent DESC; > > name |date | percent| price | time | amount > +++-+-

Re: [GENERAL] Query ordering question

2012-07-02 Thread David Johnston
> -Original Message- > From: ajmcello [mailto:ajmcell...@gmail.com] > Sent: Monday, July 02, 2012 8:26 PM > To: David Johnston > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Query ordering question > > Thanks for the response. I'm working with it, but it seems to sort everythi

Re: [GENERAL] Query ordering question

2012-07-02 Thread ajmcello
Thanks for the response. I'm working with it, but it seems to sort everything by oldest time first, and the name column isn't sorted by name with the highest percent first with the latest (newest) time first. Basically, I want the query to display the newest name with the newest time with the high

Re: [GENERAL] Query ordering question

2012-07-02 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of ajmcello > Sent: Monday, July 02, 2012 7:23 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Query ordering question > > I'm interested in sorting my query

[GENERAL] Query ordering question

2012-07-02 Thread ajmcello
I'm interested in sorting my query by time descending, with the highest percent by latest time shown first, and then every other record associated with column name sorted by time descending, following the first record. Does that make sense? The first query is the best I've come up with. The second

Re: [GENERAL] Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute

2012-07-02 Thread Kevin Grittner
"Kevin Grittner" wrote: >> "shared_buffers";"2GB" > > Benchmarks have shown that 16MB generally helps performance. Yikes! Editing error there -- I meant to put that comment under the wal_buffers setting. -Kevin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] Postgresql 9.0.6 alway run VACUUM ANALYZE pg_catalog.pg_attribute

2012-07-02 Thread Kevin Grittner
[Please don't top-post. http://www.idallen.com/topposting.html ] tuanhoanganh wrote: > Kevin Grittner > tuanhoanganh wrote: >>> VACUUM ANALYZE pg_catalog.pg_attribute, pg_catalog.pg_type, >>> pg_catalog.pg_depend run all time of day. >> What are the results of running the query on this pag

Re: [GENERAL] Is there a way to recover deleted records if database has not been vacuumed?

2012-07-02 Thread hubert depesz lubaczewski
On Mon, Jul 02, 2012 at 10:51:33AM +0100, Frank Church wrote: > I am using Django to develop an app and I think I must have done a syncdb > (which deletes all records) without realizing it. > I have not vacuumed that database and I have also made a copy of the data > directory. > Is there some way

Re: [GENERAL] is there any query so that I may find the list of columns those have rules?

2012-07-02 Thread Albe Laurenz
AI Rumman wrote: > I am getting the following error: > ALTER TABLE base_table ALTER COLUMN base_table_field1 TYPE numeric(10,6); > ERROR: cannot alter type of a column used by a view or rule > DETAIL: rule _RETURN on view master_view depends on column "base_table_field1" > > I know that I have a

Re: [GENERAL] Is there a way to recover deleted records if database has not been vacuumed?

2012-07-02 Thread raghu ram
On Mon, Jul 2, 2012 at 3:21 PM, Frank Church wrote: > > I am using Django to develop an app and I think I must have done a syncdb > (which deletes all records) without realizing it. > > I have not vacuumed that database and I have also made a copy of the data > directory. > > Is there some way to

[GENERAL] Is there a way to recover deleted records if database has not been vacuumed?

2012-07-02 Thread Frank Church
I am using Django to develop an app and I think I must have done a syncdb (which deletes all records) without realizing it. I have not vacuumed that database and I have also made a copy of the data directory. Is there some way to recover the deleted records? -- Frank Church ===

Re: [GENERAL] PostgreSQL Slony-I Replication

2012-07-02 Thread Iqbal Aroussi
On Mon, Jul 2, 2012 at 9:43 AM, Albe Laurenz wrote: > Iqbal Aroussi wrote: > > I'm trying to setup a master-slave replication with PostgreSQL 9.1 / > Slony-I, this is first time I'm > > doing it and I'm kind of lost :( > > Is there any tutorial explaining the steps how to do it with FreeBSD ? > >

Re: [GENERAL] PostgreSQL Slony-I Replication

2012-07-02 Thread Iqbal Aroussi
On Mon, Jul 2, 2012 at 9:32 AM, raghu ram wrote: > > > On Sun, Jul 1, 2012 at 10:18 PM, Iqbal Aroussi wrote: > >> Hi dear friends, >> >> This my first post to PostgreSQL mailing list. >> >> I'm trying to setup a master-slave replication with PostgreSQL 9.1 / >> Slony-I, this is first time I'm do

Re: [GENERAL] PostgreSQL Slony-I Replication

2012-07-02 Thread Albe Laurenz
Iqbal Aroussi wrote: > I'm trying to setup a master-slave replication with PostgreSQL 9.1 / Slony-I, this is first time I'm > doing it and I'm kind of lost :( > Is there any tutorial explaining the steps how to do it with FreeBSD ? > > I'm using FreeBSD db1 9.0-RELEASE / postgresql-server-9.1.4 /

Re: [GENERAL] PostgreSQL Slony-I Replication

2012-07-02 Thread raghu ram
On Sun, Jul 1, 2012 at 10:18 PM, Iqbal Aroussi wrote: > Hi dear friends, > > This my first post to PostgreSQL mailing list. > > I'm trying to setup a master-slave replication with PostgreSQL 9.1 / > Slony-I, this is first time I'm doing it and I'm kind of lost :( > Is there any tutorial explainin

[GENERAL] Do I need archive_mode = on for hot standby?

2012-07-02 Thread Janne H
Hi there. I'm planning on setting up a master database and multiple hot standby slaves using streaming replication. If I use a large(*) value on wal_keep_segments do I really need archive_mode = on then? Any potential problems with this strategy I should be aware about? (*) With large value