Re: [GENERAL] advice for efresh of materialized view

2017-04-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ivan Fabris, Gruppo ColliniConsulting.it Sent: Wednesday, April 12, 2017 11:17 AM To: 'pgsql-general@postgresql.org' Subject: [GENERAL] R: advice for efresh of materialized view Attention: This e

Re: [GENERAL] advice for efresh of materialized view

2017-04-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ivan Fabris, Gruppo ColliniConsulting.it Sent: Wednesday, April 12, 2017 6:15 AM To: 'pgsql-general@postgresql.org' Subject: [GENERAL] advice for efresh of materialized view Atten

Re: [GENERAL] advice for efresh of materialized view

2017-04-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ivan Fabris, Gruppo ColliniConsulting.it Sent: Wednesday, April 12, 2017 6:15 AM To: 'pgsql-general@postgresql.org' Subject: [GENERAL] advice for efresh of materialized view Attention:

[GENERAL] advice for efresh of materialized view

2017-04-12 Thread Ivan Fabris, Gruppo ColliniConsulting.it
Hi all, I have a table defined this way ( a couple of indexes are actually obsolete, the table needs a little clean ) : # \d categories_stat Table "public.categories_stat" Column|Type |

Re: [GENERAL] Advice about software engineering inside Postgres?

2017-03-20 Thread Merlin Moncure
On Mon, Mar 20, 2017 at 2:32 PM, Guyren Howe wrote: > I’m working on a project to get the likes of web developers to make more > effective use of Postgres. This amounts to saying that much of the M in MVC > should be implemented as code and relations in Postgres. > This is fairly insightful, I t

[GENERAL] Advice about software engineering inside Postgres?

2017-03-20 Thread Guyren Howe
I’m working on a project to get the likes of web developers to make more effective use of Postgres. This amounts to saying that much of the M in MVC should be implemented as code and relations in Postgres. The more I think about this, the more I see that a model written in Node, say, that just

Re: [GENERAL] Advice for using integer arrays?

2015-01-07 Thread Thomas Kellerer
> BTW, looking at your example, you might be more interested in ranges, > see for example: > http://www.postgresql.org/docs/9.2/static/rangetypes.html > > Conceptually they are a bit different and there isn't support for > multi-ranges AFAIK You could have an array of ranges -- Sent via pgs

Re: [GENERAL] Advice for using integer arrays?

2015-01-07 Thread Martijn van Oosterhout
On Tue, Jan 06, 2015 at 12:09:56PM -0500, Michael Heaney wrote: > I'm fairly new to Postgres, and have a design issue for which an > array of integers might be a good solution. But I'd like to hear > from the experts before proceeding down this path. The biggest consideration is if you are ever i

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Adrian Klaver
On 01/06/2015 01:18 PM, Michael Heaney wrote: On 1/6/2015 2:19 PM, Jeff Janes wrote: On Tue, Jan 6, 2015 at 9:09 AM, Michael Heaney mailto:mhea...@jcvi.org>> wrote: I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Paul Jungwirth
Hi Michael, I can't comment on the domain-specific stuff, but I recently used numeric arrays for a project and it worked well. In my case we had one million simulation results (floats) per scenario, so rather than reading one million separate rows to compute a histogram, we stored everything in on

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Michael Heaney
On 1/6/2015 2:19 PM, Jeff Janes wrote: On Tue, Jan 6, 2015 at 9:09 AM, Michael Heaney > wrote: I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like to hear from the experts before proceedin

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Jeff Janes
On Tue, Jan 6, 2015 at 9:09 AM, Michael Heaney wrote: > I'm fairly new to Postgres, and have a design issue for which an array of > integers might be a good solution. But I'd like to hear from the experts > before proceeding down this path. > > Essentially, I'm trying to model the relationship b

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Rob Sargent
On 01/06/2015 10:09 AM, Michael Heaney wrote: I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like to hear from the experts before proceeding down this path. Essentially, I'm trying to model the relationship between a group

Re: [GENERAL] Advice for using integer arrays?

