[GENERAL] MySQL Gets Functions in Java - Enlightenment Please
Can someone a little more clever than I (which means just about anyone on this list) tell me what the implications/benefits are of this are please? http://developers.slashdot.org/developers/03/12/19/1628241.shtml?tid=108&tid=126&tid=137&tid=156&tid=198 Cheers T. ---(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] MySQL Gets Functions in Java - Enlightenment Please
It means that you can create stored procedures/functions which reside in the database that are written in java (as opposed to the native SQL programming language). Why would you want this? If you were more familiar with java than any of the currently supported procedural languages, then it means that you don't necessarily have to get to grips with another programming language. This would be a "nice to have" for Postgres too - I believe that it supports PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python at present. Oracle also offers the ability to write stored procedures in java. It's funny, even though I program in java all the time, I still write my procedures in the SQL programming language (PL/pgSQL). Even if the java language were available for Postgres, I'm not sure I would use it... John Sidney-Woollett Tony (Unihost) said: > Can someone a little more clever than I (which means just about anyone > on this list) tell me what the implications/benefits are of this are > please? > > http://developers.slashdot.org/developers/03/12/19/1628241.shtml?tid=108&tid=126&tid=137&tid=156&tid=198 > > Cheers > > T. > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) > ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
Does this include ALL the functionality of Java? Objects, Polymorphism, Inheritance, or is it just a subset? T. John Sidney-Woollett wrote: It means that you can create stored procedures/functions which reside in the database that are written in java (as opposed to the native SQL programming language). Why would you want this? If you were more familiar with java than any of the currently supported procedural languages, then it means that you don't necessarily have to get to grips with another programming language. This would be a "nice to have" for Postgres too - I believe that it supports PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python at present. Oracle also offers the ability to write stored procedures in java. It's funny, even though I program in java all the time, I still write my procedures in the SQL programming language (PL/pgSQL). Even if the java language were available for Postgres, I'm not sure I would use it... John Sidney-Woollett Tony (Unihost) said: Can someone a little more clever than I (which means just about anyone on this list) tell me what the implications/benefits are of this are please? http://developers.slashdot.org/developers/03/12/19/1628241.shtml?tid=108&tid=126&tid=137&tid=156&tid=198 Cheers T. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
Sorry but I don't know what would be supported. Perhaps someone else can provide more info. Here is a document from Oracle detailing their java stored procedure support: http://otn.oracle.com/tech/java/jroadmap/jsproc/listing.htm#998299 Hope that helps. John Tony (Unihost) said: > Does this include ALL the functionality of Java? Objects, Polymorphism, > Inheritance, or is it just a subset? > > T. > > > John Sidney-Woollett wrote: > >>It means that you can create stored procedures/functions which reside in >>the database that are written in java (as opposed to the native SQL >>programming language). >> >>Why would you want this? If you were more familiar with java than any of >>the currently supported procedural languages, then it means that you >> don't >>necessarily have to get to grips with another programming language. >> >>This would be a "nice to have" for Postgres too - I believe that it >>supports PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python at present. >> >>Oracle also offers the ability to write stored procedures in java. >> >>It's funny, even though I program in java all the time, I still write my >>procedures in the SQL programming language (PL/pgSQL). Even if the java >>language were available for Postgres, I'm not sure I would use it... >> >>John Sidney-Woollett >> >>Tony (Unihost) said: >> >> >>>Can someone a little more clever than I (which means just about anyone >>>on this list) tell me what the implications/benefits are of this are >>>please? >>> >>>http://developers.slashdot.org/developers/03/12/19/1628241.shtml?tid=108&tid=126&tid=137&tid=156&tid=198 >>> >>>Cheers >>> >>>T. >>> >>>---(end of broadcast)--- >>>TIP 2: you can get off all lists at once with the unregister command >>>(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) >>> >>> >>> >> >> >>---(end of broadcast)--- >>TIP 4: Don't 'kill -9' the postmaster >> >> > ---(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] BLOBS : how to remove them totally
Thanks a lot for the clue... Now I am comfortably handling the Lrge Objects thru SQL... But unfortunately I could not extract this data to frontend thru java... I tried in two ways but got the same error...after getting the data in Blob or Large Object. Error in connection == FastPath call returned ERROR: invalid large-object descriptor: 0 1) Process One Blob myBlob = null; Then for resultset rs myBlob=rs.getBlob(1); The error is returned in any statement which processes the Blob object like, long myLength = myBlob.length(); 2) Process Two FIRST the largeobject manager LargeObjectManager lobj = ((org.postgresql.PGConnection)conn).getLargeObjectAPI(); THEN in the while rs.next() loop LargeObject obj = lobj.open(oid, LargeObjectManager.READ); AND THEN InputStream input = new BufferedInputStream(largeobj.getInputStream()); THe Error is returned in any statement that processes the input like writing in a ouputstream int b = -1; while ((b = input.read()) != -1) outputStream.write(b); I AM PUZZLED... WHERE IS THE WRONG ? THE CODE IS NOT COMPLAINING WHEN I GET THE VALUE FROM THE RESULT IN A OBJECT. BUT IT IS GIVING ERROR WHEN I AM TRYING TO READ THE OBJECT. Regards Nilabhra Banerjee --- Tom Lane <[EMAIL PROTECTED]> wrote: > Bernd Helmle <[EMAIL PROTECTED]> writes: > > Here you can find an excellent description, how > BLOBs in PostgreSQL can > > be handled: > > http://www.varlena.com/varlena/GeneralBits/44.php > > That's a good discussion, but it left out at least > one useful bit of > info about managing large objects: there's a contrib > utility > (contrib/vacuumlo) that can find and remove large > objects that are not > referenced anywhere in the database. This is a good > way to clean up > if you've been using large objects without any of > the automatic > management techniques suggested in the GeneralBits > article. > > regards, tom lane > > ---(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 Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html ---(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] MySQL Gets Functions in Java - Enlightenment Please
On Saturday 20 December 2003 16:44, John Sidney-Woollett wrote: > This would be a "nice to have" for Postgres too - I believe that it > supports PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python at present. http://techdocs.postgresql.org/guides/PLLanguages It is already supported..:-) Shridhar ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
On Saturday 20 December 2003 16:44, John Sidney-Woollett wrote: > It means that you can create stored procedures/functions which reside in > the database that are written in java (as opposed to the native SQL > programming language). Does it mean mysql got stored procedures? Wow.. I would like to see details but since I don't know much details about either mysql or java, I can not describe it. Can anybody give a summary as in how much it takes mysql as far as stored procedures go? That would be great.. Shridhar ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] BLOBS : how to remove them totally
On Sat, 20 Dec 2003, [iso-8859-1] Nilabhra Banerjee wrote: > But unfortunately I could not extract this data to > frontend thru java... I tried in two ways but got the > same error...after getting the data in Blob or Large > Object. > > Error in connection == FastPath call returned ERROR: > invalid large-object descriptor: 0 This is usually a symptom of not being in a transaction. Large objects need to be done inside a transaction. Try adding connection.setAutoCommit(false) somewhere in your code. Kris Jurka ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
On Sun, 21 Dec 2003 12:05 am, Shridhar Daithankar wrote: > Does it mean mysql got stored procedures? Wow.. > > I would like to see details but since I don't know much details about > either mysql or java, I can not describe it. > > Can anybody give a summary as in how much it takes mysql as far as stored > procedures go? That would be great.. > > Shridhar Apparently it's literally a 0.1 release, much of it doesn't work and even tho a mysql guy is involved its actually a seperate project on sourceforge. You can use it to effect sub selects and all that jazz but it's not like they've created some sort of framework for stored procedures. Essentially they've taken the fact that yes you can extend mysql by writing C or C++ level functions and creating a custom built server so why not make a litte generic interface that to do the same thing with java where you dont need to go thro the rebuild process each time. Rgds, Jason ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
On Sat, 20 Dec 2003, Tony (Unihost) wrote: > Can someone a little more clever than I (which means just about anyone > on this list) tell me what the implications/benefits are of this are > please? > > http://developers.slashdot.org/developers/03/12/19/1628241.shtml?tid=108&tid=126&tid=137&tid=156&tid=198 > This is not a real stored procedure language and it doesn't claim to be despite the messages on this list or slashdot. What it does is allow regular functions to be written in Java. Not to say this isn't valuable, but the key to an in database language is the ability to query the database. Now, it should be possible to open a JDBC connection back to the database like any other java process, but the problem is that it will not run in the same transaction as the connection which is calling the function. Another thing I noticed about this is the prototype for a function is String exec(String []). So it's type checking certainly won't be great. It says (and means) version 0.1 and doesn't (yet) deserve all the noise it has caused. Kris Jurka ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
On 20/12/2003 13:05 Shridhar Daithankar wrote: On Saturday 20 December 2003 16:44, John Sidney-Woollett wrote: > It means that you can create stored procedures/functions which reside in > the database that are written in java (as opposed to the native SQL > programming language). Does it mean mysql got stored procedures? Wow.. I read it to mean user-defined functions only. Maybe I missed something? -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ ---(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] BLOBS : how to remove them totally
[EMAIL PROTECTED] says... > That's a good discussion, but it left out at least one useful bit of > info about managing large objects: there's a contrib utility > (contrib/vacuumlo) that can find and remove large objects that are not > referenced anywhere in the database. What is the URL for the contributed stuff? TIA. Paul... > regards, tom lane -- plinehan x__AT__x yahoo x__DOT__x com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
I'm actually starting to write one of these for postgres, and apparently there is another one in the works, from Thomas Hallgren. There is at least one significant architectural issue here to deal with Is it more desirable to have a single java vm and communicate via RPC, or some other mechanism? ie sockets, or ? The alternative is to instantiate a java vm for every connection, this could be onerous as there would be considerable overhead for each java vm. This will all go away as soon as java version 1.5 comes out but in the meantime, what does everyone think Comments are welcome. Dave On Sat, 2003-12-20 at 09:00, Paul Thomas wrote: > On 20/12/2003 13:05 Shridhar Daithankar wrote: > > On Saturday 20 December 2003 16:44, John Sidney-Woollett wrote: > > > It means that you can create stored procedures/functions which reside > > in > > > the database that are written in java (as opposed to the native SQL > > > programming language). > > > > Does it mean mysql got stored procedures? Wow.. > > I read it to mean user-defined functions only. Maybe I missed something? ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] MySQL Gets Functions in Java - Enlightenment Please
John Sidney-Woollett wrote: It means that you can create stored procedures/functions which reside in the database that are written in java (as opposed to the native SQL programming language). Why would you want this? If you were more familiar with java than any of the currently supported procedural languages, then it means that you don't necessarily have to get to grips with another programming language. This would be a "nice to have" for Postgres too - I believe that it supports PL/pgSQL, PL/Tcl, PL/Perl, and PL/Python at present. PostgreSQL supports more than just that including: pl/php pl/perl pl/ruby pl/python pl/tcl pl/c pl/pgsql pl/r plr/bash (I think... or was that just pgBash?) There was an beta (alpha?) of pl/Java at one time... Personally I would stick with pl/python, pl/php, or pl/perl -- 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 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] Firebird and PostgreSQL at the DB Corral.
> > > > What, exactly, is a partial index? A functional index is an index on > > something like ((ColumnX*2)/14)? I think the functional one (is that > > also an expression index?) is on the way. > > A partial index is a index on a subset of a table. The case I can think of > is a list of transactions, some of which are yet to be billed. They have a > BillID field which is NULL. since this is the recent set it is queried quite > often, so you can build an index like: > Are NULLs even indexed? Jeff Davis ---(end of broadcast)--- TIP 8: explain analyze is your friend
[GENERAL] SELECT ... FOR UPDATE
I need som ehelp concerning queries using SLEECT ... FOR UPDATE I have two tables (see description below) One is the table of reference, the other one is a table where i have daily infoirmation I want to check the differences on the two tables based on the fields omc_index and bsc for each cellname. Then when I have inconsistency, I want to update the first table with information picked up in the second table. My query is the following Select t1.omc_index, t1.bsc from edw_object t1, edw_object_ref t2 WHERE t1.cellname=t2.cellname and t1.day='20031214' and (t1.omc_index<>t2.omc_index or t1.bsc<>t2.bsc) FOR UPDATE of t2; I can not find much information on FOR UPDATE. Thank you for your help * Table "public.edw_object_ref" Column | Type | Modifiers-+-+--- edw_group_table | text | omc_index | text | cellname | text | cellid | integer | bsc | text | country | text | super_region | text | region | text | area | text | subarea | text | zone | text | ibc | text | road | text | trial | text | subtrial | text | date | integer |Indexes: ix_cellname_edw_object_ref btree (cellname), ix_omc_index_edw_object_ref btree (omc_index) Table "public.edw_object" Column | Type | Modifiers-+---+--- cellname | character varying(50) | bsc | text | region | text | edw_group_table | text | omc_index | text | day | integer | cellid | integer | subarea | text | road | text | trial | text | ibc | text | subtrial | text | country | text | super_region | text | area | text | zone | text |Indexes: edw_object_day btree ("day"), ix_edw_object_omc_index btree (omc_index)
[GENERAL] Please remove me from the list, thanks
_ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=dept/features&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org