[GENERAL] Re: Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Thomas Kellerer
Wang, Mary Y, 25.06.2010 01:04: Hi, I'm trying to find some write-ups about the differences between Postgres and MySql. A lot of stuff showed up on Google, but most of them are old. I saw this wiki over here http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_of_MySQL_2009 and plan to watch a

Re: [GENERAL] Converting a Simple Database from MySQL to PostgreSQL in 40 hours?

2010-06-24 Thread Adrian von Bidder
Heyho! On Friday 25 June 2010 00.41:08 Wang, Mary Y wrote: > I personally think it's not possible to convert even a simple database > from MySQL to Postgres in less than 40 hours. The problem is not the database, the problem is the application. Converting the database takes a few hours at most (

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Craig Ringer
On 25/06/2010 8:23 AM, Iwao Shikase wrote: Hi Roeleveld-san, Thank you for your advice. But My purpose is to test PostgreSQL which data cluster is in NFS server. As your says, Cluster Filesystem is one of answer of sharing files. But my company still want to use NFS server. So I want to know ho

Re: [GENERAL] When to use Vacuum?

2010-06-24 Thread Greg Smith
Bill Thoen wrote: I'm putting some large read-only data sets together and occasionally I change my mind about something, drop a table or two and replace them with something different. Do I need to use VACUUM when I drop or re-arrange tables? Or does PG release disk space when you drop tables?

Re: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Scott Marlowe
On Thu, Jun 24, 2010 at 9:46 PM, Rob Wultsch wrote: > On Thu, Jun 24, 2010 at 6:13 PM, Scott Marlowe > wrote: >> For instant, by default, this will work in mysql: >> >> create table test (i int); >> insert into test (i) values (''); >> >> with a warning, but will produce an error in most modern

Re: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Rob Wultsch
On Thu, Jun 24, 2010 at 6:13 PM, Scott Marlowe wrote: > For instant, by default, this will work in mysql: > > create table test (i int); > insert into test (i) values (''); > > with a warning, but will produce an error in most modern versions of pgsql. > However it is easy to get mostly sane beha

Re: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Scott Marlowe
On Thu, Jun 24, 2010 at 7:04 PM, Wang, Mary Y wrote: > Hi, > > I'm trying to find some write-ups about the differences between Postgres and > MySql.  A lot of stuff showed up on Google, but most of them are old. > I saw this wiki over here > http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_o

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Iwao Shikase
Hi Roeleveld-san, Thank you for your advice. But My purpose is to test PostgreSQL which data cluster is in NFS server. As your says, Cluster Filesystem is one of answer of sharing files. But my company still want to use NFS server. So I want to know how to use PostgreSQL using NFS. By the way,T

Re: [GENERAL] Converting a Simple Database from MySQL to PostgreSQL in 40 hours?

2010-06-24 Thread Adrian Klaver
On Thursday 24 June 2010 3:41:08 pm Wang, Mary Y wrote: > Hi, > > My internal customer has a new project and is considering using MySQL. > Knowing that I'm a Postgres person, the customer is open to considering > Postgres at a later date if the cost to transition is less than 40 hours. > The data

[GENERAL] Re: Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Dann Corbit
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Wang, Mary Y Sent: Thursday, June 24, 2010 4:05 PM To: pgsql-general Subject: [GENERAL] Need Some Recent Information on the Differences between Postgres and MySql Hi, I'm trying to find some write-

[GENERAL] Need Some Recent Information on the Differences between Postgres and MySql

2010-06-24 Thread Wang, Mary Y
Hi, I'm trying to find some write-ups about the differences between Postgres and MySql. A lot of stuff showed up on Google, but most of them are old. I saw this wiki over here http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_of_MySQL_2009 and plan to watch a recent webcast on PostgreSQL

Re: [GENERAL] Converting a Simple Database from MySQL to PostgreSQL in 40 hours?

2010-06-24 Thread David Fetter
On Thu, Jun 24, 2010 at 03:41:08PM -0700, Wang, Mary Y wrote: > Hi, > > My internal customer has a new project and is considering using > MySQL. Knowing that I'm a Postgres person, the customer is open to > considering Postgres at a later date if the cost to transition is > less than 40 hours. T