2015-01-06 Thread Arthur Silva
On Jan 6, 2015 3:12 PM, "Michael Heaney" wrote: > > I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like to hear from the experts before proceeding down this path. > > Essentially, I'm trying to model the relationship between a

[GENERAL] Advice for using integer arrays?

2015-01-06 Thread Michael Heaney
I'm fairly new to Postgres, and have a design issue for which an array of integers might be a good solution. But I'd like to hear from the experts before proceeding down this path. Essentially, I'm trying to model the relationship between a group of biological samples and their genes. Each sa

Re: [GENERAL] advice sought - general approaches to optimizing queries around "event streams"

2014-09-26 Thread Brent Wood
athan Vanasco Sent: Saturday, September 27, 2014 9:02 AM To: PostgreSQL general Subject: [GENERAL] advice sought - general approaches to optimizing queries around "event streams" I have a growing database with millions of rows that track resources against an event stream. i have a few

Re: [GENERAL] advice sought - general approaches to optimizing queries around "event streams"

2014-09-26 Thread Gavin Flower
On 27/09/14 09:02, Jonathan Vanasco wrote: I have a growing database with millions of rows that track resources against an event stream. i have a few handfuls of queries that interact with this stream in a variety of ways, and I have managed to drop things down from 70s to 3.5s on full scans a

[GENERAL] advice sought - general approaches to optimizing queries around "event streams"

2014-09-26 Thread Jonathan Vanasco
I have a growing database with millions of rows that track resources against an event stream. i have a few handfuls of queries that interact with this stream in a variety of ways, and I have managed to drop things down from 70s to 3.5s on full scans and offer .05s partial scans. no matter

Re: [GENERAL] General Advice for avoiding concurrency during schema migrations

2014-03-24 Thread Amador Alvarez
Hi Ken, With that level of dinamism of application servers where there is no way to keep consistency among them , as you say concurrency must be turned into a single thread to make sure schema migration will not be locked up by application threads . Have you though about constraining connections

Re: [GENERAL] General Advice for avoiding concurrency during schema migrations

2014-03-24 Thread Ken Barber
> Do you really need to allow web server connections to the database during a > schema migration ? Why not locking them up either with pg_hba.cong or a > firewal rule or symply shut it off temporarily ? So this would be ideal if we could control the situation 100%, to be clear our software is a sh

Re: [GENERAL] General Advice for avoiding concurrency during schema migrations

2014-03-24 Thread Amador Alvarez
gt; I was just wondering if anyone has some general advice for how to > ensure a schema migration for an application has exclusivity during > its run. > > This is to avoid silly things like, if someone leaves an application > server running during migration the migration should be a

[GENERAL] General Advice for avoiding concurrency during schema migrations

2014-03-21 Thread Ken Barber
Hi there, I was just wondering if anyone has some general advice for how to ensure a schema migration for an application has exclusivity during its run. This is to avoid silly things like, if someone leaves an application server running during migration the migration should be able to lock

Re: [GENERAL] Advice on HA option

2011-09-07 Thread hyelluas
Thank you, I will look at skype's walmgr. Also could you explain what makes it "hands free administration" 9.0? Is the shipping of the wal file from the master to HA instance automated ? Any error checking /self recovery? thank you much for the suggestion. Helen -- View this message in con

Re: [GENERAL] Advice on HA option

2011-09-06 Thread Merlin Moncure
On Tue, Sep 6, 2011 at 2:06 PM, hyelluas wrote: > Hello, > > I need to implement HA for the appliance that is sold to the customer  - our > application has no DBA and must be very stable and self  recoverable. > > We are running PostgreSQL 8.4. > > Is the warm standby a good solution for us? It c

[GENERAL] Advice on HA option

2011-09-06 Thread hyelluas
Hello, I need to implement HA for the appliance that is sold to the customer - our application has no DBA and must be very stable and self recoverable. We are running PostgreSQL 8.4. Is the warm standby a good solution for us? Thank you for all the suggestions. Helen -- View this messag

Re: [GENERAL] First production install - general advice

2011-03-09 Thread mark
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Ray Stell > Sent: Monday, March 07, 2011 10:45 AM > To: runner > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] First production ins

