Re: [ADMIN] to_date

2006-02-13 Thread Michael Fuhr
On Mon, Feb 13, 2006 at 04:18:30PM -0500, Goulet, Dick wrote: > If your using V7.4 it doesn't but the following will create one. Eh? to_date(text, text) is documented as far back as 7.0, and it certainly works on the 7.4 and 7.3 systems I checked. http://www.postgresql.org/docs/7.4/static/functi

Re: [ADMIN] to_date

2006-02-13 Thread Goulet, Dick
If your using V7.4 it doesn't but the following will create one.   CREATE OR REPLACE FUNCTION to_date(text, text)  RETURNS "timestamp" AS'beginreturn to_timestamp($1, $2);end;'  LANGUAGE 'plpgsql' STABLE STRICT; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim FuSent: M

Re: [ADMIN] Switch log (WAL)

2006-02-13 Thread postgres
Thanks... Mhh too bad. So, that's what I'll do. I'm actually working on a script in order to create a standby database, without even logging to it, and I would like to avoid such a resident program on the master database... So, I'll probably do smth with cron. Here is my actual script : #!/b

Re: [ADMIN] to_date

2006-02-13 Thread Scott Marlowe
On Mon, 2006-02-13 at 15:22, Jim Fu wrote: > Thank you Michael for the info! > > I have the original date info as mmddyy, when I use copy tabname from > filename, it fails due to mismatch between raw date info and date data type > in the database. It seems like I had to convert the raw date info

Re: [ADMIN] to_date

2006-02-13 Thread Jim Fu
Thank you Michael for the info! I have the original date info as mmddyy, when I use copy tabname from filename, it fails due to mismatch between raw date info and date data type in the database. It seems like I had to convert the raw date info to be like '-mm-dd' to match PostgreSQL date de

Re: [ADMIN] to_date

2006-02-13 Thread Michael Fuhr
On Mon, Feb 13, 2006 at 02:44:45PM -0600, Jim Fu wrote: > I am new here, just wondering if PostgreSQL has a similar function > TO_DATE ('02/12/2006','mm/dd/')? Yes: test=> select to_date('02/12/2006','mm/dd/'); to_date 2006-02-12 (1 row) The documentation describes the

Re: [ADMIN] How to VACUUM this table? "998994633 estimated total rows"

2006-02-13 Thread Guido Barosio
So this presents the fact that pg_stattuple should prevent and guess [taking a sample?]  that a table needs an urgent lookup instead of ending the scan and presenting real numbers?g.- On 2/13/06, Chris Browne <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] (Guido Barosio) writes:> quote: " If you are

[ADMIN] to_date

2006-02-13 Thread Jim Fu
I am new here, just wondering if PostgreSQL has a similar function TO_DATE (‘02/12/2006’,’mm/dd/’)?   Thanks!   Jim Fu

Re: [ADMIN] vacuumdb

2006-02-13 Thread Guido Barosio
Hmmm, AFAIK no, but you can get the age of the databases, and guess if you need to issue a vacuum or not.quote from the documentation (www.postgresql.org -> documentation): SELECT datname, age(datfrozenxid) FROM pg_database; The age column measures the number of transactions from the cutof

Re: [ADMIN] vacuumdb

2006-02-13 Thread Jim C. Nasby
On Mon, Feb 13, 2006 at 01:42:06PM -0300, Juliano wrote: > Hi all, > > There is a way to see vacuumdb last running ? If you mean you'd like to know when a vacuum was last run on a table, sadly, there is no way. Though if you're using 8.1 and have autovacuum enabled there may be some way to see wh

Re: [ADMIN] Switch log (WAL)

2006-02-13 Thread Jim C. Nasby
On Sun, Feb 12, 2006 at 11:47:11AM +0100, [EMAIL PROTECTED] wrote: > Hello, > > I'm new to the list, and I'm intereted in PostgreSQL replication (using WAL) > As I didn't find any script to do that, I make mine, that seems to work. > > However, I wonder how can I "switch WAL logs", in order to ha

Re: [ADMIN] Lost tables in Postgres 7.1

2006-02-13 Thread Tom Lane
Steve Burrows <[EMAIL PROTECTED]> writes: > Some of my tables have spontaneously disappeared. They are not visible > in pg_class. vacuuming pg_class (as suggested by Tom Lane for someone > with a similar problem) did not cause them to reappear. Not on 7.1 it wouldn't :-(. That hack is dependent

[ADMIN] vacuumdb

2006-02-13 Thread Juliano
Hi all, There is a way to see vacuumdb last running ? tks-- Juliano

[ADMIN] Lost tables in Postgres 7.1

2006-02-13 Thread Steve Burrows
OK, I know I should be running a later version, but we've been on this since it came out and rebuilding the host is a big deal :( Last time we did it was to move from 6.5 to 7.1 and we had to rebuild the whole server (not the fault of PostgreSQL, just evolution). Some of my tables have spontan

Re: [ADMIN] How to VACUUM this table? "998994633 estimated total rows"

2006-02-13 Thread Chris Browne
[EMAIL PROTECTED] (Guido Barosio) writes: > quote: " If you are quite sure it has few if any dead tuples, it might be > something to try to avoid VACUUMing except as needed to evade the 2^31 > transaction limit..." > You may use the pg_stattuple software, included in the /contrib . This will > sho

Re: [ADMIN] constraint_exclusion on OLTP tables

2006-02-13 Thread Tom Lane
Chris Hoover <[EMAIL PROTECTED]> writes: > The problem I am having is how can you safely move records between > main_table_live and one of the other partition tables? My advice is "don't do that". Partition just based on the year. You can exploit your knowledge about status distribution by creati

[ADMIN] constraint_exclusion on OLTP tables

2006-02-13 Thread Chris Hoover
Has anyone got a working system using the new 8.1 contraint_exclusion partitioning on OLTP tables?Here is my situation.The main system I administer is required by law to keep 7 years of data.  Management wants to keep all 7 years online so the user community can access it whenever they want to.  I

Re: [ADMIN] How to VACUUM this table? "998994633 estimated total rows"

2006-02-13 Thread Guido Barosio
quote: " If you are quite sure it has few if any dead tuples, it might besomething to try to avoid VACUUMing except as needed to evade the 2^31transaction limit..."You may use the pg_stattuple software, included in the /contrib . This will show you the current scenery, and whether you shall clean o

Re: [ADMIN] Need query parameter in logs

2006-02-13 Thread Tsirkin Evgeny
Well I am not a guru ,but maybe you can add raise noticeto your game_state_set_disqualified ?On 2/9/06, Robert Perry < [EMAIL PROTECTED]> wrote:I am trying to help debug a application that is deployed in the field. I suspect that it is sending some unexpected values to somestored procs, but