Re: [GENERAL] [pg_gen] what was the issue with the 8.3.2 bundle ?

2008-07-08 Thread Henry - Zen Search SA
On Tue, July 8, 2008 3:14 am, spellberg_robert wrote: at the risk of ridicule, i don't read release notes online. i read them when i unpack a tarball. Consider yourself ridiculed! :)) I remember years ago (must be 6.x days) moaning about (to the pg people, either in the list, or as an email to

[GENERAL] please explain vacuum with WAL

2008-07-08 Thread Dmitry Melekhov
Hello! I tried to ask this question in novice list. Just because there are no replies I try here. This is really novice question- I'm oracle dba :-) I just installed 8.3 with WAL enabled. But I can't understand why postgres generated many archive logs during vacuum, if WAL is enabled. Could

Re: [GENERAL] [Postgresql 8.2.3] autovacuum starting up even after disabling ?

2008-07-08 Thread Dushyanth
Hi, Tom Lane tgl at sss.pgh.pa.us writes: Dushyanth dushyanth at gmail.com writes: Tom Lane tgl at sss.pgh.pa.us writes: Then the only other possibility is that autovacuum is being launched to prevent XID wraparound. Are there any tables in that database with particularly old

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Simon Riggs
On Tue, 2008-07-08 at 13:09 +0500, Dmitry Melekhov wrote: Hello! I tried to ask this question in novice list. Just because there are no replies I try here. This is really novice question- I'm oracle dba :-) I just installed 8.3 with WAL enabled. But I can't understand why postgres

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Dmitry Melekhov
Simon Riggs пишет: On Tue, 2008-07-08 at 13:09 +0500, Dmitry Melekhov wrote: Hello! I tried to ask this question in novice list. Just because there are no replies I try here. This is really novice question- I'm oracle dba :-) I just installed 8.3 with WAL enabled. But I can't

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Glyn Astill
WAL is the journal for postgres, so every event that happens goes into the WAL. Using it for backup or replication simply uses it to replay all events on the backup / replicated database. - Original Message From: Dmitry Melekhov [EMAIL PROTECTED] To: Simon Riggs [EMAIL PROTECTED]

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Simon Riggs
On Tue, 2008-07-08 at 13:54 +0500, Dmitry Melekhov wrote: What do you mean WAL is enabled? That's not a term I recognize since WAL is always enabled. AFAIK, it can be disabled. May be I'm wrong... Maybe you mean archiving? That *can* be disabled. Best read this

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Dmitry Melekhov
Glyn Astill пишет: WAL is the journal for postgres, so every event that happens goes into the WAL. Using it for backup or replication simply uses it to replay all events on the backup / replicated database. As I thought, thank you. But why vacuum generates WAL ? As I understand all

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Dmitry Melekhov
Simon Riggs пишет: Vacuum performs an essential function and its changes are WAL-logged. Those changes are an essential part of the structure of the database and must be included as part of recovery also. Now I understand. Thank you! -- Sent via pgsql-general mailing list

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Craig Ringer
Dmitry Melekhov wrote: Glyn Astill пишет: WAL is the journal for postgres, so every event that happens goes into the WAL. Using it for backup or replication simply uses it to replay all events on the backup / replicated database. As I thought, thank you. But why vacuum generates WAL ? As

Re: [GENERAL] Query running slow but was running fine before

2008-07-08 Thread Dennis Brakhane
On Tue, Jul 8, 2008 at 12:06 AM, Keaton Adams [EMAIL PROTECTED] wrote: An analyze is run on the tables every day (even several times a day because they are updated very frequently) and a vacuum analyze is run on the weekends. I also tried to run an analyze specifically on the customer_id

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Albe Laurenz
Dmitry Melekhov wrote: I tried to ask this question in novice list. Just because there are no replies I try here. This is really novice question- I'm oracle dba :-) I just installed 8.3 with WAL enabled. But I can't understand why postgres generated many archive logs during vacuum, if

[GENERAL] select command doesnot work

2008-07-08 Thread Long Cui
HI I installed Postgresql 8.3.3 in windows XP, try to input some commands in windows command prompt. The create, update and insert command work all right, just select command.got the error message: more is not internal or external command, not runnable program or bat file. Why did I input like

