[GENERAL] SELECT in explicit transaction

2008-03-11 Thread Blair Bethwaite
Hi all, I'm wondering whether there would be any extra overhead (CPU, memory, io, etc), above and beyond the implicit ACCESS SHARE, incurred by putting a simple SELECT into a transaction block? Cheers, -Blair -- In science one tries to tell people, in such a way as to be understood by everyone,

Re: [GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Tom Lane
"Kakoli Sen" <[EMAIL PROTECTED]> writes: > Actually, I tried stopping server by 'kill `cat > /opt/pgsql/data/postmaster.pid`. This did not work. So I used kill -9 on Red > Hat 4. Define "did not work" ... what happened exactly? I do not know of any prepackaged Postgres distribution for Red Hat th

Re: [GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Craig Ringer
Kakoli Sen wrote: Hi, Actually, I tried stopping server by 'kill `cat /opt/pgsql/data/postmaster.pid`. This did not work. So I used kill -9 on Red Hat 4. This is a test database where we are in the process of setting up. So it does not have live data. Still I do agree, it was not a good idea. N

Re: [GENERAL] SELECT overhead in explicit transaction

2008-03-11 Thread Tom Lane
"Blair Bethwaite" <[EMAIL PROTECTED]> writes: > I'm wondering whether there would be any extra overhead (CPU, memory, > io, etc), above and beyond the implicit ACCESS SHARE, incurred by > putting a simple SELECT into a transaction block? Every PG command is executed in a transaction, whether expli

Re: [GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Kakoli Sen
Hi, Actually, I tried stopping server by 'kill `cat /opt/pgsql/data/postmaster.pid`. This did not work. So I used kill -9 on Red Hat 4. This is a test database where we are in the process of setting up. So it does not have live data. Still I do agree, it was not a good idea. Now, do I have to re-

Re: [GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Tom Lane
Craig Ringer <[EMAIL PROTECTED]> writes: > Kakoli Sen wrote: >> It was running fine initially and the database was lying idle for a >> few days. Today I looged into the machine and restarted the server by >> killing the process by 'kill -9 pid'. And then restarted it by >> 'postmaster -i -D /opt/pg

[GENERAL] SELECT overhead in explicit transaction

2008-03-11 Thread Blair Bethwaite
Hi all, I'm wondering whether there would be any extra overhead (CPU, memory, io, etc), above and beyond the implicit ACCESS SHARE, incurred by putting a simple SELECT into a transaction block? Cheers, -Blair -- In science one tries to tell people, in such a way as to be understood by everyone,

Re: [GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Craig Ringer
Kakoli Sen wrote: Hello all, It was running fine initially and the database was lying idle for a few days. Today I looged into the machine and restarted the server by killing the process by 'kill -9 pid'. And then restarted it by 'postmaster -i -D /opt/pgsql/data/'. Why did you use `ki

[GENERAL] migration of 7.4 to 8.1

2008-03-11 Thread sathiya psql
Is there any article describing the migration database from postgresql 7.4to 8.1

[GENERAL] Problem with starting PostgreSQL server 7.4.19

2008-03-11 Thread Kakoli Sen
Hello all, It was running fine initially and the database was lying idle for a few days. Today I looged into the machine and restarted the server by killing the process by 'kill -9 pid'. And then restarted it by 'postmaster -i -D /opt/pgsql/data/'. Then it gives the following error on stdou

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Justin
i've had to many sleepless nights rolling back patches on other software to just roll out patches. I'm a wait and see guy on most things. If its security update and the server is exposed to the internet i dig into that right away. Now if patch fixes a problem about data integrity i also dig

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 7:33 PM, Justin <[EMAIL PROTECTED]> wrote: > > > I view updates/patches of any kind like this, if ain't broke don't fix it. > I normally only update computers with security patches only after i prove it > don't destroy installs. But that's juast it. When a postgresql upd

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Greg Smith
On Tue, 11 Mar 2008, Tom Lane wrote: I can tell you that new mysql updates don't get into Fedora, let alone RHEL, till they've been around at least a month or two. That's not laziness on my part; that's the burnt child shunning the fire. That would make a great marketing quote: "Update to t

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Justin
Tom Lane wrote: "Scott Marlowe" <[EMAIL PROTECTED]> writes: I'm really hoping Sun will put a stop to such behavior, but wonder if they'll do anything at all. Sadly, the worst problem with the behavior re mysql releases is that it trains DBAs to NOT install updates. In fairness, I

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > I'm really hoping Sun will put a stop to such behavior, but wonder if > they'll do anything at all. > Sadly, the worst problem with the behavior re mysql releases is that > it trains DBAs to NOT install updates. In fairness, I know quite a > few Oracl

Re: [GENERAL] Relocation error: /usr/lib/libpq.so.5:undefinedsymbol: krb5_cc_get_principal

2008-03-11 Thread Devrim GÜNDÜZ
Hi, On Tue, 2008-03-11 at 14:27 -1000, Tri Quach wrote: > It is RHEL 3. The packages you are installing are for RHEL 4, which won't install on RHEL 3 correctly. Unfortunately, we don't have RHEL 3 - x86_64 packages. Please download: http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fb

Re: [GENERAL] Relocation error: /usr/lib/libpq.so.5: undefinedsymbol: krb5_cc_get_principal

2008-03-11 Thread Devrim GÜNDÜZ
Hi, On Tue, 2008-03-11 at 11:53 -1000, Tri Quach wrote: > Our server is Red Hat Enterprise Linux 4 (64-bit). > > [EMAIL PROTECTED] lm-9.3b-pgsql-linux-rh-enterprise_3]# ^ RHEL 3 or RHEL 4? Regards, -- Devrim GÜNDÜZ , RHCE PostgreSQL Replicati

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Alex Turner
On Tue, Mar 11, 2008 at 3:31 PM, Dann Corbit <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:pgsql-general- > > [EMAIL PROTECTED] On Behalf Of rrahul > > Sent: Tuesday, March 11, 2008 6:48 AM > > To: pgsql-general@postgresql.org > > Subject: [GENER

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 4:22 PM, Greg Smith <[EMAIL PROTECTED]> wrote: > On Tue, 11 Mar 2008, Scott Marlowe wrote: > > > That kind of change does NOT get into production versions of > > postgresql. With a yearly release schedule, postgresql doesn't have > > to put dodgy performance updates in a

Re: [GENERAL] Array load from remote site through Perl/DBI

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 1:09 PM, Gauthier, Dave <[EMAIL PROTECTED]> wrote: > Again, Perl/DBI, remote attach, Running v8.2.0 on Linux Oh, and update NOW. schedule a 5 minute maintenance window and update to 8.2.6 (or if 8.2.7 comes out while this is in transit, that...) -- Sent via pgsql-genera

Re: [GENERAL] Array load from remote site through Perl/DBI

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 1:09 PM, Gauthier, Dave <[EMAIL PROTECTED]> wrote: > > I have a perl/dbi app that loads my DB with sequential and discrete insert > statements. Runs very fast and I'm satisfied with it. Now I have to run > the same app from a different site, but loading my local DB. The "

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Greg Smith
On Tue, 11 Mar 2008, Scott Marlowe wrote: That kind of change does NOT get into production versions of postgresql. With a yearly release schedule, postgresql doesn't have to put dodgy performance updates in a production release. This is worth expanding on: PostgreSQL doesn't put *any* featur

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 12:32 PM, Greg Smith <[EMAIL PROTECTED]> wrote: > > 3] community support > > It's not unheard of for someone who is really having a problem that looks > like a database bug to get one of the core PostgreSQL contributors poking > at their box to figure out what's going o

Re: [GENERAL] Relocation error: /usr/lib/libpq.so.5: undefinedsymbol: krb5_cc_get_principal

2008-03-11 Thread Tri Quach
Hi Devrim, Thank you for your help. Our server is Red Hat Enterprise Linux 4 (64-bit). [EMAIL PROTECTED] lm-9.3b-pgsql-linux-rh-enterprise_3]# uname -a Linux lyris3.k12.hi.us 2.4.21-20.EL #1 SMP Wed Aug 18 20:34:58 EDT 2004 x86_64 x86_64 x86_64 GNU/Linux I uninstalled postgresql 8.2.3 and reins

Re: [GENERAL] Trouble with Savepoints in postgres

2008-03-11 Thread Alvaro Herrera
sam escribió: > Iam not able to understand if this is a version problem or the way iam > using savepoints is wrong.Please advice. It is. You cannot use savepoints in PL/pgSQL functions (or any function for that matter). You can use EXCEPTION clauses instead. -- Alvaro Herrera

Re: [GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread Thomas Kellerer
A. Kretschmer wrote on 11.03.2008 19:50: am Tue, dem 11.03.2008, um 10:51:21 -0700 mailte CaseT folgendes: Hi All, I'm a novice but learning quickly and I'm stumped on how to do this. I need to convert postgres timestamp to date format -mm-dd in a sql statement. pt.created_date below is t

Re: [GENERAL] Trigger to run @ connection time?

2008-03-11 Thread Tom Lane
"Kynn Jones" <[EMAIL PROTECTED]> writes: > If one can set up this insert operation so that it happens automatically > whenever a new connection is made, I'd like to learn how it's done. For manual psql sessions, you can put some setup commands in ~/.psqlrc. In any other context I'm afraid you're s

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Rob Wultsch
On Tue, Mar 11, 2008 at 11:55 AM, Richard Huxton <[EMAIL PROTECTED]> wrote: > People here are bound to prefer PostgreSQL to MySQL, otherwise you'd > find us on a MySQL list. What sort of database were you looking at? On > what operating system? With what hardware? I semi regularly post on the M

Re: [GENERAL] ERROR: text search configuration "pg_catalog.english" does not exist

2008-03-11 Thread Tom Lane
Tim Child <[EMAIL PROTECTED]> writes: > Hi, I am trying to configure Full Text Search on PostgreSQL 8.3 but I > seem to be missing pg_catalog.english as I get the follow when I try > and do this: That's odd ... what *do* you have in pg_ts_config? It should look about like this, in a virgin da

[GENERAL] Trouble with Savepoints in postgres

2008-03-11 Thread sam
Iam not able to use savepoints i postgres. Iam using version 8.2. If i write something like this : CREATE OR REPLACE FUNCTION test_savepoint() RETURNS void AS $BODY$ DECLARE BEGIN SAVEPOINT foo; INSERT INTO table1 VALUES (3); INSERT INTO table1 VALUES (4); ROLLBACK TO foo; COMMIT; E

Re: [GENERAL] Trigger to run @ connection time?

2008-03-11 Thread Andrej Ricnik-Bay
On 12/03/2008, Kynn Jones <[EMAIL PROTECTED]> wrote: > If one can set up this insert operation so that it happens automatically > whenever a new connection is made, I'd like to learn how it's done. But if > not, then I don't see how performing the insert "manually" every time one > connects would

Re: [GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread Tom Lane
Vivek Khera <[EMAIL PROTECTED]> writes: > On Mar 11, 2008, at 2:50 PM, A. Kretschmer wrote: i.e ... WHERE pt.created_date >= '2008-01-21' >> >> You can't compare a date or timestamp to a varchar or text. For your >> example, cast the date-string to a real date like: > Since which version of

Re: [GENERAL] Array load from remote site through Perl/DBI

2008-03-11 Thread Colin Wetherbee
Gauthier, Dave wrote: I have a perl/dbi app that loads my DB with sequential and discrete insert statements. Runs very fast and I’m satisfied with it. Now I have to run the same app from a different site, but loading my local DB. The “one at a time” inserts take too long, probably because of

Re: [GENERAL] simple UPDATE statement...

2008-03-11 Thread Justin
you need to strip the string apart using either regex which is difficult to use or split_part() http://www.postgresql.org/docs/8.3/interactive/functions-string.html The update will look something like this... Update customer set custfirstname = split_part(Name, ' ', 1) , custmiddlename = spl

Re: [GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread Vivek Khera
On Mar 11, 2008, at 2:50 PM, A. Kretschmer wrote: i.e ... WHERE pt.created_date >= '2008-01-21' You can't compare a date or timestamp to a varchar or text. For your example, cast the date-string to a real date like: Since which version of Pg? Queries like the above have worked for me from

[GENERAL] Array load from remote site through Perl/DBI

2008-03-11 Thread Gauthier, Dave
I have a perl/dbi app that loads my DB with sequential and discrete insert statements. Runs very fast and I'm satisfied with it. Now I have to run the same app from a different site, but loading my local DB. The "one at a time" inserts take too long, probably because of the client/server delays i

[GENERAL] simple UPDATE statement...

2008-03-11 Thread Joshua
Hello, I have a quick questions... consider the following information: I have a table 'customers' which looks like the following: firstname | middlename ---|-- Johnathan C Mark S Joshua Susan T Jennifer Marcus D Mike G

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Greg Smith
On Tue, 11 Mar 2008, rrahul wrote: I waned you people you post your views on the following comparision points 1] Performance 2] Scalablity 4] Speed 6] robustness These are all covered in more detail that you probably want at http://www.postgresql.org/docs/techdocs.83 The quick summary is th

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of rrahul > Sent: Tuesday, March 11, 2008 6:48 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] postgre vs MySQL > > > Hi, > > I am a database professional but have never used Po

Re: [GENERAL] ERROR: text search configuration "pg_catalog.english" does not exist

2008-03-11 Thread Richard Huxton
Tim Child wrote: Hi, I am trying to configure Full Text Search on PostgreSQL 8.3 but I seem to be missing pg_catalog.english as I get the follow when I try and do this: tsvector_update_trigger(body_tsv, 'pg_catalog.english', notes); Error: ERROR: text search configuration "pg_catalog.eng

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Scott Marlowe
On Tue, Mar 11, 2008 at 6:47 AM, rrahul <[EMAIL PROTECTED]> wrote: > > Hi, > > I am a database professional but have never used Postgre. My client was > exploring the posiblity of using Postgre instead of Mysql and wnated to know > the comments from the community. > I waned you people you post

Re: [GENERAL] postgre vs MySQL

2008-03-11 Thread Richard Huxton
rrahul wrote: Hi, I am a database professional but have never used Postgre. PostgreSQL, or Postgres rather than Postgre. > My client was exploring the posiblity of using Postgre instead of Mysql and wnated to know the comments from the community. I waned you people you post your views on th

Re: [GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread A. Kretschmer
am Tue, dem 11.03.2008, um 10:51:21 -0700 mailte CaseT folgendes: > Hi All, > > I'm a novice but learning quickly and I'm stumped on how to do this. > > I need to convert postgres timestamp to date format -mm-dd in a > sql statement. > pt.created_date below is timestamp format > > i.e ... W

Re: [GENERAL] Trigger to run @ connection time?

2008-03-11 Thread Kynn Jones
On Mon, Mar 10, 2008 at 7:47 PM, Alban Hertroys < [EMAIL PROTECTED]> wrote: > > You can't define triggers on system tables. > Oh, well... :-/ Thanks for the reality check! > If not, is there some other way to set up a trigger that > Oops. I guess a cut-and-paste error in my original message m

Re: [GENERAL] contributing patches

2008-03-11 Thread Robert Haas
I have to dig this up and see if I still have it. ...Robert -Original Message- From: Bruce Momjian [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2008 1:05 PM To: Robert Haas Cc: Tom Lane; pgsql-general@postgresql.org Subject: Re: [GENERAL] contributing patches Great, would you ple

[GENERAL] postgre vs MySQL

2008-03-11 Thread rrahul
Hi, I am a database professional but have never used Postgre. My client was exploring the posiblity of using Postgre instead of Mysql and wnated to know the comments from the community. I waned you people you post your views on the following comparision points 1] Performance 2] Scalablity 3] com

[GENERAL] ERROR: text search configuration "pg_catalog.english" does not exist

2008-03-11 Thread Tim Child
Hi, I am trying to configure Full Text Search on PostgreSQL 8.3 but I seem to be missing pg_catalog.english as I get the follow when I try and do this: ALTER TABLE useraccounts_contact ADD COLUMN notes_tsv tsvector; CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON useraccounts_conta

Re: [GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread Adam Rich
> I need to convert postgres timestamp to date format -mm-dd in a > sql statement. > pt.created_date below is timestamp format > > i.e ... WHERE pt.created_date >= '2008-01-21' > > Any help would be greatly appreciated. Try this: WHERE pt.created_date >= '2008-01-21'::date -- Sent v

Re: [GENERAL] basic plpgsql / sql funtion question

2008-03-11 Thread A. Kretschmer
am Tue, dem 11.03.2008, um 12:26:49 -0500 mailte Joshua folgendes: > Hello, > > I have a series of SQL Update statements. I would like to write a > function which runs all of the SQL Update statements one at a time, in > order from top to bottom. Can somebody share the basic syntax that I > wo

[GENERAL] How to convert postgres timestamp to date: yyyy-mm-dd

2008-03-11 Thread CaseT
Hi All, I'm a novice but learning quickly and I'm stumped on how to do this. I need to convert postgres timestamp to date format -mm-dd in a sql statement. pt.created_date below is timestamp format i.e ... WHERE pt.created_date >= '2008-01-21' Any help would be greatly appreciated. Thanks

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Mon, Mar 10, 2008 at 12:28 PM, Craig Ringer <[EMAIL PROTECTED]> wrote: > > Personally I use vim to comment out small blocks. However, this is > rarely required as I break my SQL up into logical chunks in separate > files. I should get into that habit in any case. Thanks for pointing it out.

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Tue, Mar 11, 2008 at 10:10 AM, Gurjeet Singh <[EMAIL PROTECTED]> wrote: > The SQL standard, and Postgres, allow you to nest comments; some > commercial RDBMS' do not provide this, and hence people think it's not > possible in SQL. > Ah! Finally I see what Martin was getting at in his reply.

Re: [GENERAL] message contents do not agree with length in message type "T"

2008-03-11 Thread Mike
Thanks Tom, That's definitely it- I've got a global database object that's used throughout my application, it looks like I missed one crucial mutex lock in the database code. Thanks again, Mike -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2008 10:

Re: [GENERAL] split pg_dumpall backups per database

2008-03-11 Thread Andrej Ricnik-Bay
On 11/03/2008, Luca Ferrari <[EMAIL PROTECTED]> wrote: > Hi all, > is it possible to instrument pg_dumpall to produce separate sql files for > each > database it is going to backup? I'd like to keep separate backups of my > databases, but using pg_dump can lead to forgetting a database. Yo

[GENERAL] basic plpgsql / sql funtion question

2008-03-11 Thread Joshua
Hello, I have a series of SQL Update statements. I would like to write a function which runs all of the SQL Update statements one at a time, in order from top to bottom. Can somebody share the basic syntax that I would need to write the aforementioned function? Please let me know. Thanks -

[GENERAL] Normalizing denormalization with materialized views

2008-03-11 Thread Robert James
When forced to denormalize for performance reasons, how do you ensure data integrity? I like to, instead of denormalizing, use materialized views, which offer lots of the same benefits without the costs. Yet, in Postgres they're only experimental add-ons, not to be relied on for production use. I

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Kynn Jones
On Tue, Mar 11, 2008 at 7:17 AM, Sam Mason <[EMAIL PROTECTED]> wrote: > > I'm not quite sure if this would help your use case, but a few editors > allow you to send blocks of text to other processes. For example, under > Emacs I can hit Ctrl+C twice and it will grab the current paragraph > and se

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Gauthier, Dave
The renames go very fast. It's one of the main reasons I like it. I run them manually, so I can say for certain that they have not failed "mid stream" where "midstream" seems to take under a second. -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 20

Re: [GENERAL] PostgreSQL and MOLAP ?

2008-03-11 Thread Tomás Di Doménico
Joe Conway wrote: > Kevin Kempter wrote: >> Anyone know of any MOLAP/MDDB/MDX Business Intelligence reporting >> solutions tahat work on top of PostgreSQL ? >> > > I haven't used it myself, but you could check out Mondrian: > http://sourceforge.net/projects/mondrian/ > > HTH > > Joe > And fo

Re: [GENERAL] contributing patches

2008-03-11 Thread Bruce Momjian
Great, would you please end your truncate patch to the patches email list? Thanks. --- Robert Haas wrote: > > We require that all submissions conform to the Postgres BSD license, > > but we are not picky about requiring pap

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Gauthier, Dave wrote: >> I'm running 8.2.0 on Linux. > It's not turned on by default (and it's not on 8.2), so it's probably > not vacuuming anything. On 8.2 there are enough protections that this > shouldn't be the actual problem though -- as soon a

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Richard Huxton
Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: Gauthier, Dave wrote: Trying (and failing) to attach to my DBs. Getting... database "foo_standby" has disappeared form pg_database DETAIL: Database OID 2323523 now seems to belong to "foo" Hmm - if a shutdown + restart fixed it, I'm

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Alvaro Herrera
Gauthier, Dave wrote: > I'm running 8.2.0 on Linux. You should be running 8.2.6. > The postgres.conf has... > >#autovacuum = off > > (commented out) which lead me to believe that by default, it's on. And > I'm assuming that it's vacumming the system tables. Are these > assumptions right

Re: [GENERAL] On defining Perl functions within PLPERL code

2008-03-11 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I thought this claim needs further clarification, since the docs for PLPERL > include a warning that may give readers the impression that defining Perl > functions within PLPERL code is somehow problematic. This warning says: Well, it /is/ p

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Gauthier, Dave wrote: >>> Trying (and failing) to attach to my DBs. Getting... >>> database "foo_standby" has disappeared form pg_database >>> DETAIL: Database OID 2323523 now seems to belong to "foo" > Hmm - if a shutdown + restart fixed it, I'm wonde

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Gauthier, Dave
I'm running 8.2.0 on Linux. The postgres.conf has... #autovacuum = off (commented out) which lead me to believe that by default, it's on. And I'm assuming that it's vacumming the system tables. Are these assumptions right? Thanks -dave -Original Message- From: [EMAIL PROTECTED]

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Richard Huxton
Gurjeet Singh wrote: If your sole objective is to comment out large chunks of SQL code, which in turn may have multi-line comments, then the simplest trick is to comment them using /* multi-line */ itself! The SQL standard, and Postgres, allow you to nest comments; some commercial RDBMS' do not

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Richard Huxton
Gauthier, Dave wrote: I tried vacuum pg_database, no luck. I shut down and restarted the DB and it seems to have fixed the problem. Still, not sure why it happened in the first place or how to prevent it in the future. > Trying (and failing) to attach to my DBs. Getting... > > database "fo

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Tom Lane
"Gauthier, Dave" <[EMAIL PROTECTED]> writes: > I tried vacuum pg_database, no luck. I shut down and restarted the DB > and it seems to have fixed the problem. Still, not sure why it happened > in the first place or how to prevent it in the future. My recollection is that that's a symptom of la

Re: [GENERAL] how do you write aggregate function

2008-03-11 Thread Justin
thanks it now takes 806 ms Martijn van Oosterhout wrote: On Mon, Mar 10, 2008 at 10:01:47AM -0500, Justin wrote: i wish that could work but need to keep track of the individual weights as its a percentage of the total amount of the weight. Unless you have a different meaning of wei

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Gurjeet Singh
On Mon, Mar 10, 2008 at 9:20 PM, Kynn Jones <[EMAIL PROTECTED]> wrote: > > > > Hi! When it comes to programming SQL, my newbie approach is to write my > code in a file test.sql, which I test from within psql by using > > my_db=> \i /some/path/test.sql > > ...and (once I'm satisfied with the cod

Re: [GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Gauthier, Dave
I tried vacuum pg_database, no luck. I shut down and restarted the DB and it seems to have fixed the problem. Still, not sure why it happened in the first place or how to prevent it in the future. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [GENERAL] pg_type.relacl

2008-03-11 Thread Roberts, Jon
Thanks for the tips. I was able to use array_to_string and then use split_part a bunch to split out the grantor, grantee, and each of the grants into separate columns. I really didn't see any documentation on aclitm[]. Generating a report showing who has rights to what is little bit harder than

[GENERAL] Database OID xxxxx now seems to belong to "foo"

2008-03-11 Thread Gauthier, Dave
Hi: Trying (and failing) to attach to my DBs. Getting... database "foo_standby" has disappeared form pg_database DETAIL: Database OID 2323523 now seems to belong to "foo" I have 2 dbs... foo and foo_standby. Every midnight, I truncate foo_standby and load it up with all the cur

[GENERAL] list user created triggers

2008-03-11 Thread sathiya psql
hi, how to find trigger names in my database ? using psql 7.4 the following query shows system triggers, i want only to list the triggers created by me select relname, tgname, tgtype, proname, prosrc, tgisconstraint, tgconstrname, tgconstrrelid, tgdeferrable, tginitdeferred, tgnargs, tgattr, tg

Re: [GENERAL] PostgreSQL and MOLAP ?

2008-03-11 Thread André Volpato
Joe Conway escreveu: Kevin Kempter wrote: Anyone know of any MOLAP/MDDB/MDX Business Intelligence reporting solutions tahat work on top of PostgreSQL ? I haven't used it myself, but you could check out Mondrian: http://sourceforge.net/projects/mondrian/ I did... and it works fine. :) Try

Re: [GENERAL] ISO something like "#if 0 ... #endif" for SQL code

2008-03-11 Thread Sam Mason
On Mon, Mar 10, 2008 at 10:50:26AM -0500, Kynn Jones wrote: > Hi! When it comes to programming SQL, my newbie approach is to write my > code in a file test.sql, which I test from within psql by using > > my_db=> \i /some/path/test.sql > > ...and (once I'm satisfied with the code) copy and past

Re: [GENERAL] gsoc ideas

2008-03-11 Thread longlong
i see. now i know that COPY with STDIN/OUT can do what i mentioned before exactly. 2008/3/11, Richard Huxton <[EMAIL PROTECTED]>: > > longlong wrote: > > your words are a great encouragement to me! > > > > i am embarrassed by my English and i will improve it. > > > > maybe i missed something that

Re: [GENERAL] split pg_dumpall backups per database

2008-03-11 Thread hubert depesz lubaczewski
On Tue, Mar 11, 2008 at 09:54:47AM +0100, Luca Ferrari wrote: > Hi all, > is it possible to instrument pg_dumpall to produce separate sql files for > each > database it is going to backup? I'd like to keep separate backups of my > databases, but using pg_dump can lead to forgetting a database...

Re: [GENERAL] gsoc ideas

2008-03-11 Thread Richard Huxton
longlong wrote: your words are a great encouragement to me! i am embarrassed by my English and i will improve it. maybe i missed something that makes you a little misunderstand in point 3. what i want is data-copys between databases automatically processed by program. and databases may be not i

Re: [GENERAL] split pg_dumpall backups per database

2008-03-11 Thread Richard Huxton
Luca Ferrari wrote: Hi all, is it possible to instrument pg_dumpall to produce separate sql files for each database it is going to backup? I'd like to keep separate backups of my databases, but using pg_dump can lead to forgetting a database. You could build a shell script to repeatedly c

Re: [GENERAL] pgsql configuration

2008-03-11 Thread Albe Laurenz
> today I had a problem with postgresql.conf file, i remove it > from my local home, any of you know if there is some security > copy of it somewhere or if there is some how to recover it? > the guy who did the configuration is not working at my office > any more and i don't know is he change

Re: [GENERAL] Reindexdb + relation error

2008-03-11 Thread frant101
On Mar 10, 8:57 pm, [EMAIL PROTECTED] (Tom Lane) wrote: > [EMAIL PROTECTED] writes: > > I am trying to reindex some indexes through a batch script.  for > > example > > Database : hermes > > Schema : sc1 > > Indexes : ind1 > > when i use reindexdb with the following switches > >  ./reindexdb --inde

[GENERAL] split pg_dumpall backups per database

2008-03-11 Thread Luca Ferrari
Hi all, is it possible to instrument pg_dumpall to produce separate sql files for each database it is going to backup? I'd like to keep separate backups of my databases, but using pg_dump can lead to forgetting a database. Thanks, Luca -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] how do you write aggregate function

2008-03-11 Thread Martijn van Oosterhout
On Mon, Mar 10, 2008 at 10:01:47AM -0500, Justin wrote: > i wish that could work but need to keep track of the individual weights > as its a percentage of the total amount of the weight. Unless you have a different meaning of weighted average to me, I don't think you do. AFAIK this would produc