Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-14 Thread Scott Marlowe
On Thu, Mar 13, 2008 at 10:45 AM, Dean Gibson (DB Administrator) 1. What SCHEMAs are these DBs in? Perhaps a search_path issue (I haven't followed all of this thread, so perhaps this has been mentioned). Tis the other way round I'm afriad. Schemas live in dbs, not the other way around.

[GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread Ow Mun Heng
query is something like this Select * from v_test where acode Like 'PC%' and rev = '0Q' and hcm = '1' and mcm = 'K' where acode, rev, hcm, mcm are all indexes. Currently this query is only using the rev and mcm for the bitmapAND. it then does a

Re: [GENERAL] tsearch2 word separators

2008-03-14 Thread Oleg Bartunov
On Thu, 13 Mar 2008, Sushant Sinha wrote: A document may contain date in the traditional format. For example it may contain '11/1/2007'. It will be useful if we can directly search for year in a document. However, the 'default' tsearch2 parser does not break down integers separated by '/'. So

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread Scott Marlowe
On Fri, Mar 14, 2008 at 12:28 AM, Ow Mun Heng [EMAIL PROTECTED] wrote: query is something like this Select * from v_test where acode Like 'PC%' and rev = '0Q' and hcm = '1' and mcm = 'K' where acode, rev, hcm, mcm are all indexes.

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread A. Kretschmer
am Fri, dem 14.03.2008, um 14:28:15 +0800 mailte Ow Mun Heng folgendes: query is something like this Select * from v_test where acode Like 'PC%' and rev = '0Q' and hcm = '1' and mcm = 'K' where acode, rev, hcm, mcm are all indexes. Currently

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Aarni Ruuhimäki
Hi, This has been a very interesting thread indeed. I think the popularity of any Big Name $oftware with a 'nice' price tag has also something to do with the fear of taking responsibility for your own actions and decisions. With a Big Name you can always blame them if something goes wrong

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread Ow Mun Heng
On Fri, 2008-03-14 at 00:50 -0600, Scott Marlowe wrote: On Fri, Mar 14, 2008 at 12:28 AM, Ow Mun Heng [EMAIL PROTECTED] wrote: query is something like this Select * from v_test where acode Like 'PC%' and rev = '0Q' and hcm = '1' and

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread Ow Mun Heng
On Fri, 2008-03-14 at 07:53 +0100, A. Kretschmer wrote: am Fri, dem 14.03.2008, um 14:28:15 +0800 mailte Ow Mun Heng folgendes: query is something like this Select * from v_test where acode Like 'PC%' and rev = '0Q' and hcm = '1' and mcm = 'K'

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread A. Kretschmer
am Fri, dem 14.03.2008, um 15:06:56 +0800 mailte Ow Mun Heng folgendes: On Fri, 2008-03-14 at 07:53 +0100, A. Kretschmer wrote: am Fri, dem 14.03.2008, um 14:28:15 +0800 mailte Ow Mun Heng folgendes: query is something like this Select * from v_test where acode Like

Re: [GENERAL] forcing use of more indexes (bitmap AND)

2008-03-14 Thread Ow Mun Heng
On Fri, 2008-03-14 at 08:26 +0100, A. Kretschmer wrote: am Fri, dem 14.03.2008, um 15:06:56 +0800 mailte Ow Mun Heng folgendes: On Fri, 2008-03-14 at 07:53 +0100, A. Kretschmer wrote: am Fri, dem 14.03.2008, um 14:28:15 +0800 mailte Ow Mun Heng folgendes: query is something like

[GENERAL] PG secure for financial applications ...

2008-03-14 Thread Micah Yoder
Just curious, would PostgreSQL be considered secure for applications involving financial matters where the clients have a direct database logon? First, to clarify, I'm not in a serious position to write such an application. I'm just wondering. :-) If it is possible, I may make a proof of

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread jose javier parra sanchez
itself open source, you have to pay to get a license. Pay for GPL software? You cannot be serious, GPL has no relation with monetary value. The GPL is a 'Usage License'. If i write GPL software to my clients, should i give it free of charge ?. That's absurd. -- Sent via pgsql-general

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Magnus Hagander
On Thu, Mar 13, 2008 at 08:08:27PM -0400, Tom Lane wrote: Andrej Ricnik-Bay [EMAIL PROTECTED] writes: On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: I see Mysql bosting for Google,Yahoo, Alcatel.. What about Postgres the list is not that impressive. What then? Could it be marketing

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Pavan Deolasee
On Fri, Mar 14, 2008 at 5:19 AM, Clodoaldo [EMAIL PROTECTED] wrote: Try vacuuming pg_class, pg_index, pg_attribute manually and see if that makes the problem go away. It does not go away. Can it be a case where some other open transaction is holding a lock on the table ? Note that

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Magnus Hagander
On Fri, Mar 14, 2008 at 02:29:07AM +0100, Ivan Sergio Borgonovo wrote: On Thu, 13 Mar 2008 20:08:27 -0400 Tom Lane [EMAIL PROTECTED] wrote: Andrej Ricnik-Bay [EMAIL PROTECTED] writes: On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: I see Mysql bosting for Google,Yahoo, Alcatel..

[GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Enrico Sirola
Hello, I'm trying to perform some benchmarks using pgbench. I'm using the following rpm package: postgresql-contrib-8.3.0-2PGDG.rhel5 for x86_64, downloaded from the pgsql yum repository for centos5/amd64. When I init the pgbench database, the scale factor seems to work, however when

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Pavan Deolasee
On Fri, Mar 14, 2008 at 2:34 PM, Enrico Sirola [EMAIL PROTECTED] wrote: as you see, the reported scaling factor is 1, but I specified -s 1000, which seems strange... I'm going to recompile it from the sources now. Didn't I get anything or there is a bug somewhere? You must have

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Gurjeet Singh
On Thu, Mar 13, 2008 at 6:06 PM, rrahul [EMAIL PROTECTED] wrote: Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. I wouldn't comment on that, but having read so much about MySQL in Postgres'

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Clodoaldo
2008/3/14, Scott Marlowe [EMAIL PROTECTED]: On Thu, Mar 13, 2008 at 5:49 PM, Clodoaldo [EMAIL PROTECTED] wrote: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió:

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Clodoaldo
2008/3/14, Pavan Deolasee [EMAIL PROTECTED]: On Fri, Mar 14, 2008 at 5:19 AM, Clodoaldo [EMAIL PROTECTED] wrote: Try vacuuming pg_class, pg_index, pg_attribute manually and see if that makes the problem go away. It does not go away. Can it be a case where some other

Re: [GENERAL] PG secure for financial applications ...

2008-03-14 Thread Albe Laurenz
Micah Yoder wrote: Just curious, would PostgreSQL be considered secure for applications involving financial matters where the clients have a direct database logon? I'd say that an application where clients have a database login and can perform arbitrary SQL statements is not very robust and

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Leif B. Kristensen
On Friday 14. March 2008, Adrian Klaver wrote: Years ago I played around with MySQL because that was what everybody was using. The problem was it did not do what I wanted and Postgres did. That pretty much sums up my experiences too. Back in 2002 when I started fooling around with databases,

[GENERAL] GRANT giving error on sequence in 7.4.19

2008-03-14 Thread Kakoli Sen
Hello all, I'm giving the query GRANT ALL PRIVILEGES ON SEQUENCE object_seq TO tester; ERROR: syntax error at or near object_seq at character 34. \ds is listing out the sequence. Regards, Kakoli KAKOLI SEN

Re: [GENERAL] PG secure for financial applications ...

2008-03-14 Thread paul rivers
Micah Yoder wrote: Just curious, would PostgreSQL be considered secure for applications involving financial matters where the clients have a direct database logon? First, to clarify, I'm not in a serious position to write such an application. I'm just wondering. :-) If it is possible, I

[GENERAL] Blobs

2008-03-14 Thread Marc Horvath
I was wondering if anyone had any working sample code of inserting a blob into a table and then retrieving one from a table for viewing? I'm using Postgres 8.2, the jdbc is postgresql-8.2-504.jdbc3, and the Java is 1.6. I'm also running on a Windows XP Pro box if that matters. Thanks, Marc

Re: [GENERAL] Please Help! Was: Multithread problem: Error in transaction processing

2008-03-14 Thread Leif Jensen
Hi, I will have to try again. I know that I was probably not specific enough in my first attempt. The systems on which we have tested and are getting the error: - PostgreSQL 8.2.4 (also tried 8.2.6 without db upgrade) configured with 'enable_thread_safety'. - Linux Slackware 10.2.0

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

2008-03-14 Thread Marko Kreen
On 3/14/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: On Thu, Mar 13, 2008 at 2:18 PM, Marko Kreen [EMAIL PROTECTED] wrote: On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: An application which uses tsearch2 ('SELECT set_curdict() / set_curcfg()' being called upon session

Re: [GENERAL] Blobs

2008-03-14 Thread Thomas Kellerer
Marc Horvath, 14.03.2008 12:35: I was wondering if anyone had any working sample code of inserting a blob into a table and then retrieving one from a table for viewing? I’m using Postgres 8.2, the jdbc is postgresql-8.2-504.jdbc3, and the Java is 1.6. I’m also running on a Windows XP Pro

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Ivan Sergio Borgonovo
On Fri, 14 Mar 2008 10:28:37 +0100 Magnus Hagander [EMAIL PROTECTED] wrote: I still find impressing that Google uses MySQL... I can guess why, What makes you so sure Google don't use PostgreSQL *as well*? I'm not sure... in fact I never excluded they could use pg for other stuff... They may

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Alvaro Herrera
Clodoaldo escribió: Postgresql was restarted twice, but yes, it is as if the crash left some kind of permanent lock somewhere. A prepared transaction perhaps? SELECT * FROM pg_prepared_xacts; A quick look into pg_locks should tell you if it's blocking. -- Alvaro Herrera

Re: [GENERAL] PG secure for financial applications ...

2008-03-14 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 14 Mar 2008 02:00:39 -0600 Micah Yoder [EMAIL PROTECTED] wrote: Maybe it's nuts to consider such a setup (and if you're talking a major bank it probably is) ... and maybe not. At this point it's kind of a mental exercise. :-) If you

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Clodoaldo
2008/3/14, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: Postgresql was restarted twice, but yes, it is as if the crash left some kind of permanent lock somewhere. A prepared transaction perhaps? SELECT * FROM pg_prepared_xacts; A quick look into pg_locks should tell you if

[GENERAL] LOCK TABLE HELP

2008-03-14 Thread luca . ciciriello
Sponsor: Una BMW Z4 Roadster a 10€? Prova gratis su Bidplaza.it! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7673d=20080314

Re: [GENERAL] GRANT giving error on sequence in 7.4.19

2008-03-14 Thread Adrian Klaver
On Friday 14 March 2008 4:19 am, Kakoli Sen wrote: Hello all, I'm giving the query GRANT ALL PRIVILEGES ON SEQUENCE object_seq TO tester; ERROR: syntax error at or near object_seq at character 34. \ds is listing out the sequence. Regards, Kakoli Try: GRANT ALL PRIVILEGES ON

Re: [GENERAL] PG secure for financial applications ...

2008-03-14 Thread paul rivers
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 14 Mar 2008 02:00:39 -0600 Micah Yoder [EMAIL PROTECTED] wrote: Maybe it's nuts to consider such a setup (and if you're talking a major bank it probably is) ... and maybe not. At this point it's kind of a mental

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Alvaro Herrera
Clodoaldo escribió: 2008/3/14, Alvaro Herrera [EMAIL PROTECTED]: A quick look into pg_locks should tell you if it's blocking. pg_prepared_xacts is empty and pg_locks has 288 rows: # select locktype, mode, count(*) as total from pg_locks group by locktype, mode; locktype|

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi All. I#39;m using for the first time the postgres lock utilities, but brobably I#39;m doing something of not legal.My action are:void *Execute(void *pParam){ nbsp;nbsp;

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 7:22 AM, Ivan Sergio Borgonovo wrote: Still I'd be curious to know if people can scale pg to several hundreds(?) machines without loosing the features that differentiate it from other DB... Jan Weick wrote Slony which was released by Affilias who runs the top- level

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 3:26 AM, jose javier parra sanchez wrote: itself open source, you have to pay to get a license. Pay for GPL software? You cannot be serious, GPL has no relation with monetary value. The GPL is a 'Usage License'. If i write GPL software to my clients, should i give it

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Tom Lane
Pavan Deolasee [EMAIL PROTECTED] writes: On Fri, Mar 14, 2008 at 2:34 PM, Enrico Sirola [EMAIL PROTECTED] wrote: as you see, the reported scaling factor is 1, but I specified -s 1000, You must have initialized pgbench with scale 1. Yeah, -s is only meaningful when given with -i. Maybe

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

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 7:17 AM, Marko Kreen wrote: To put it to core Postgres, it needs to be conceptually sane first, without needing ugly workarounds to avoid it bringing whole db down. I can see ATM only few ways: - Applies only to non-superusers. - Error from CONNECT trigger does not

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread Craig Ringer
[EMAIL PROTECTED] wrote: Well, all this doesn't work (the connection is the always the same in all methods and functions). I do not understand this statement. There are some other things you could mention that might help: Why do you need these table level locks - what are you trying to

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Alvaro Herrera
Gurjeet Singh escribió: I wouldn't comment on that, but having read so much about MySQL in Postgres' lists, I sure have a disliking for MySQL, so much so that I haven't bothered even downloading and installing it even once!!! I have downloaded the source at different periods of time. The

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Gurjeet Singh escribió: I wouldn't comment on that, but having read so much about MySQL in Postgres' lists, I sure have a disliking for MySQL, so much so that I haven't bothered even downloading and installing it even once!!! I have downloaded the

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread paul rivers
Tom Lane wrote: In connection with my Red Hat duties I've had to look at it occasionally :-(. They definitely have a lower standard for commenting than we do. I sure hope that there is unpublished documentation somewhere ... And cut into the very lucrative figuring out the MySQL source code

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread luca . ciciriello
://adv.email.it/cgi-bin/foclick.cgi?mid=7615d=20080314