[GENERAL] Converting a Simple Database from MySQL to PostgreSQL in 40 hours?

2010-06-24 Thread Wang, Mary Y
Hi, My internal customer has a new project and is considering using MySQL. Knowing that I'm a Postgres person, the customer is open to considering Postgres at a later date if the cost to transition is less than 40 hours. The database will probably be relatively small and simple (still in the

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Dave Page
On Thu, Jun 24, 2010 at 10:59 PM, Allan Kamau wrote: > Perhaps (I could be wrong here), there may be a way (even though I > don't really support the obfuscation, vendor lockup etc... idea). > 1)Use a commercial DB (as mentioned previously), they seem to have > provided for this. > 2)Use PostgreSQ

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Allan Kamau
On Fri, Jun 25, 2010 at 12:28 AM, Dave Page wrote: > On Thu, Jun 24, 2010 at 10:20 PM, Joshua D. Drake > wrote: >> On Thu, 2010-06-24 at 22:18 +0100, Dave Page wrote: >> >>> > I have no problem with him trying to protect his hard earned work. I >>> > just think he is trying to solve the wrong pr

[GENERAL] Slony-I 2.0.4 released

2010-06-24 Thread Steve Singer
Slony-I version 2.0.4 has been released. This version of Slony includes fixes for the memory corruption issues introduced in 2.0.3 2.0.3 users are encouraged to upgrade. You can download the latest Slony release from http://www.slony.info This release includes: * Fixes to memory corruption

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Dave Page
On Thu, Jun 24, 2010 at 10:20 PM, Joshua D. Drake wrote: > On Thu, 2010-06-24 at 22:18 +0100, Dave Page wrote: > >> > I have no problem with him trying to protect his hard earned work. I >> > just think he is trying to solve the wrong problem. >> >> It's a real problem faced by many businesses an

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Pavel Stehule
2010/6/24 Joshua D. Drake : > On Thu, 2010-06-24 at 22:18 +0100, Dave Page wrote: > >> > I have no problem with him trying to protect his hard earned work. I >> > just think he is trying to solve the wrong problem. >> >> It's a real problem faced by many businesses and solved by most >> commercial

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Pavel Stehule
2010/6/24 akp geek : > It's not for the user postgres.. If I have created a testuser, can I hide > the code for that testuser? > Regards > you can do it. But mostly of all instruments for postgres will not work corectly - like pgAdmin and others. So this step is usually unwanted. try REVOKE SELE

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Joshua D. Drake
On Thu, 2010-06-24 at 22:18 +0100, Dave Page wrote: > > I have no problem with him trying to protect his hard earned work. I > > just think he is trying to solve the wrong problem. > > It's a real problem faced by many businesses and solved by most > commercial DBMSs. Of course, it's basically im

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Dave Page
On Thu, Jun 24, 2010 at 10:08 PM, Joshua D. Drake wrote: > On Fri, 2010-06-25 at 00:00 +0300, Allan Kamau wrote: > >> >> Seems akp would like to hide/protect (including his name) his hard >> earned code/IP which may have consumed some man-hours, which to run, >> requires well built and generously

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Raymond O'Donnell
On 24/06/2010 22:00, Allan Kamau wrote: > Seems akp would like to hide/protect (including his name) his hard > earned code/IP which may have consumed some man-hours, which to run, > requires well built and generously given PostgreSQL code which has > taken man-decades to develop. There's been quit

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Joshua D. Drake
On Fri, 2010-06-25 at 00:00 +0300, Allan Kamau wrote: > > Seems akp would like to hide/protect (including his name) his hard > earned code/IP which may have consumed some man-hours, which to run, > requires well built and generously given PostgreSQL code which has > taken man-decades to develop.

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Allan Kamau
On Thu, Jun 24, 2010 at 11:11 PM, Joshua D. Drake wrote: > On Thu, 2010-06-24 at 16:06 -0400, akp geek wrote: >> It's not for the user postgres.. If I have created a testuser, can I >> hide the code for that testuser? > > No. Of course you have to wonder, "why" you would do that. It is the > data

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Joshua D. Drake
On Thu, 2010-06-24 at 16:06 -0400, akp geek wrote: > It's not for the user postgres.. If I have created a testuser, can I > hide the code for that testuser? No. Of course you have to wonder, "why" you would do that. It is the data you are protecting, not the code to retrieve the data. Just make su

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread akp geek
It's not for the user postgres.. If I have created a testuser, can I hide the code for that testuser? Regards On Thu, Jun 24, 2010 at 3:42 PM, Pavel Stehule wrote: > Hello > > 2010/6/24 akp geek : > > Hi all - > > Is there way in postgres to set the user privileges so that > when > > t

Re: [GENERAL] Hide the code from users postgres

2010-06-24 Thread Pavel Stehule
Hello 2010/6/24 akp geek : > Hi all - >           Is there way in postgres to set the user privileges so that when > they login , the user can not see functions and views? you can't do it for user postgres. Regards Pavel Stehule > Regards -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] Hide the code from users postgres

2010-06-24 Thread akp geek
Hi all - Is there way in postgres to set the user privileges so that when they login , the user can not see functions and views? Regards

Re: [GENERAL] HA for PostgreSQL (Auth-Server)

2010-06-24 Thread Chris Browne
cr...@postnewspapers.com.au (Craig Ringer) writes: > OpenLDAP is a pretty solid LDAP server these days, and I highly > recommend it for use as an authentication database. By default it uses > Berkeley DB as a backend, which is quite acceptable with newer versions > of Berkeley DB that provide decen

[GENERAL] Filtering by tags

2010-06-24 Thread Anders Steinlein
What's the recommended way of storing "tags" in a database, and then filtering based on the existence, or *non*-existence, of those tags on some entities? Our application stores contacts, where each contact may have any number of tags. We do this with the tables contacts, contacts_tags and tag

[GENERAL] When to use Vacuum?

2010-06-24 Thread Bill Thoen
I'm putting some large read-only data sets together and occasionally I change my mind about something, drop a table or two and replace them with something different. Do I need to use VACUUM when I drop or re-arrange tables? Or does PG release disk space when you drop tables? And finally, if the

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Chris Browne
shik...@air.co.jp (Iwao Shikase) writes: > If I mount the database cluster with caching in my environment, What kind of >  problem I will meet? Please give the information about the problem you met. If you use NFS, and are not absolutely certain of the semantics of the implementation, then you are

Re: [GENERAL] complicated running aggregate

2010-06-24 Thread Sim Zacks
That's what I was afraid of :-( I'm currently on 8.2 We're planning on starting 9.0 testing very soon, so I may just leave it until then. Sim On 6/24/2010 5:23 PM, Greg Smith wrote: > > If you're on an earlier version, using a loop in a function is not a > bad approach. Getting the query right w

Re: [GENERAL] HA for PostgreSQL (Auth-Server)

2010-06-24 Thread Craig Ringer
On 24/06/10 17:27, Michelle Konzack wrote: > in my enterprise I have an Intranet-Server with NFSv4, Courier, Apache > and PostgreSQL and if this Server goes down, nothing will work anymore. > > OK, I replicate the WHOLE server all 6 hours, but my PostgreSQL give me > a bunch of headache, becas

Re: [GENERAL] Could not locate a valid checkpoint record

2010-06-24 Thread Norberto Delle
Em 24/6/2010 11:48, Tom Lane escreveu: Norberto Delle writes: 2010-06-24 09:00:28 PANIC: could not locate a valid checkpoint record I know this error requires you to restore from backup, but, unfortunatelly, we have no backup. There is any way I can recover the data? pg_r

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Grzegorz Jaśkiewicz
I'll fix it this way: CREATE TABLE foob(id serial primary key, name varchar default ''); CREATE TABLE fooA(id serial primary key, fooBook int not null references fooB(id) on update cascade on delete cascade DEFERRABLE, name varchar default ''); CREATE FUNCTION foobarrB() RETURNS trigger AS $_$ B

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Grzegorz Jaśkiewicz
it is slightly more complicated than that, cos I need information from fooA too. So we have a chicken and egg problem. -- 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] Could not locate a valid checkpoint record