Re: [GENERAL] select command doesnot work

2008-07-08 Thread A. Kretschmer
am Tue, dem 08.07.2008, um 21:46:53 +1000 mailte Long Cui folgendes: HI I installed Postgresql 8.3.3 in windows XP, try to input some commands in windows command prompt. The create, update and insert command work all right, just select command.got the error message: more is not internal

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Leif B. Kristensen
On Tuesday 8. July 2008, Long Cui wrote: HI I installed Postgresql 8.3.3 in windows XP, try to input some commands in windows command prompt. The create, update and insert command work all right, just select command.got the error message: more is not internal or external command, not

Re: [GENERAL] please explain vacuum with WAL

2008-07-08 Thread Albe Laurenz
Dmitry Melekhov wrote: So, if I have database backup and WAL generated after this backup, I can do recovery, this mean WAL already contains all changes to database, without vacuum. Could you tell me what is wrong in my sentence? VACUUM *is* a change to the database. Yours, Laurenz Albe --

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Bernd Helmle
--On Dienstag, Juli 08, 2008 21:46:53 +1000 Long Cui [EMAIL PROTECTED] wrote: I installed Postgresql 8.3.3 in windows XP, try to input some commands in windows command prompt. The create, update and insert command work all right, just select command.got the error message: more is not

Re: [GENERAL] Query running slow but was running fine before

2008-07-08 Thread Keaton Adams
Good point. But This is a database used to capture logged information, such as success/failure of an operation. Daily tables are rolled up to weekly tables, weekly tables are rolled up to monthly tables. All logged activity are done by inserts, never any updates or deletes, to avoid

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Raymond O'Donnell
On 08/07/2008 13:17, Bernd Helmle wrote: psql uses more to paginate results of your SELECT command. Seems like Is this the case on both Windows and Linux? - that psql uses more for paging, as opposed to doing it itself? Ray.

Re: [GENERAL] Query running slow but was running fine before

2008-07-08 Thread Bill Moran
In response to Keaton Adams [EMAIL PROTECTED]: Good point. But This is a database used to capture logged information, such as success/failure of an operation. Daily tables are rolled up to weekly tables, weekly tables are rolled up to monthly tables. All logged activity are done by

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Leif B. Kristensen
On Tuesday 8. July 2008, Raymond O'Donnell wrote: On 08/07/2008 13:17, Bernd Helmle wrote: psql uses more to paginate results of your SELECT command. Seems like Is this the case on both Windows and Linux? - that psql uses more for paging, as opposed to doing it itself? It uses less on Linux.

Re: [GENERAL] select command doesnot work

2008-07-08 Thread Bernd Helmle
--On Dienstag, Juli 08, 2008 15:12:44 +0200 Leif B. Kristensen [EMAIL PROTECTED] wrote: Is this the case on both Windows and Linux? - that psql uses more for paging, as opposed to doing it itself? It uses less on Linux. Seems to me that less is the default on cygwin, only. For others the

Re: [GENERAL] pg crashing

2008-07-08 Thread Roberts, Jon
Roberts, Jon wrote: Not having looked at the internals of db_link, I'd say it's certainly possible that this is the reason for the failed restart. If db_link is blocking something, the postmaster can't kill it off, and it'll still be sitting there holding a reference to the shared

Re: [GENERAL] [pg_gen] what was the issue with the 8.3.2 bundle ?

2008-07-08 Thread Scott Marlowe
On Mon, Jul 7, 2008 at 7:21 PM, Henry - Zen Search SA [EMAIL PROTECTED] wrote: On Tue, July 8, 2008 3:14 am, spellberg_robert wrote: at the risk of ridicule, i don't read release notes online. i read them when i unpack a tarball. Consider yourself ridiculed! :)) I remember years ago (must

Re: [GENERAL] Query running slow but was running fine before

2008-07-08 Thread Keaton Adams
It looks like the indexes are blown Which may indicate some corruption in the pg_indexes system catalog table? Is there a way to check the integrity of pg_indexes for possible page corruption? Nothing is being reported in the postgresql log file that would indicate there is a corruption

