Re: [GENERAL] setting and using variables in PSQL ????

2007-12-15 Thread Andreas Kretschmer
Gauthier, Dave <[EMAIL PROTECTED]> schrieb: > > > Hi: > > At the PSQL prompt, I want to set some variables based upon query results, or > via static assignment, then insert a record with those values. Sort of > like... You can use this: - define in your postgresql.conf: custom_variable_c

[GENERAL] increasing checkpoint_timeout?

2007-12-15 Thread rihad
http://www.postgresql.org/docs/8.3/static/wal-configuration.html Is it right that checkpoint_timeout means the amount of time up to which you agree to lose data in the event of a power crash? What if I set it to 1 hour (and bump checkpoint_segments accordingly), does it mean that I'm willing t

[GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Sebastien ARBOGAST
I'm trying to start postgreSQL server on my Macbook Pro. I've installed it using packages available here: http://www.kyngchaos.com/wiki/software:postgres But when I try to start up the server running "sudo SystemStarter start PostgreSQL", I get the following message: postgres cannot access the ser

Re: [GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Bill Moran
"Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > I'm trying to start postgreSQL server on my Macbook Pro. I've > installed it using packages available here: > http://www.kyngchaos.com/wiki/software:postgres > But when I try to start up the server running "sudo SystemStarter > start PostgreSQL",

Re: [GENERAL] increasing checkpoint_timeout?

2007-12-15 Thread Scott Marlowe
On Dec 15, 2007 6:51 AM, rihad <[EMAIL PROTECTED]> wrote: > http://www.postgresql.org/docs/8.3/static/wal-configuration.html > > Is it right that checkpoint_timeout means the amount of time up to which > you agree to lose data in the event of a power crash? No, dear god, no. :) Once something is

Re: [GENERAL] increasing checkpoint_timeout?

2007-12-15 Thread Scott Marlowe
Oh, and another point I forgot to mention, is that you'd need to increase checkpoint segments to get a longer time between checkpoints as well. But honestly, do a search on the archives for tuning the background writer, it's a much better option for most workloads. ---(end

Re: [GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Bill Moran
"Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > 2007/12/15, Bill Moran <[EMAIL PROTECTED]>: > > "Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > > > > > I'm trying to start postgreSQL server on my Macbook Pro. I've > > > installed it using packages available here: > > > http://www.kyngchaos.

[GENERAL] query pegs beta4

2007-12-15 Thread Louis-David Mitterrand
This new query of mine pegs beta4, it doesn't return and CPU is at 100%: select l.id_location,l.name, a.city from location l, address a, show_date x, show s, show s2 where (l.id_address = a.id_address

Re: [GENERAL] query pegs beta4

2007-12-15 Thread Tom Lane
Louis-David Mitterrand <[EMAIL PROTECTED]> writes: > This new query of mine pegs beta4, it doesn't return and CPU is at 100%: > select l.id_location,l.name, > a.city > from location l, address a, show_date x, show s, show s2 >

Re: [GENERAL] query pegs beta4

2007-12-15 Thread Louis-David Mitterrand
On Sat, Dec 15, 2007 at 12:39:30PM -0500, Tom Lane wrote: > Louis-David Mitterrand <[EMAIL PROTECTED]> writes: > > This new query of mine pegs beta4, it doesn't return and CPU is at 100%: > > select l.id_location,l.name, > > a.city > > from location l, ad

Re: [GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Sebastien ARBOGAST
Thanks a lot for your help. I managed to figure it out. 2007/12/15, Bill Moran <[EMAIL PROTECTED]>: > "Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > > > 2007/12/15, Bill Moran <[EMAIL PROTECTED]>: > > > "Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > > > > > > > I'm trying to start postgr

Re: [GENERAL] Better alternative for Primary Key then serial??

2007-12-15 Thread Alban Hertroys
On Dec 13, 2007, at 14:12, John D. Burger wrote: Alban Hertroys wrote: The problem the OP is pointing out seems difficult to solve. A sequence doesn't know about existing records with a possibly higher number than the sequence is at. This may be worked around by keeping a list of numbers

[GENERAL] Conditional updateable view

2007-12-15 Thread snacktime
I can't seem to find an example of how to add restrictions to the where clause of an updateable view created via the rule system. For example I don't want the update to complete if a where clause is missing entirely, and in some cases I want to only allow the update if the where clause specifies a

Re: [GENERAL] limits

2007-12-15 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > Hi All. > My question is simple and plain: Are there some limit in the number of > database operations between a BEGIN statement and a COMMIT statement? Yes, there is a command counter that is incremented for every command between BEGIN and COMMIT. It can't exceed 4 bil

[GENERAL] about new feature

2007-12-15 Thread ivo nascimento
Hi everybody, I' m work on a software to create automatic webservices for stored procedure in any language. It's almost like the explain above: have one table pg_plwebservice Have one sp hello, develope in any languages like sql, plpgsql(trusted or untrusted)like for example. The DBA chec

Re: [GENERAL] limits

2007-12-15 Thread Erik Jones
On Dec 15, 2007, at 8:29 PM, Bruce Momjian wrote: [EMAIL PROTECTED] wrote: Hi All. My question is simple and plain: Are there some limit in the number of database operations between a BEGIN statement and a COMMIT statement? Yes, there is a command counter that is incremented for every com

Re: [GENERAL] Transaction isolation and constraints

2007-12-15 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > Hi, Tom: > > >Whichever one manages to get to the index page first will go through. > >The second one will block waiting to see if the first one commits, > >and will error out if so --- or proceed, if it aborts. > > I see, this makes sense. What if the two transactions

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-15 Thread Bruce Momjian
John Wells wrote: > On 12/4/07, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > > Ah sorry, I though you meant de table was dropped or the database was > > deleted. If you actually ran a DELETE FROM on the table, then yes > > they'll all be marked deleted. > > > So, given a database table fil

Re: [GENERAL] 8.3 release notes

2007-12-15 Thread Bruce Momjian
Robert Treat wrote: > > However, neither one of them show what redirect_stderr was renamed to. It > > says something like "... was renamed to foo. redirect_stderr was renamed > > to bar was renamed to ..." > > Yeah, that should get cleaned up. Looks OK now: http://www.postgresql.org