2010-06-24 Thread Tom Lane
Norberto Delle writes: > 2010-06-24 09:00:28 PANIC: could not locate a valid checkpoint record > I know this error requires you to restore from backup, but, > unfortunatelly, we have no backup. > There is any way I can recover the data? pg_resetxlog should allow you to restart the database, bu

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Adrian Klaver
On Thursday 24 June 2010 7:40:22 am Grzegorz Jaśkiewicz wrote: > that Id refers to 'name' column that I need. There still is FK on it, > so basically it is broken inside transaction, from trigger's > perspective. I understand this part. What I am saying is think about reversing your point of view

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Grzegorz Jaśkiewicz
that Id refers to 'name' column that I need. There still is FK on it, so basically it is broken inside transaction, from trigger's perspective. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-gene

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Adrian Klaver
On Thursday 24 June 2010 7:21:04 am Grzegorz Jaśkiewicz wrote: > because in my case I have many tables with FK pointing at foob. So > writing that many triggers is going to be a royal pain. I am trying to see how this is different from writing the triggers on the child tables :) In any case are t

Re: [GENERAL] complicated running aggregate

2010-06-24 Thread Greg Smith
Sim Zacks wrote: I am trying to build a query with a running total, but it is a bit complicated...Currently I'm generating this information using a plpsql loop, but I would like to change it to an SQL query, if possible. It's hard to do a running total with the sort of requirements you have

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Grzegorz Jaśkiewicz
because in my case I have many tables with FK pointing at foob. So writing that many triggers is going to be a royal pain. -- 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] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Adrian Klaver
On Thursday 24 June 2010 1:48:12 am Grzegorz Jaśkiewicz wrote: > On Wed, Jun 23, 2010 at 7:31 PM, Tom Lane wrote: > > Thom Brown writes: > >> Yes, I'm still not exactly sure why it's seeing uncommitted changes. :/ > > > > Because it's all one transaction.  A transaction that couldn't see its > >