[GENERAL] PG_MODULE_MAGIC lost if strip the object file

2008-07-08 Thread Michael Enke
Hi list, I create a dynamic library with the PG_MODULE_MAGIC under Linux. No problem in normal situation, but if I strip the .o file, that information seems to get lost and I get: ERROR: incompatible library ...so: missing magic block TIP: Extension libraries are required to use the

[GENERAL] Hi there, new here and have question

2008-07-08 Thread Hendra
Hi Everyone. I'm just subscribe to the mailing list I'm new to Postgresql and I have a question I intend to make a function that returns more than a row I tried something like below create function listofemployeebasedondepartment(id_dept int) $$ declare resultset ??; begin select * into

Re: [GENERAL] Quick way to alter a column type?

2008-07-08 Thread Lew
Ow Mun Heng wrote: I want to change a column type from varchar(4) to varchar(5) or should I just use text instead. Eric Bangug wrote: ALTER TABLE tablename ALTER COLUMN columnname TYPE VARCHAR(5); Please post in plain text, not HTML, particularly not HTML with font size=1 It's also both

Re: [GENERAL] PG_MODULE_MAGIC lost if strip the object file

2008-07-08 Thread Alvaro Herrera
Michael Enke wrote: Hi list, I create a dynamic library with the PG_MODULE_MAGIC under Linux. No problem in normal situation, but if I strip the .o file, that information seems to get lost and I get: ERROR: incompatible library ...so: missing magic block TIP: Extension libraries are

[GENERAL] Sign up for PDXPUG PgDay! July 20, 2008

2008-07-08 Thread gabrielle
If you're coming to OSCON, why not come a day early join us for PDXPUG PgDay! http://spreadsheets.google.com/viewform?key=paoTJ9uEi8vIqumUzwzrCAwemail=true Please sign up for free admission to the after-party at the Gotham Tavern, and to reserve a tshirt. We are requesting a $20 donation that

Re: [GENERAL] Hi there, new here and have question

2008-07-08 Thread Asche
Hi Hendra, create function listofemployeebasedondepartment(id_dept int) $$ declare resultset ??; begin select * into resultset from employee where id_dept = id_dept; return resultset; end $$ language 'plpgsql'; I believe you get what I want But I just couldn't finish the code since I

Re: [GENERAL] Hi there, new here and have question

2008-07-08 Thread Asche
Any suggestion everyone? Sorry, i was to fast sending this email out ;-) change the first parameter in the first line to '_id_depth' CREATE OR REPLACE FUNCTION listofemployeebasedondepartment(_id_dept int) RETURNS SETOF employee AS $BODY$ BEGIN RETURN QUERY SELECT *

Re: [GENERAL] PG_MODULE_MAGIC lost if strip the object file

2008-07-08 Thread Tom Lane
Michael Enke [EMAIL PROTECTED] writes: I create a dynamic library with the PG_MODULE_MAGIC under Linux. No problem in normal situation, but if I strip the .o file, that information seems to get lost and I get: ERROR: incompatible library ...so: missing magic block TIP: Extension libraries

[GENERAL] predefined animation and pre-recorded sounds in postgresql

2008-07-08 Thread aravind chandu
Hello,     I just need to load pre-defined animations and pre-recorded sounds in postgresql.Can you please tell how to do this.I appreciate your help. Thank You, Aravind.

Re: [GENERAL] predefined animation and pre-recorded sounds in postgresql

2008-07-08 Thread Raymond O'Donnell
On 08/07/2008 19:44, aravind chandu wrote: I just need to load pre-defined animations and pre-recorded sounds in postgresql.Can you please tell how to do this.I appreciate your help. You need the bytea data type, which lets you store binary data. How you get it in and out

[GENERAL] array sort for varchar arrays?

2008-07-08 Thread Matthew Dennis
I'm likely overlooking something, but I can't seem to find a function to sort a varchar array. Something like select sort('{y,z,x}'::varchar[]) = {'x','y','z'}.

[GENERAL] Happy birthday!