Re: [GENERAL] PG secure for financial applications ...

2008-03-14 Thread Micah Yoder
Thanks for the replies. That's kind of what I figured, though it would be interesting if it were possible. For example, if a financial institution could allow their clients direct connections to a database, the clients (or anyone) could build absolutely any interface to it they want. I think

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Greg Smith
On Fri, 14 Mar 2008, Tom Lane wrote: Pavan Deolasee [EMAIL PROTECTED] writes: You must have initialized pgbench with scale 1. Yeah, -s is only meaningful when given with -i. Maybe someday we ought to fix pgbench to complain if you try to set it at other times. You have to pass -s in to

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Sorry for the bad text format. Below the right (I hope...) nbsp;text: Hi All.I#39;m using for the first time the postgres lock utilities, but Nope, sorry. Still full of HTML stuff. Hang on, I'll see if I can fix it. Luca's message below: = I'm

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Craig Ringer
Erik Jones wrote: They've gotten around that by making MySQL dual-licensed. If you're going to be using MySQL in a commercial application then you can not use the GPL'd version, you have to use their paid, commercial license. My understanding is that's not quite true. The client libraries

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Sam Mason
On Fri, Mar 14, 2008 at 03:17:27PM +0530, Gurjeet Singh wrote: On Thu, Mar 13, 2008 at 6:06 PM, rrahul [EMAIL PROTECTED] wrote: Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. I wouldn't

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: My action are: void *Execute(void *pParam) { nbsp; string tableLock = BEGIN WORK;; tableLock.append( LOCK TABLE );

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Steve Crawford
Alvaro Herrera wrote: You can use CLUSTER reliably only from 7.2 upwards. (Or was it 7.3? I forget). In earlier versions it would lose information about other indexes (i.e. those not being clustered on), foreign keys, inheritance, etc; in other words pretty much a disaster except for the

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Tom Lane
Greg Smith [EMAIL PROTECTED] writes: On Fri, 14 Mar 2008, Tom Lane wrote: Yeah, -s is only meaningful when given with -i. Maybe someday we ought to fix pgbench to complain if you try to set it at other times. You have to pass -s in to the actual run if you're specifying your own custom

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

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 10:36 AM, Marko Kreen wrote: Another option: Does not fire at all in single-user mode. This would be covered by Applies to non-superusers if that were there but, by itself, the triggers would still fire for normal superuser connections. Seems bit too hard - you may

Re: [GENERAL] LOCK TABLE HELP

2008-03-14 Thread Richard Huxton
Richard Huxton wrote: [EMAIL PROTECTED] wrote: Sorry for the bad text format. Below the right (I hope...) nbsp;text: Hi All.I#39;m using for the first time the postgres lock utilities, but Nope, sorry. Still full of HTML stuff. Hang on, I'll see if I can fix it. Luca's message below:

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

2008-03-14 Thread Marko Kreen
On 3/14/08, Erik Jones [EMAIL PROTECTED] wrote: On Mar 14, 2008, at 7:17 AM, Marko Kreen wrote: To put it to core Postgres, it needs to be conceptually sane first, without needing ugly workarounds to avoid it bringing whole db down. I can see ATM only few ways: - Applies

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Alvaro Herrera
Steve Crawford escribió: Alvaro Herrera wrote: Also, it is MVCC-safe only from 8.3 upwards; on older versions it (incorrectly) deletes dead tuples that are still visible to old transactions. More interesting. I may have a broken mental-model. I *thought* that CLUSTER acquired exclusive

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Justin
Tom Lane wrote: Greg Smith [EMAIL PROTECTED] writes: On Fri, 14 Mar 2008, Tom Lane wrote: Yeah, -s is only meaningful when given with -i. Maybe someday we ought to fix pgbench to complain if you try to set it at other times. You have to pass -s in to the actual run if

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Thomas Harold
Leif B. Kristensen wrote: On Friday 14. March 2008, Adrian Klaver wrote: Years ago I played around with MySQL because that was what everybody was using. The problem was it did not do what I wanted and Postgres did. That pretty much sums up my experiences too. Back in 2002 when I started

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Csaba Nagy
On Fri, 2008-03-14 at 08:43 -0700, Steve Crawford wrote: Also, it is MVCC-safe only from 8.3 upwards; on older versions it (incorrectly) deletes dead tuples that are still visible to old transactions. More interesting. I may have a broken mental-model. I *thought* that CLUSTER

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread David Wall
My understanding is that's not quite true. The client libraries are GPL, so you can't use them directly, but I don't see what would stop you using their ODBC/JDBC drivers with your non-GPL application (especially if you support other ODBC databases as well). The server can't be bundled in

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Dave Page
On Fri, Mar 14, 2008 at 4:34 PM, David Wall [EMAIL PROTECTED] wrote: My understanding is that's not quite true. The client libraries are GPL, so you can't use them directly, but I don't see what would stop you using their ODBC/JDBC drivers with your non-GPL application (especially if you

[GENERAL] Unexpected error in grant/revoke script

2008-03-14 Thread Webb Sprague
Hi all, I have the following function: create function new_student (text) returns text as $$ declare wtf integer := 1; begin execute 'create schema ' || $1; execute 'create role ' || $1 || 'LOGIN'; execute 'revoke all on schema public from

[GENERAL] Unexpected message in grant/revoke script

2008-03-14 Thread Webb Sprague
Hi all, I have the following function: create function new_student (text) returns text as $$ declare wtf integer := 1; begin execute 'create schema ' || $1; execute 'create role ' || $1 || 'LOGIN'; execute 'revoke all on schema public from

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread David Wall
I imagine you can get round the second one by building your software so it supports PostgreSQL as well - that way you don't 'require customes to install MySQL'. Well, I'm not sure how they'd even know you were doing this, but as a commercial company, I'd suggest you not follow that advice

Re: [GENERAL] Using PL/R for predictive analysis of data.

2008-03-14 Thread [EMAIL PROTECTED]
BUMP -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Tom Lane
Steve Crawford [EMAIL PROTECTED] writes: Alvaro Herrera wrote: Of course, the main problem with CLUSTER is that it needs about 2x the disk space of table + indexes. Again checking my mental model. My understanding is that CLUSTER basically recreates the tables and indexes and then swaps

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Paul Boddie
On 14 Mar, 09:26, [EMAIL PROTECTED] (jose javier parra sanchez) wrote: itself open source, you have to pay to get a license. Pay for GPL software? You cannot be serious, GPL has no relation with monetary value. The GPL is a 'Usage License'. If i write GPL software to my clients, should

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Tom Lane
Justin [EMAIL PROTECTED] writes: I was wondering why the -s would not rescale the data? That would involve re-initializing the table contents. If that's what you want, use -i. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Greg Smith
On Fri, 14 Mar 2008, Justin wrote: I was wondering why the -s would not rescale the data? First, you don't know how to rescale the data if someone is passing in a custom script. More importantly, people don't expect the benchmark tool to change things in tables unless specifically

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Justin
Tom Lane wrote: Justin [EMAIL PROTECTED] writes: I was wondering why the -s would not rescale the data? That would involve re-initializing the table contents. If that's what you want, use -i. regards, tom lane thanks

Re: [GENERAL] Unexpected error in grant/revoke script

2008-03-14 Thread A. Kretschmer
am Fri, dem 14.03.2008, um 10:00:05 -0700 mailte Webb Sprague folgendes: Hi all, I have the following function: create function new_student (text) returns text as $$ declare wtf integer := 1; begin execute 'create schema ' || $1; execute

Re: [GENERAL] pgbench not setting scale size correctly?

2008-03-14 Thread Justin
Greg Smith wrote: On Fri, 14 Mar 2008, Justin wrote: I was wondering why the -s would not rescale the data? First, you don't know how to rescale the data if someone is passing in a custom script. More importantly, people don't expect the benchmark tool to change things in tables unless

Re: [GENERAL] Unexpected error in grant/revoke script

2008-03-14 Thread Tom Lane
Webb Sprague [EMAIL PROTECTED] writes: execute 'create role ' || $1 || 'LOGIN'; I think you're short one crucial space ... regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-14 Thread Dean Gibson (DB Administrator)
On 2008-03-13 23:14, Scott Marlowe wrote: Tis the other way round I'm afriad. Schemas live in dbs, not the other way around. Maybe you were thinking tablespaces? You're right; I was thinking of tables, which I routinely move around from schema to schema. That also means he should

Re: [GENERAL] Using PL/R for predictive analysis of data.

2008-03-14 Thread Sam Mason
On Wed, Mar 12, 2008 at 09:35:24AM -0700, [EMAIL PROTECTED] wrote: In short R appears to have more than enough capability to do the job (from a statistical perspective), however there doesnt seem to be that much discussion on using the PL/R implementation, or for that matter tutorials on using

[GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Webb Sprague
I have the following function: SNIP Now that I know how to write the function, my design flaws and lack of understanding are more apparent... ... I was trying to give all logged in users read-only access to the public schema, and full access to the schema that corresponds to their username.

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Scott Marlowe
On Fri, Mar 14, 2008 at 10:34 AM, David Wall [EMAIL PROTECTED] wrote: It sure sounds like if your application uses MySQL and you sell your software (I presume this would include online services that charge for use of the site and that site runs MySQL under the hood), you have to buy a

[GENERAL] SQL UPDATE question

2008-03-14 Thread Joshua
Hi, Here is a quick and easy one I have a questions about: I have a table (customers) that has a field (firstname) with the following data. firstname Mike H Josh Jim B Katie I Jeff Suzy John R Can someone provide the syntax for a SQL UPDATE statement that will remove

Re: [GENERAL] SQL UPDATE question

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 1:30 PM, Joshua wrote: Hi, Here is a quick and easy one I have a questions about: I have a table (customers) that has a field (firstname) with the following data. firstname Mike H Josh Jim B Katie I Jeff Suzy John R Can someone provide the syntax

Re: [GENERAL] SQL UPDATE question

2008-03-14 Thread A. Kretschmer
am Fri, dem 14.03.2008, um 13:30:02 -0500 mailte Joshua folgendes: Hi, Here is a quick and easy one I have a questions about: I have a table (customers) that has a field (firstname) with the following data. firstname Mike H Josh Jim B Katie I Jeff Suzy John

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Chris Browne
[EMAIL PROTECTED] (Craig Ringer) writes: Erik Jones wrote: They've gotten around that by making MySQL dual-licensed. If you're going to be using MySQL in a commercial application then you can not use the GPL'd version, you have to use their paid, commercial license. My understanding is

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Scott Marlowe
On Fri, Mar 14, 2008 at 11:57 AM, Chris Browne [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Craig Ringer) writes: Erik Jones wrote: They've gotten around that by making MySQL dual-licensed. If you're going to be using MySQL in a commercial application then you can not use the GPL'd

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Tom Lane
Webb Sprague [EMAIL PROTECTED] writes: Also, I revoked what I thought was everything possible on the public schema, but a user is still able to create a table in that schema -- could someone explain: oregon=# revoke create on schema public from foobar cascade; REVOKE You've got a conceptual

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Webb Sprague
On Fri, Mar 14, 2008 at 12:55 PM, Tom Lane [EMAIL PROTECTED] wrote: Webb Sprague [EMAIL PROTECTED] writes: Also, I revoked what I thought was everything possible on the public schema, but a user is still able to create a table in that schema -- could someone explain: oregon=# revoke

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Dave Page
On Fri, Mar 14, 2008 at 5:07 PM, David Wall [EMAIL PROTECTED] wrote: I imagine you can get round the second one by building your software so it supports PostgreSQL as well - that way you don't 'require customes to install MySQL'. Well, I'm not sure how they'd even know you were

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Webb Sprague
Start with revoke all on schema public from public and then grant only what you want. Oh -- to grant select permissions on all the tables in the public schema, do I have to do it table-by-table? I know I can write a loop an use information_schema if necessary, but if I don't

[GENERAL] How to silence psql notices, warnings, etc.?

2008-03-14 Thread Kynn Jones
Hi! How does one silence NOTICE and WARNING messages in psql? I've tried \set QUIET on, \set VERBOSITY terse, and even \o /dev/null, but I still get them! TIA! Kynn

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 3:22 PM, Webb Sprague wrote: Start with revoke all on schema public from public and then grant only what you want. Oh -- to grant select permissions on all the tables in the public schema, do I have to do it table-by-table? I know I can write a loop an use

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Webb Sprague
On Fri, Mar 14, 2008 at 1:30 PM, Erik Jones [EMAIL PROTECTED] wrote: On Mar 14, 2008, at 3:22 PM, Webb Sprague wrote: Start with revoke all on schema public from public and then grant only what you want. Oh -- to grant select permissions on all the tables in the public

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Erik Jones
On Mar 14, 2008, at 3:43 PM, Webb Sprague wrote: On Fri, Mar 14, 2008 at 1:30 PM, Erik Jones [EMAIL PROTECTED] wrote: On Mar 14, 2008, at 3:22 PM, Webb Sprague wrote: Start with revoke all on schema public from public and then grant only what you want. Oh -- to grant select

[GENERAL] shared memory/max_locks_per_transaction error

2008-03-14 Thread Kynn Jones
I've written a PL/pgSQL function that is supposed to create a whole bunch (~4000) tables: CREATE OR REPLACE FUNCTION create_tables () RETURNS void AS $$ DECLARE _s RECORD; _t TEXT; BEGIN DROP TABLE IF EXISTS base CASCADE; CREATE TABLE base ( /* omit lengthy definition */ ); FOR _s IN

Re: [GENERAL] Making a schema read-only (was Unexpected message in grant/revoke script)

2008-03-14 Thread Webb Sprague
Thanks to Eric and Tom, I think I have got it. Here is the function for adding a new student, who can select anything in public and can do anything at all in their own schema. revoke all on schema public from public; -- done only once create or replace function new_student (text) returns void

Re: [GENERAL] How to silence psql notices, warnings, etc.?

2008-03-14 Thread Tom Lane
Kynn Jones [EMAIL PROTECTED] writes: How does one silence NOTICE and WARNING messages in psql? I've tried \set QUIET on, \set VERBOSITY terse, and even \o /dev/null, but I still get them! Set client_min_messages to, say, ERROR. There's no psql-side control of that.

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-14 Thread Clodoaldo
2008/3/14, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: 2008/3/14, Alvaro Herrera [EMAIL PROTECTED]: A quick look into pg_locks should tell you if it's blocking. pg_prepared_xacts is empty and pg_locks has 288 rows: # select locktype, mode, count(*) as total from

Re: [GENERAL] shared memory/max_locks_per_transaction error

2008-03-14 Thread Tom Lane
Kynn Jones [EMAIL PROTECTED] writes: Initially I didn't know what our max_locks_per_transaction was (nor even a typical value for it), but in light of the procedure's failure after 3500 iterations, I figured that it was 3500 or so. In fact ours is only 64 (the default), so I'm now thoroughly

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Russell Smith
Dave Page wrote: On Fri, Mar 14, 2008 at 5:07 PM, David Wall [EMAIL PROTECTED] wrote: I imagine you can get round the second one by building your software so it supports PostgreSQL as well - that way you don't 'require customes to install MySQL'. Well, I'm not sure how they'd even