[GENERAL] complicated running aggregate

2010-06-24 Thread Sim Zacks
I am trying to build a query with a running total, but it is a bit complicated. We have different stock for leaded and unleaded parts, but we also have one stock if it is lead free and can be used in a leaded process (lfb - lead free both). I have the following fields: id,fkey_id,partid, duedate, q

[GENERAL] Could not locate a valid checkpoint record

2010-06-24 Thread Norberto Delle
Hi all I tried to start a PostgresSQL instance this morning, but it failed. So I checked the log: 2010-06-24 09:00:28 LOG: database system was shut down at 2010-06-24 08:13:58 2010-06-24 09:00:28 LOG: record with zero length at 9/E0E9D200 2010-06-24 09:00:28 LOG: invalid primary checkpo

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
> > This adds significant complexity to your code, especially since (AFAIK) > > there aren't really any good i18n tools for Pg's SQL, PL/PgSQL, etc. > > But there is - whether good or not: Go to > http://gitorious.org/gnumed and browse the tree under > gnumed/server/SQL/. Look at the i18n schema

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread tv
> On Thu, Jun 24, 2010 at 17:14, Alban Hertroys > wrote: >> >> You didn't provide explain analyse results for those queries, so I'm >> just guessing here, but I think you should add indices to email_msg_id >> and email_sender_text to speed up those queries. >> >> Alban Hertroys >> > > Thanks for y

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread Alban Hertroys
On 24 Jun 2010, at 11:13, kaifeng.zhu wrote: > > > On Thu, Jun 24, 2010 at 16:57, Thom Brown wrote: >> Sounds like the planner took a wrong turn in the 2nd case. Which >> version of PostgreSQL are you running? > > PostgreSQL version 8.1.21 (With schemas) > > > The explain commands show that

[GENERAL] HA for PostgreSQL (Auth-Server)