2008-07-08 Thread Nikolay Samokhvalov
If I'm not mistaken 8th July is official birthday of PostgreSQL. 12 years, great! (i'm a bit late here in Russia, but it's OK for US ;-) ) Kudos PostgreSQL! -- Best regards, Nikolay -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] plpgsql - or operator?

2008-07-08 Thread MadHatter
If I have an expression (a or b)a where a=TRUE and b=FALSE, why is b evaluated? Any true operand before an or operator means the entire expression is true . EXAMPLE create or replace function pinsusers() returns trigger as $$ declare msg varchar; begin

Re: [GENERAL] Quick way to alter a column type?

2008-07-08 Thread Ow Mun Heng
On Mon, 2008-07-07 at 02:10 -0400, Lew wrote: Ow Mun Heng wrote: I want to change a column type from varchar(4) to varchar(5) or should I just use text instead. The choice of TEXT for the column would seem to be supported in the PG manual, which stresses that TEXT and VARCHAR are quite

Re: [GENERAL] array sort for varchar arrays?

2008-07-08 Thread Artacus
I'm likely overlooking something, but I can't seem to find a function to sort a varchar array. Something like select sort('{y,z,x}'::varchar[]) = {'x','y','z'}. You've got it right. On Pg 8.3.3 I get SELECT sort(array['z','y','x']) - {x,y,z} -- Sent via pgsql-general mailing list

[GENERAL] Getting source code for database objects

2008-07-08 Thread Artacus
On pgadmin, when you click on a table or function, you get the source code (DDL) to create that table or function. I want to take that and check it into subversion so I have one file for each table, function, view, etc. My question is, how do you get that source code? I've been playing with

Re: [GENERAL] Getting source code for database objects

2008-07-08 Thread Alvaro Herrera
Artacus wrote: On pgadmin, when you click on a table or function, you get the source code (DDL) to create that table or function. I want to take that and check it into subversion so I have one file for each table, function, view, etc. My question is, how do you get that source code?

[GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-08 Thread Jonathan Bond-Caron
I'm been reading up on FOR UPDATE NOWAIT and it looks like it was added in 8.1. How difficult is it to add FOR UPDATE SKIP LOCKED or something similar? (basically skip locked rows / oracle syntax) More background here: http://forge.mysql.com/worklog/task.php?id=3597 It would be quite

Re: [GENERAL] Quick way to alter a column type?

2008-07-08 Thread Richard Broersma
On Tue, Jul 8, 2008 at 8:09 PM, Ow Mun Heng [EMAIL PROTECTED] wrote: It was varchar(4) for a _long_ time until there came a need recently to move it to a 5 characters. Hence the issue, I've already changed it to varchar() instead to make it more open (and less problematic in the future) To

Re: [GENERAL] Feature: FOR UPDATE SKIP LOCKED

2008-07-08 Thread Tom Lane
Jonathan Bond-Caron [EMAIL PROTECTED] writes: It would be quite useful to implement a database queue. Although FOR UPDATE NOWAIT and trying again can work as well as other techniques, just skipping over the locks has its advantages (simplicity and zero wait) And disadvantages, such as

Re: [GENERAL] Getting source code for database objects

2008-07-08 Thread Klint Gore
Artacus wrote: On pgadmin, when you click on a table or function, you get the source code (DDL) to create that table or function. I want to take that and check it into subversion so I have one file for each table, function, view, etc. My question is, how do you get that source code? I've

Re: [GENERAL] array sort for varchar arrays?

2008-07-08 Thread Pavel Stehule
2008/7/8 Matthew Dennis [EMAIL PROTECTED]: I'm likely overlooking something, but I can't seem to find a function to sort a varchar array. Something like select sort('{y,z,x}'::varchar[]) = {'x','y','z'}. create function sort(anyarray) returns anyarray as $$ select array(select $1[i] from

Re: [GENERAL] Getting source code for database objects

2008-07-08 Thread Tino Wildenhain
Artacus wrote: On pgadmin, when you click on a table or function, you get the source code (DDL) to create that table or function. I want to take that and check it into subversion so I have one file for each table, function, view, etc. My question is, how do you get that source code? I've