Re: Triggers, Stored Procedures, PHP. was: Re: [GENERAL] PostgreSQL
scott.marlowe wrote: On Mon, 1 Dec 2003, Jan Wieck wrote: Jason Tesser wrote: > Quoted as gospel by various people: >>> MySQL cannot even handle sub-queries yet. > >> BTW, is that really still true? I thought they had at least some >> support for subqueries by now. > > yes sub queries in 4.1 which is still alpha "yes sub queries" is IMHO as precise as "yes foreign keys" ... look, they have foreign key support, but do they have DEFERRED, ON DELETE SET NULL, ON UPDATE CASCADE, all the stuff that makes it complete? They're working on those things, but as usual, MySQL got the big things mostly right, and the little things horribly wrong. If you create a table with type=innodb on a database server that isn't compiled to support innodb tables, it will silently fail, and silenly allow you to build non-existent foreign keys. Wasn't able to find any of their plans for match-types or deferrability. sorry, but until MySQL treats errors and their reporting with such a la de da attitude, I won't trust it. ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- #==# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #== [EMAIL PROTECTED] # ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: Triggers, Stored Procedures, PHP. was: Re: [GENERAL] PostgreSQL
On Tue, 2 Dec 2003, Jan Wieck wrote: > scott.marlowe wrote: > > > On Mon, 1 Dec 2003, Jan Wieck wrote: > > > >> Jason Tesser wrote: > >> > >> > Quoted as gospel by various people: > >> >>> MySQL cannot even handle sub-queries yet. > >> > > >> >> BTW, is that really still true? I thought they had at least some > >> >> support for subqueries by now. > >> > > >> > yes sub queries in 4.1 which is still alpha > >> > >> "yes sub queries" is IMHO as precise as "yes foreign keys" ... look, > >> they have foreign key support, but do they have DEFERRED, ON DELETE SET > >> NULL, ON UPDATE CASCADE, all the stuff that makes it complete? > > > > They're working on those things, but as usual, MySQL got the big things > > mostly right, and the little things horribly wrong. If you create a > > table with type=innodb on a database server that isn't compiled to support > > innodb tables, it will silently fail, and silenly allow you to build > > non-existent foreign keys. > > Wasn't able to find any of their plans for match-types or deferrability. Sorry, I wasn't disagreeing with you, I was adding to your point. I.e. besides not being deferrable or cascading, mysql lets you declare fks relations that aren't actually there and throws no error. I have read on their mailing lists though that they are "working the problem," but MySQL tends to be developed not in public, near as I can tell. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Feature Request for 7.5
>> I have been looking into how to ensure that synchronous replication, etc. >> could best be implimented. To date, I see only two options: incorporate >> the replication code into the database backend or have a separate "proxy" >> which handles the replication. > > There are many problems with a "proxy" solution. One is that you really > don't know if a statement does modify the database or not. A SELECT for > example can call a user defined function somewhere and that can do > whatever the programmer likes it to do. So you would have to "replicate" > all that too. Granted, you can exclude this type of database usage from > your supported list. > > Next you don't have control over sequence allocation. Every application > that uses sequence allocated ID's is in danger, because they are not > blocking, you cannot force the order of assignments and they don't roll > back either. > > And you get into deadlock problems if you don't guarantee that your > proxy uses the same order to access all databases. And you cannot > guarantee that if your proxy tries to do it parallel. So it has to do > the queries against all databases one by one, that doesn't scale well. > > The last thing (I mention for now) is that I cannot imagine any way that > such proxy code allows for a new member to join without stopping the > whole application, creating an identical copy of one member > (dump+restore) and continue. So it is impossible to build 24*7 support > that way. > > No, separate proxy code doesn't strike me as the superior solution. I incorporate code (triggers/plpgsql) into the backend that creates a serialized audit trail of changes, then have an external proxy running which queries the audit trail and applies the changes. I don't have enough experience with the subject to debate it much, but I took this approach because: - It's much easier for the backend to keep straight the changes, for all the reasons mentioned above. - It seemed to me to be much easier to write the actual replication stuff as a C++ app on top of libpq than to try to stuff that into the backend. Note that I only need master/slave (take that LA County Commission) replication, and I don't really need to worry about scalability because I'll only have one or two slaves. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 665-7007 voice ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] perl(Pg) (S)RPM
On Tue, 2 Dec 2003, Lamar Owen wrote: > Because Pg is no longer distributed as a part of the main tarball, but a > contrib is being distributed that requires it. This is an issue with the > main tarball, not with the RPM packaging, IMO. Someone needs to step up to > the plate and build a Pg RPM that provides the Pg module, one that would > replace the old postgresql-perl subpackage (which no longer exists). If no > one else can do this, I can, but it's not high on my list of priorities. What you have a life? :-) OK it is slowly seeping in into my gray matter. This 'perl(Pg)' is what the was/is/can be replaced by DBI and DBD::Pg. Is this correct? I had it in my mind this was the plperl and plperlu stuff. > > I only disabled tcl, tkpkg, pltcl, and python in the SPEC file. I could > > not install the contrib stuff but I really want the plperl and plperlu > > languages. > > plperl.so is in the postgresql-pl package. The Pg module is a client side > deal, not a server side PL. Right, like I guesstimated above. Is 'the postgresql-pl package' a separate RPM or part of the main or server RPM? > The Rserv contrib is the only thing, AFAIK, that requires the old Pg module. > I don't really want to not distribute it, since I have historically > distributed the contrib tree intact. That may have to change, I guess. Well I vote (if that is an option) for making it simple enough for me to install. *REALLY* simple! Rod -- "Open Source Software - Usually you get more than you pay for..." "Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL" ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] Error in select
Carmen Gloria Sepulveda Dedes <[EMAIL PROTECTED]> writes: > I get: > ERROR: variable not found in subplan target list Could we have enough context to reproduce the problem? I don't have time to guess at your table definitions ... regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] bytea -> text
Baldur Norddahl <[EMAIL PROTECTED]> writes: > Seems like "like" knows how to convert bytea to text, No, it doesn't. The reason that works is there's a LIKE operator for bytea (try "\do ~~" in psql). regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [GENERAL] embedded postgresql + C++ IDE
Thanks for all the answers. It seems if I wish to make my idea into reality I will have to invest in the Profesional Microsoft Visual C++ studio. Having said that if anyone can help me with a cheap copy of the developer studio which you do not want and want to sell it to me very very cheap. I will be greatful. --- "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > Eclipse also has a nice c++ plugin. > > Richard Welty wrote: > > >On Mon, 17 Nov 2003 23:48:46 + (GMT) jini us > <[EMAIL PROTECTED]> wrote: > > > > > >>Java has long way to catch up with C++ > >>in my opinion. > >> > >> > > > >perhaps. this is neither the time nor the place for > that discussion. > > > >however, in answer to the actual discussion in this > thread, > >netbeans (not javabeans) is a nice pseudo > open-source > >IDE (no charge, and it's open source to the extent > that the > >Sun Public Licence is open source, which is to say > sort of > >but not really). > > > >see http://www.netbeans.org/ for a copy, but be > sure that your > >development system has enough RAM -- and you'll > want to > >watch the netbeans users list for performance tips, > as there > >are a lot of tweaks to the default memory > management parameters > >that are worth making. > > > >it happens to have a C++ module which can be > downloaded > >and added; i've played with it a bit. only downside > is that the > >runtime and debugger aren't really integrated; i > find myself > >editing C++, saving it, and going to a shell window > to run > >the makefile, which isn't nearly as slick as when i > do java > >development in the IDE. > > > >richard > > > > > > -- > Command Prompt, Inc., home of Mammoth PostgreSQL - > S/ODBC and S/JDBC > Postgresql support, programming shared hosting and > dedicated hosting. > +1-503-222-2783 - [EMAIL PROTECTED] - > http://www.commandprompt.com > Editor-N-Chief - PostgreSQl.Org - > http://www.postgresql.org > > > > ---(end of > broadcast)--- > TIP 4: Don't 'kill -9' the postmaster Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs http://www.yahoo.co.uk/robbiewilliams ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] embedded postgresql + C++ IDE
Thanks for all the answers. It seems if I wish to make my idea into reality I will have to invest in the Profesional Microsoft Visual C++ studio. Having said that if anyone can help me with a cheap copy of the developer studio which you do not want and want to sell it to me very very cheap. I will be greatful. --- "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > Eclipse also has a nice c++ plugin. > > Richard Welty wrote: > > >On Mon, 17 Nov 2003 23:48:46 + (GMT) jini us > <[EMAIL PROTECTED]> wrote: > > > > > >>Java has long way to catch up with C++ > >>in my opinion. > >> > >> > > > >perhaps. this is neither the time nor the place for > that discussion. > > > >however, in answer to the actual discussion in this > thread, > >netbeans (not javabeans) is a nice pseudo > open-source > >IDE (no charge, and it's open source to the extent > that the > >Sun Public Licence is open source, which is to say > sort of > >but not really). > > > >see http://www.netbeans.org/ for a copy, but be > sure that your > >development system has enough RAM -- and you'll > want to > >watch the netbeans users list for performance tips, > as there > >are a lot of tweaks to the default memory > management parameters > >that are worth making. > > > >it happens to have a C++ module which can be > downloaded > >and added; i've played with it a bit. only downside > is that the > >runtime and debugger aren't really integrated; i > find myself > >editing C++, saving it, and going to a shell window > to run > >the makefile, which isn't nearly as slick as when i > do java > >development in the IDE. > > > >richard > > > > > > -- > Command Prompt, Inc., home of Mammoth PostgreSQL - > S/ODBC and S/JDBC > Postgresql support, programming shared hosting and > dedicated hosting. > +1-503-222-2783 - [EMAIL PROTECTED] - > http://www.commandprompt.com > Editor-N-Chief - PostgreSQl.Org - > http://www.postgresql.org > > > > ---(end of > broadcast)--- > TIP 4: Don't 'kill -9' the postmaster Download Yahoo! Messenger now for a chance to win Live At Knebworth DVDs http://www.yahoo.co.uk/robbiewilliams ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [GENERAL] perl(Pg) (S)RPM
On Tuesday 02 December 2003 06:05 pm, Roderick A. Anderson wrote: > On Tue, 2 Dec 2003, Lamar Owen wrote: > > exists). If no one else can do this, I can, but it's not high on my list > > of priorities. > What you have a life? :-) And four kidsoh, that's an 'l', not a 'w' :-) > OK it is slowly seeping in into my gray > matter. This 'perl(Pg)' is what the was/is/can be replaced by DBI and > DBD::Pg. Is this correct? This is correct. > Right, like I guesstimated above. Is 'the postgresql-pl package' a > separate RPM or part of the main or server RPM? Separate RPM, named postgresql-pl-7.4-whatever-version.arch.rpm > Well I vote (if that is an option) for making it simple enough for me to > install. *REALLY* simple! I'll look at it. That is currently one of the smaller worries I have, unfortunately. -- Lamar Owen Director of Information Technology Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 (828)862-5554 www.pari.edu ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[GENERAL] DBD::Pg problem
Hi I am trying to insert a simple email address into a text field, and I get the below error: DBD::Pg::st execute failed: ERROR: pg_atoi: error in "<[EMAIL PROTECTED]>": can't parse "<[EMAIL PROTECTED]>" I figure it is because of the < and @ in the value, but why does it take these as operators even when the value has single quotes around it? I have even tried binding the values and PG_TEXT beforehand and still not luck. Any help would be greatly appreciated. Jason Frisch ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] DBD::Pg problem
pg_atoi is the string to int converter. You're trying to insert it into an integer field. On Wed, Dec 03, 2003 at 03:45:53PM +0900, Ausrack Webmaster wrote: > Hi > > I am trying to insert a simple email address into a text field, > and I get the below error: > > DBD::Pg::st execute failed: ERROR: pg_atoi: error in > "<[EMAIL PROTECTED]>": can't parse "<[EMAIL PROTECTED]>" > > I figure it is because of the < and @ in the value, but why does it take > these as operators even > when the value has single quotes around it? > I have even tried binding the values and PG_TEXT beforehand and still > not luck. > > Any help would be greatly appreciated. > > Jason Frisch > > > > ---(end of broadcast)--- > TIP 4: Don't 'kill -9' the postmaster -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > "All that is needed for the forces of evil to triumph is for enough good > men to do nothing." - Edmond Burke > "The penalty good people pay for not being interested in politics is to be > governed by people worse than themselves." - Plato pgp0.pgp Description: PGP signature