2010-06-24 Thread Michelle Konzack
Hello *, in my enterprise I have an Intranet-Server with NFSv4, Courier, Apache and PostgreSQL and if this Server goes down, nothing will work anymore. OK, I replicate the WHOLE server all 6 hours, but my PostgreSQL give me a bunch of headache, becasue I use "pam-pgsql" for authentication. Wh

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread kaifeng.zhu
On Thu, Jun 24, 2010 at 17:14, Alban Hertroys wrote: > > You didn't provide explain analyse results for those queries, so I'm just > guessing here, but I think you should add indices to email_msg_id and > email_sender_text to speed up those queries. > > Actually, from your results it would appea

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Dimitri Fontaine
Merlin Moncure writes: > On Wed, Jun 23, 2010 at 3:21 PM, Jamie Kahgee wrote: >> I have an application in a schema and now i need to create other schemas b/c >> the app needs to support different languages,  is there an easy way to copy >> an entire schema to a new one (tables, contents, trigges,

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread Alban Hertroys
On 24 Jun 2010, at 10:52, kaifeng.zhu wrote: > Hi All, > > I have a table named emails which created by following script: > create table emails ( >email_id bigserial primary key, >email_msg_id char(36) not null, >email_sender text not null) > > The table has more than 10 million of r

Fwd: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread kaifeng.zhu
On Thu, Jun 24, 2010 at 16:57, Thom Brown wrote: > Sounds like the planner took a wrong turn in the 2nd case.  Which > version of PostgreSQL are you running? PostgreSQL version 8.1.21 (With schemas) The explain commands show that: db1=> explain select * from emails where email_msg_id = '4dba

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread Thom Brown
On 24 June 2010 09:52, kaifeng.zhu wrote: > Hi All, > > I have a table named emails which created by following script: > create table emails ( >    email_id bigserial primary key, >    email_msg_id char(36) not null, >    email_sender text not null) > > The table has more than 10 million of record

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread J. Roeleveld
On Thursday 24 June 2010 06:42:52 Iwao Shikase wrote: > Hi > > This is shikase. > I have a question about PostgreSQL on NFS Server as follows. > Please let me know advice about that. If I posted the wrong mailing-list, > please let me know. Why not use a real Cluster Filesystem? http://en.wikiped

[GENERAL] Bad query performance with more conditions?

2010-06-24 Thread kaifeng.zhu
Hi All, I have a table named emails which created by following script: create table emails ( email_id bigserial primary key, email_msg_id char(36) not null, email_sender text not null) The table has more than 10 million of records and I have already created indexes on email_msg_id and

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-24 Thread Dimitri Fontaine
"Joshua D. Drake" writes: >> Any chance that the Parrot runtime could be used for PHP and other >> languages? I read that some folks are working on PL/Parrot. I'd really like >> to have PHP and Lisp for PL languages :). > > http://plscheme.projects.postgresql.org/ > > Not exactly lisp, but

Re: [GENERAL] unexpected effect of FOREIGN KEY ON CASCADE DELETE

2010-06-24 Thread Grzegorz Jaśkiewicz
On Wed, Jun 23, 2010 at 7:31 PM, Tom Lane wrote: > Thom Brown writes: >> Yes, I'm still not exactly sure why it's seeing uncommitted changes. :/ > > Because it's all one transaction.  A transaction that couldn't see its > own changes wouldn't be very useful. > > I think what the OP is unhappy abo

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Iwao Shikase
Hello, Thank you for the information . I understood you never recommend the case. I have another question. I also use Linux in the case. There are NFS mount options , noac and sync which is concerned with caching. Which option means the keyword 'without caching' in the manual.? And the case you

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Rafael Martinez
Craig Ringer wrote: > On 24/06/10 12:42, Iwao Shikase wrote: > [...] >> If I mount the database cluster with caching in my environment, What kind of >> problem I will meet? Please give the information about the problem you met. > > It varies so much by NFS implementation and version that it i

Re: [GENERAL] copy/duplicate database schemas

2010-06-24 Thread Karsten Hilbert
On Thu, Jun 24, 2010 at 11:29:48AM +0800, Craig Ringer wrote: > You might want to investigate internationalization options instead, > where you can process your "master" sources to produce a list of > strings, and have translators translate those strings. Your code loads > the string lists, and de

Re: [GENERAL] The case of PostgreSQL on NFS Server

2010-06-24 Thread Craig Ringer
On 24/06/10 12:42, Iwao Shikase wrote: > In my environment, Database cluster is in NFS server. So you are mounting an nfs file system shared by "localhost" ? Why not run PostgreSQL directly on the underlying file system, rather than via nfs? > I guess that, In my environment, the mount options