Re: [SQL] archiving or versioning data?

2008-12-16 Thread A. Kretschmer
In response to Louis-David Mitterrand : > Hi, > > I'd like to find a way to archive versions of my data in an elegant and > extensible way. > > When a user modifies certain entries I'd like the database to keep the > previous versions (or a limited, definable number of versions). > Wiki-style. >

[SQL] archiving or versioning data?

2008-12-16 Thread Louis-David Mitterrand
Hi, I'd like to find a way to archive versions of my data in an elegant and extensible way. When a user modifies certain entries I'd like the database to keep the previous versions (or a limited, definable number of versions). Wiki-style. Would that be a good use of postgres' arrays? So I'm lo

Re: [SQL] pg_clog/0202 Error

2008-12-16 Thread Tom Lane
Judith Altamirano writes: > Hello every body I just want to know why is happening this to my data > base I'm doing the following query: > SELECT * FROM pagos where date(fecha_pago) = '2008-12-15'; > It returns the next error: > ERROR: can't find the transaction status 538976288 >

Re: [SQL] Way to eliminate pg_dump activity from pg_stat_all ?

2008-12-16 Thread Erik Jones
I doubt it. From the server's perspective, pg_dump is just a client executing queries. If the db is never used, why are you continually backing it up? On Dec 16, 2008, at 12:55 PM, Bryce Nesbitt wrote: I've got a bunch of tables in a legacy database that I know are never used, and some m

[SQL] Way to eliminate pg_dump activity from pg_stat_all ?

2008-12-16 Thread Bryce Nesbitt
I've got a bunch of tables in a legacy database that I know are never used, and some more I'm not sure about.  So I tried to identify and confirm with: select pg_stat_reset(); -- Wait a long time select * from pg_stat_all_tables where schemaname='public' order by seq_scan,seq_tup_read

[SQL] pg_clog/0202 Error

2008-12-16 Thread Judith Altamirano
Hello every body I just want to know why is happening this to my data base I'm doing the following query: SELECT * FROM pagos where date(fecha_pago) = '2008-12-15'; It returns the next error: ERROR: can't find the transaction status 538976288 DETAIL: can't open file <> not exist fil

Re: [SQL] How can this be legal syntax

2008-12-16 Thread Tom Lane
Alvaro Herrera writes: > Asko Oja escribió: >> I was quite amazed to find that this piece of code actually works while >> reviewing code. >> I would prefer if it gave an error :) > Yeah, me too. As the plpgsql docs say, "The INTO clause can appear almost anywhere in the SQL command". You can wr

Re: [SQL] How can this be legal syntax

2008-12-16 Thread Alvaro Herrera
Asko Oja escribió: > I was quite amazed to find that this piece of code actually works while > reviewing code. > I would prefer if it gave an error :) Yeah, me too. The functions posted by Josh Drake yesterday about constraint exclusion had something like select * from into temp table ...; (temp

[SQL] How can this be legal syntax

2008-12-16 Thread Asko Oja
I was quite amazed to find that this piece of code actually works while reviewing code. I would prefer if it gave an error :) test=# create or replace function test(i_input text) returns text as $$ declare result text; begin SELECT CASE WHEN lower(i_input) ~ '^[a-z]' THEN '