Re: [GENERAL] First production install - general advice

2011-03-07 Thread Michael Black
relax. To: pgsql-general@postgresql.org Subject: [GENERAL] First production install - general advice Date: Mon, 7 Mar 2011 12:34:19 -0500 From: run...@winning.com I'm going to go live with my first production install of PostgreSQL 9.0 in about a week. I've done a LOT of read

Re: [GENERAL] First production install - general advice

2011-03-07 Thread Ray Stell
On Mon, Mar 07, 2011 at 12:34:19PM -0500, runner wrote: > > I'd like to know if any of you have ever installed a PostgreSQL database for > production use and then found something you wish you had done differently > after the fact. Test and document your disaster recovery plan. You don't wa

[GENERAL] First production install - general advice

2011-03-07 Thread runner
I'm going to go live with my first production install of PostgreSQL 9.0 in about a week. I've done a LOT of reading on the internet and I've purchased two very good reference books and actually read them: PostgreSQL 9 Administration Cookbook PostgreSQL 9.0 High Performance I'd like to kno

[GENERAL] Advice on efficient approach to aggregation statistics

2010-11-12 Thread postgresql . 30 . miller_2555
Hi - I have a table for which I want to fit an exponential curve to values in one column of the table and compute a correlation statistic on the fit of the values to the exponential curve. The table consists of the following three columns: {"ID","Date","Value"}. The desired result of the exerc

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-27 Thread Dmitriy Igrishin
Hey Craig, 2010/10/27 Craig Ringer > On 27/10/10 04:49, Dmitriy Igrishin wrote: > > Hey Tony, > > > > 2010/10/27 Tony Cebzanov > > > > > > On 10/23/10 11:01 AM, Craig Ringer wrote: > > > Yep. As for not explicitly mentioning "lower" roles when granting a >

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-26 Thread Craig Ringer
On 27/10/10 04:49, Dmitriy Igrishin wrote: > Hey Tony, > > 2010/10/27 Tony Cebzanov > > > On 10/23/10 11:01 AM, Craig Ringer wrote: > > Yep. As for not explicitly mentioning "lower" roles when granting a > > higher role (ie "admin" isn't also a "user")

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-26 Thread Dmitriy Igrishin
Hey Tony, 2010/10/27 Tony Cebzanov > On 10/23/10 11:01 AM, Craig Ringer wrote: > > Yep. As for not explicitly mentioning "lower" roles when granting a > > higher role (ie "admin" isn't also a "user") - role inheritance. > > I knew about role inheritance, I just didn't know about the > pg_has_rol

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-26 Thread Tony Cebzanov
On 10/23/10 11:01 AM, Craig Ringer wrote: > Yep. As for not explicitly mentioning "lower" roles when granting a > higher role (ie "admin" isn't also a "user") - role inheritance. I knew about role inheritance, I just didn't know about the pg_has_role() function for determining if a user has a rol

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-24 Thread Harald Fuchs
In article <20101022161331.gd9...@frohike.homeunix.org>, Peter Bex writes: > As far as I can see, this would imply either creating views on the > for every user (or company?), or manually crafting queries > to do the same. Not necessarily. Consider this: CREATE TABLE t1 ( id serial NOT N

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-23 Thread Craig Ringer
On 10/23/2010 12:02 AM, Dmitriy Igrishin wrote: Please see http://www.postgresql.org/docs/9.0/static/functions-info.html#FUNCTIONS-INFO-ACCESS-TABLE Yep. As for not explicitly mentioning "lower" roles when granting a higher role (ie "admin" isn't also a "user") - role inheritance. http://ww

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Peter Bex
On Fri, Oct 22, 2010 at 08:20:11PM +0400, Dmitriy Igrishin wrote: > Hey Peter, Hello Dmitriy, > > As far as I can see, this would imply either creating views on the > > for every user (or company?), or manually crafting queries > > to do the same. The latter is of course what most webapps do, an

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Dmitriy Igrishin
Hey Peter, 2010/10/22 Peter Bex > On Fri, Oct 22, 2010 at 12:21:17AM +0400, Dmitriy Igrishin wrote: > > Hey Tony, > > > > 2010/10/21 Tony Cebzanov > > > > > I have a web application with a Postgres backend. In my initial > > > prototype, I decided not to have a Postgres database user created f

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Peter Bex
On Fri, Oct 22, 2010 at 12:21:17AM +0400, Dmitriy Igrishin wrote: > Hey Tony, > > 2010/10/21 Tony Cebzanov > > > I have a web application with a Postgres backend. In my initial > > prototype, I decided not to have a Postgres database user created for > > each application user, opting instead to

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Dmitriy Igrishin
Hey Tony, 2010/10/22 Tony Cebzanov > Hi Dmitriy, > > On 10/21/10 4:21 PM, Dmitriy Igrishin wrote: > > IMO, you are trying to reinvent the wheel. Although, you may do it just > for > > fun. :-) > > Surely I am, but I think it made sense at the time. It doesn't make as > much sense now that I nee

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-22 Thread Tony Cebzanov
Hi Dmitriy, On 10/21/10 4:21 PM, Dmitriy Igrishin wrote: > IMO, you are trying to reinvent the wheel. Although, you may do it just for > fun. :-) Surely I am, but I think it made sense at the time. It doesn't make as much sense now that I need to audit every insert/update/delete in the database.

Re: [GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-21 Thread Dmitriy Igrishin
Hey Tony, 2010/10/21 Tony Cebzanov > I have a web application with a Postgres backend. In my initial > prototype, I decided not to have a Postgres database user created for > each application user, opting instead to use my own users table. > IMO, you are trying to reinvent the wheel. Although,

[GENERAL] Advice needed on application/database authentication/authorization/auditing model

2010-10-21 Thread Tony Cebzanov
I have a web application with a Postgres backend. In my initial prototype, I decided not to have a Postgres database user created for each application user, opting instead to use my own users table. Authentication of application users is done via PAM, so no password is necessary in my users table

Re: [GENERAL] Advice on contingency plan for DAS array with separate local WAL drives

2010-06-14 Thread Greg Smith
Jeff Amiel wrote: Recently migrated to a shiny new 8.4.4 postgres instancedata stored on attached storage array. Transaction logs stored on 2 local mirrored drives (local to the database server itself) for best performance. Have you benchmarked that this really helps? Splitting the W

Re: [GENERAL] Advice on contingency plan for DAS array with separate local WAL drives

2010-06-14 Thread Jeff Amiel
On 6/14/10 8:05 AM, "Jeff Amiel" wrote: > What is recommended in terms of prep/switchover in this instance? Should we > be rsyncing or using built-in wal-log shipping of these transaction logs to > our stand-by server? Simply pop out these drives and hand-move them to the > standby-server? (a

[GENERAL] Advice on contingency plan for DAS array with separate local WAL drives

2010-06-14 Thread Jeff Amiel
Recently migrated to a shiny new 8.4.4 postgres instancedata stored on attached storage array. Transaction logs stored on 2 local mirrored drives (local to the database server itself) for best performance. While we are replicating (using slony) to our DR site, our first-choice plan (in the

Re: [GENERAL] Advice on webbased database reporting

2010-04-14 Thread Davor J.
Thank you all for the nice suggestions! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Advice on webbased database reporting

2010-04-03 Thread Boszormenyi Zoltan
Hi, Davor J. írta: > I need to make certain views from the database visible online (on our > webpage) and I wonder if there is any reasonably quick solution for this > that works with Postgres? > > At best, a query should be specified and the user should be able to select > the layout on certai

Re: [GENERAL] Advice on webbased database reporting

2010-04-02 Thread Brian Modra
On 02/04/2010, Leif Biberg Kristensen wrote: > On Friday 2. April 2010 14.43.48 Davor J. wrote: >> I need to make certain views from the database visible online (on our >> webpage) and I wonder if there is any reasonably quick solution for this >> that works with Postgres? >> >> At best, a query s

Re: [GENERAL] Advice on webbased database reporting

2010-04-02 Thread Leif Biberg Kristensen
On Friday 2. April 2010 14.43.48 Davor J. wrote: > I need to make certain views from the database visible online (on our > webpage) and I wonder if there is any reasonably quick solution for this > that works with Postgres? > > At best, a query should be specified and the user should be able to

[GENERAL] Advice on webbased database reporting

2010-04-02 Thread Davor J.
I need to make certain views from the database visible online (on our webpage) and I wonder if there is any reasonably quick solution for this that works with Postgres? At best, a query should be specified and the user should be able to select the layout on certain columns (like stepped, or out

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Scott Marlowe
On Sun, Aug 3, 2008 at 1:50 AM, Marco Bizzarri <[EMAIL PROTECTED]> wrote: > On Sun, Aug 3, 2008 at 1:40 AM, Berend Tober <[EMAIL PROTECTED]> wrote: >> >> >> The way I understand the documentation at >> >> "http://www.postgresql.org/docs/8.3/static/transaction-iso.html"; >> >> and >> >> 'http://www.

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Marco Bizzarri
On Sun, Aug 3, 2008 at 1:40 AM, Berend Tober <[EMAIL PROTECTED]> wrote: > > > The way I understand the documentation at > > "http://www.postgresql.org/docs/8.3/static/transaction-iso.html"; > > and > > 'http://www.postgresql.org/docs/current/static/explicit-locking.html', > > you should not have to

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-03 Thread Marco Bizzarri
On Sat, Aug 2, 2008 at 5:11 PM, David Fetter <[EMAIL PROTECTED]> wrote: > On Sat, Aug 02, 2008 at 09:23:31AM +0200, Marco Bizzarri wrote: >> Hi all. >> >> I need to keep a numer of counters in my application; my counters >> are currently stored in a table: >> >> name | next_value | year >> >> The c

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Berend Tober
Marco Bizzarri wrote: > Hi all. > > I need to keep a numer of counters in my application; my counters are > currently stored in a table: > > name | next_value | year > > > The counters must be progressive numbers with no holes in between > them, and they must restart from 1 every year. What I've

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread David Fetter
On Sat, Aug 02, 2008 at 09:23:31AM +0200, Marco Bizzarri wrote: > Hi all. > > I need to keep a numer of counters in my application; my counters > are currently stored in a table: > > name | next_value | year > > The counters must be progressive numbers with no holes in between > them, and they m

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
On Sat, Aug 2, 2008 at 11:04 AM, Craig Ringer <[EMAIL PROTECTED]> wrote: > Marco Bizzarri wrote: >> Thanks for the advice, Craig. >> >> I'm on a number of different PostgreSQL versions, ranging from 7.4 to >> 8.3, so I've to retain, where possible, compatibility with older >> versions. >> >> Is thi

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
Marco Bizzarri wrote: > Thanks for the advice, Craig. > > I'm on a number of different PostgreSQL versions, ranging from 7.4 to > 8.3, so I've to retain, where possible, compatibility with older > versions. > > Is this better on a transaction/serialization point of view? As far as I know it's no

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
Thanks for the advice, Craig. I'm on a number of different PostgreSQL versions, ranging from 7.4 to 8.3, so I've to retain, where possible, compatibility with older versions. Is this better on a transaction/serialization point of view? Regards Marco On Sat, Aug 2, 2008 at 10:19 AM, Craig Ringer

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
Marco Bizzarri wrote: > Hi all. > > I need to keep a numer of counters in my application; my counters are > currently stored in a table: > > name | next_value | year > > > The counters must be progressive numbers with no holes in between > them, and they must restart from 1 every year. What I'v

[GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
Hi all. I need to keep a numer of counters in my application; my counters are currently stored in a table: name | next_value | year The counters must be progressive numbers with no holes in between them, and they must restart from 1 every year. What I've done so far is to access them while in S

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-30 Thread Merlin Moncure
On Mon, Jun 30, 2008 at 8:51 AM, Sam Mason <[EMAIL PROTECTED]> wrote: >> >> select * from foo where (o,pk)>(o,?) order by o limit 10; > > Hum, I think I must be missing something. I'm not sure why you're > comparing 'o' to itself and you're not putting any ordering constraint > on the primary key

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-30 Thread Sam Mason
On Fri, Jun 27, 2008 at 08:22:35PM +, Ragnar wrote: > let us assume your resultset has a a unique column pk, and is ordered on > column o: > > next page > select * from foo where (o,pk)>(o,?) order by o limit 10; > (where the ? is the last pk value in previous select) > > this method will b

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Craig Ringer
Bill Thoen wrote: What I'm wondering is how in PostgreSQL do you select only the first 10 records from a selection, then the next 10, then the next, and possibly go back to a previous 10? LIMIT with OFFSET has already been mentioned. There's another option if your web app is backed by an app

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Richard Broersma
On Fri, Jun 27, 2008 at 2:09 PM, Bill Thoen <[EMAIL PROTECTED]> wrote: > Thanks for tip on OFFSET. That's just what I needed. It's so easy when you > know the command you're looking for, and so hard when you know what you want > to do but don't know what the command is called! I would strongly sug

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Bill Thoen
Thanks for tip on OFFSET. That's just what I needed. It's so easy when you know the command you're looking for, and so hard when you know what you want to do but don't know what the command is called! Thanks, - Bill Thoen -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Ragnar
Hello apart from the increasing OFFSET method, you only need to traverse the results sequentially, you can do a variant of this: let us assume your resultset has a a unique column pk, and is ordered on column o: initial select: select * from foo order by o limit 10; next page select * from

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Olexandr Melnyk
On 6/27/08, Bill Thoen <[EMAIL PROTECTED]> wrote: > > What I want to do is present the results of a query in a web page, but only > 10 rows at a time. My PostgreSQL table has millions of records and if I > don't add a LIMIT 10 to the SQL selection, the request can take too long. > The worst case sc

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Lennin Caro
use a dynamic select in the web page $1 = 10 $2 = 5 select * from mytable limit $1 OFFSET $2 --- On Fri, 6/27/08, Bill Thoen <[EMAIL PROTECTED]> wrote: From: Bill Thoen <[EMAIL PROTECTED]> Subject: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks To: p

Re: [GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Adam Rich
> > What I want to do is present the results of a query in a web page, but > only 10 rows at a time. My PostgreSQL table has millions of records and > if I don't add a LIMIT 10 to the SQL selection, the request can take > too > long. The worst case scenario is when the user requests all records >

[GENERAL] Advice Wanted on Selecting Multi-row Data Requests in 10-Row Blocks

2008-06-27 Thread Bill Thoen
What I want to do is present the results of a query in a web page, but only 10 rows at a time. My PostgreSQL table has millions of records and if I don't add a LIMIT 10 to the SQL selection, the request can take too long. The worst case scenario is when the user requests all records without add

Re: [GENERAL] Advice for "hot-swapping" databases

2008-06-16 Thread Woody Woodring
If the databases are on the same machine, I could see creating a template database and then use: createdb -T templateName newDbName It will create the new db exactly like the template. I think createdb does this by default using the database template1 as the template. My databases are all on

Re: [GENERAL] Advice for "hot-swapping" databases

2008-06-16 Thread Geoffrey
Kynn Jones wrote: Hi. I'm trying to automate the updating of a database. This entails creating the new database from scratch (which takes a long time), under a different name, say mydb_tmp, and once this new database is ready, doing a "hot swap", i.e. renaming the existing database to something

[GENERAL] Advice for "hot-swapping" databases

2008-06-13 Thread Kynn Jones
Hi. I'm trying to automate the updating of a database. This entails creating the new database from scratch (which takes a long time), under a different name, say mydb_tmp, and once this new database is ready, doing a "hot swap", i.e. renaming the existing database to something like mydb_20080613

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-10 Thread Scott Marlowe
On Wed, 2007-01-10 at 00:12, John DeSoi wrote: > On Jan 8, 2007, at 2:11 PM, Ron Mayer wrote: > >> If not postgres, what other database could possibly do this, if > >> any? I > >> really don't want to have to write our own RDBMS. :) > > > > Doesn't seem much like a database question. I'd say a

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-09 Thread John DeSoi
On Jan 8, 2007, at 2:11 PM, Ron Mayer wrote: If not postgres, what other database could possibly do this, if any? I really don't want to have to write our own RDBMS. :) Doesn't seem much like a database question. I'd say ask on some trusted computing (google Trusted Computing) list if y

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-08 Thread David Fetter
On Sat, Jan 06, 2007 at 11:14:42AM +1100, pakt sardines wrote: > >Hi all, > We're currently developing some large-scale software with the > intention of selling it (online and off-the-shelf). The version in > development uses Postgres to store stuff in a number of large > databases. Ignoring

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-08 Thread Ron Mayer
pakt sardines wrote: > ...the big issue for us is > that the data in the databases has significant intellectual property > value. It has taken literally years of work to collect the data. We do > not want the users of the commercial product to be able to fire up > postgres and type something like

Re: [GENERAL] Advice needed on using postgres in commercial product

2007-01-08 Thread Walter Vaughan
pakt sardines wrote: Hi all, We're currently developing some large-scale software with the intention of selling it (online and off-the-shelf). The version in development uses Postgres to store stuff in a number of large databases. Ignoring potential licensing issues for now, the big iss

[GENERAL] Advice needed on using postgres in commercial product

2007-01-08 Thread pakt sardines
Hi all, We're currently developing some large-scale software with the intention of selling it (online and off-the-shelf). The version in development uses Postgres to store stuff in a number of large databases. Ignoring potential licensing issues for now, the big issue for us is that the data

Re: [GENERAL] advice on schema for multilingual text

2006-05-21 Thread Karsten Hilbert
On Sun, May 21, 2006 at 06:55:18PM +0200, Tino Wildenhain wrote: > > I have a website that has multilingual text stored in the database. > > Currently I just have a flat table (lets called it "translations"), one > > row per text item, one column per language. This works OK, for now, but > > I am

Re: [GENERAL] advice on schema for multilingual text

2006-05-21 Thread Tino Wildenhain
Daniel McBrearty wrote: > Hi > > I have a website that has multilingual text stored in the database. > Currently I just have a flat table (lets called it "translations"), one > row per text item, one column per language. This works OK, for now, but > I am looking at a redesign. Mostly I want to ke

Re: [GENERAL] advice on schema for multilingual text

2006-04-09 Thread Michael Glaesemann
On Apr 9, 2006, at 0:31 , Daniel McBrearty wrote: Hi I have a website that has multilingual text stored in the database. Currently I just have a flat table (lets called it "translations"), one row per text item, one column per language. This works OK, for now, but I am looking at a redes

[GENERAL] advice on schema for multilingual text

2006-04-09 Thread Daniel McBrearty
HiI have a website that has multilingual text stored in the database. Currently I just have a flat table (lets called it "translations"), one row per text item, one column per language. This works OK, for now, but I am looking at a redesign. Mostly I want to keep information about the languages in

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-28 Thread Merlin Moncure
On 3/28/06, Alex Turner <[EMAIL PROTECTED]> wrote: > The solution that I have seen typical is to have both webserver and database > machine behind a firewall both NATed, with only HTTP and HTTPS ports open on > the webserver. SSH is not open, as trusted clients connect via the VPN in > the firewal

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Alex Turner
paragraph? Thanks.--Mark-Original Message-From: Ted Byers [mailto:[EMAIL PROTECTED]]Sent: Monday, March 27, 2006 2:54 PMTo: Mark Feller; pgsql-general@postgresql.orgSubject: Re: [Bulk] [GENERAL] General advice on database/webapplications>> I am developing a small web application.  Curren

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread John DeSoi
On Mar 27, 2006, at 4:23 PM, Mark Feller wrote: Maybe a synch is done between webserver database and main database every five minutes, where the main database pulls any new orders, and pushes any updated part lists, pricing etc. to the webserver db? I have implemented a design like this

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Jonel Rienton
On 3/27/06, Merlin Moncure <[EMAIL PROTECTED]> wrote: > > I have not yet implemented the database, and I am VERY reluctant to put the > > full db outside our "main" firewall because of the need to protect sensitive > > this is natural. One solution is to put 2nd nic on the web server > (carefully

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Jonel Rienton
; Sent: Monday, March 27, 2006 2:54 PM > To: Mark Feller; pgsql-general@postgresql.org > Subject: Re: [Bulk] [GENERAL] General advice on database/web > applications > > > > > > I am developing a small web application. Currently, our web server is > > sitting outside ou

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Merlin Moncure
> I have not yet implemented the database, and I am VERY reluctant to put the > full db outside our "main" firewall because of the need to protect sensitive this is natural. One solution is to put 2nd nic on the web server (carefully firewalled) for connections to the database. Theres lots of so

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Mark Feller
Original Message- From: Ted Byers [mailto:[EMAIL PROTECTED] Sent: Monday, March 27, 2006 2:54 PM To: Mark Feller; pgsql-general@postgresql.org Subject: Re: [Bulk] [GENERAL] General advice on database/web applications > > I am developing a small web application. Currently, our web serv

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Joshua D. Drake
Ted Byers wrote: I am developing a small web application. Currently, our web server is sitting outside our firewall (running its own firewall), and the application being developed would let users do things like place orders. My question is...what and where is the database for this? What do

Re: [Bulk] [GENERAL] General advice on database/web applications

2006-03-27 Thread Ted Byers
I am developing a small web application. Currently, our web server is sitting outside our firewall (running its own firewall), and the application being developed would let users do things like place orders. My question is...what and where is the database for this? What do you mean when you

[GENERAL] General advice on database/web applications

2006-03-27 Thread Mark Feller
I am developing a small web application. Currently, our web server is sitting outside our firewall (running its own firewall), and the application being developed would let users do things like place orders. My question is...what and where is the database for this? Do I have a small database on

Re: [GENERAL] Advice on development environment for veritical product[VASCL:A105BF1C720]

2005-10-04 Thread Steve Atkins
On Tue, Oct 04, 2005 at 02:14:28PM -0400, Richmond Dyes wrote: > I am looking to build a commercial application with postgresql as the > backend database. Besides using php for a web interface, what other > development environment would developers advice to use to make a good > secure windows

Re: [GENERAL] Advice on development environment for veritical

2005-10-04 Thread Joshua D. Drake
On Tue, 2005-10-04 at 14:14 -0400, Richmond Dyes wrote: > I am looking to build a commercial application with postgresql as the > backend database. Besides using php for a web interface, what other > development environment would developers advice to use to make a good > secure windows frontend

[GENERAL] Advice on development environment for veritical product[VASCL:A105BF1C720]

2005-10-04 Thread Richmond Dyes
I am looking to build a commercial application with postgresql as the backend database. Besides using php for a web interface, what other development environment would developers advice to use to make a good secure windows frontend with postgresql running either Windows or Linux? ---

Re: [GENERAL] Advice on structure /sequence / trigger

2005-07-02 Thread Greg Stark
David Pratt <[EMAIL PROTECTED]> writes: > Hi Greg. Sorry for getting back to you so late on this. I think your idea on > the design is spot on since it will give me referential integrity with my > other > and the multi-language will just be a simple two field table with id and > multi-dimensiona

Re: [GENERAL] Advice on structure /sequence / trigger

2005-06-30 Thread David Pratt
Hi Greg. Sorry for getting back to you so late on this. I think your idea on the design is spot on since it will give me referential integrity with my other and the multi-language will just be a simple two field table with id and multi-dimensional array of language codes to string. Super idea

Re: [GENERAL] Advice on merging two primary keys...

2005-06-29 Thread Stephan Szabo
On Wed, 29 Jun 2005, Eric D Nielsen wrote: > > Stephan Szabo wrote: > > On Wed, 29 Jun 2005, Richard Huxton wrote: > > > Eric D. Nielsen wrote: > > > > I've come into a situation where I will often need to merge two primary > > > > keys, with numerous foreign keys hanging off of them. For instanc

  1   2   >