Re: [HACKERS] question
On Friday 19 January 2001 20:28, Cameron Laird wrote: I am a Comp. Sci. student at Ryerson Polytechnic University in toronto. I am in the midst of a software engineering project that involves the development of a (possibly) relational database on a RedHat 6.2 development environment, we are coding in C. now my question is, how closely related are Postgre and MySQL, and are the necessary PostgreSQL libraries included in RedHat 6.2? AFAIK, PostgreSQL and MySQL are from totally different codebases (never shared any code). PostgreSQL is BSD license and MySQL is now GNU GPL. They both implement SQL to varying levels of conformance. PostgreSQL has some object-oriented features, like table inheritance. Try them both and see what you like, but I think you'll find PostgreSQL more interesting. For instance, Postgres can load C functions from shared objects and use them as functions in SQL, user defined aggregates, procedural language call handlers, and to create user defined data types (and possibly other things). The 7.1 beta has implemented some great new features, like write-ahead logging (WAL) and complete support for SQL table joins, among other things. A C project can do a lot with Postgres. RPM packages of PostgreSQL are available at: http://www.postgresql.org/sites.html You'll have to check redhat.com or do an rpm query to see if it should be or is installed on RedHat 6.2. thanks, Cameron Laird Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1" Content-Transfer-Encoding: quoted-printable Content-Description: ---- -- ---- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
[HACKERS] Re: [GENERAL] Slashdot and PostgreSQL
On Wednesday 17 January 2001 02:53, Alessio Bragadini wrote: Hunter Hillegas wrote: I don't think they're moving the actual Slashdot site to PostgreSQL... So do I. I think other sites based on Slashcode wanted to be able to use PostgreSQL though... That's what I will do as soon as possible, and I am trying to be involved as much as possible in the current development. I am also waiting for 7.1 to have a cleaner environment to test it. I made a board with php and postgresql. It's *terrible* code but is working at www.comptechnews.com. If anyone is interested in playing with it, I can make it available. Who knows, the code might have bugs that are very compromising! :) People might like to improve it. It consists of one php file and three sql files (tables, data, procedures). It uses PL/pgSQL and PL/TcL. You just run the tables sql, load data, then run procedures sql. Put the php file in a directory and change the pg_pconnect line to connect to the right db. The php file is 3638 lines. It tries fairly hard to be automatically moderated and to have good protection from users trying to do bad things. Code in the php and in the trigger procs provide two layers of logic that tries to ensure only correct things happen. It takes good advantage of transactions. The RAISE EXCEPTION PL/pgSQL call is used to rollback/abort things that shouldn't happen ... stuff like that. The trigger procs do recursive stuff to manage the threaded messages and topics. Again the php code is an embarrassment, but I don't care! :) -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
[HACKERS] UNDER?
Is UNDER being stripped out for 7.1? I'm looking at documentation and don't want to write about it if it won't be in there. -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
[HACKERS] BETWEEN [SYMMETRIC | ASYMMETRIC]
Here is current cvs: SELECT 2 BETWEEN 1 AND 3; ?column? -- t (1 row) subselects=# SELECT 2 BETWEEN 3 AND 1; ?column? -- f (1 row) Any chance of BETWEEN [SYMMETRIC | ASYMMETRIC] being implemented? SELECT 2 BETWEEN SYMMETRIC 3 AND 1; ?column? -- t (1 row) ASYMMETRIC is the default and what is currently the case. This would probably be easy TODO. -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
[HACKERS] SIMILAR TO for regular expressions
Anyone read the [NOT] SIMILAR TO syntax for regular expressions? Looks like it might be close to an SQL standard synonym for [!]~. I don't know if it can match the case insensitive ops though. -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
Re: [HACKERS] BETWEEN [SYMMETRIC | ASYMMETRIC]
I don't really see this as important enough to justify introducing a nonstandard syntax for it... regards, tom lane Sorry to quote like this, it makes me feel like a real nerd. :) This quote from the SQL standard (1999) has it: 8.3 between predicate Function Specify a range comparison. Format between predicate ::= row value expression [ NOT ] BETWEEN [ ASYMMETRIC | SYMMETRIC ] row value expression AND row value expression Syntax Rules 1) If neither SYMMETRIC nor ASYMMETRIC is specified, then ASYMMETRIC is implicit. 2) Let X, Y, and Z be the first, second, and third row value expressions, respectively. 3) "X NOT BETWEEN SYMMETRIC Y AND Z" is equivalent to "NOT ( X BETWEEN SYMMETRIC Y AND Z )". 4) "X BETWEEN SYMMETRIC Y AND Z" is equivalent to "((X BETWEEN ASYMMETRIC Y AND Z) OR (X BETWEEN ASYMMETRIC Z AND Y))". 5) "X NOT BETWEEN ASYMMETRIC Y AND Z" is equivalent to "NOT ( X BETWEEN ASYMMETRIC Y AND Z )". 6) "X BETWEEN ASYMMETRIC Y AND Z" is equivalent to "X=Y AND X=Z". Access Rules None. General Rules None. Conformance Rules 1) Without Feature T461, "Symmetric between predicate", conforming SQL language shall not specify SYMMETRIC or ASYMMETRIC. 2) Without Feature S024, "Enhanced structured types", no subfield of the declared type of a row value expression that is simply contained in a between predicate shall be of a structured type. -- Robert B. Easter [EMAIL PROTECTED] - -- CompTechNews Message Board http://www.comptechnews.com/ -- -- CompTechServ Tech Services http://www.comptechserv.com/ -- -- http://www.comptechnews.com/~reaster/
Re: [HACKERS] Re: [DOCS] Inheritance docs error.
I thought about this UNDER/INHERITS stuff months ago and wrote this file: http://www.comptechnews.com/~reaster/pgoo.html It might have something of value to someone. I'm not sure everything in the file is correct though. I remember the idea of UNDER is to be compatible with storing data from a Java program, which only does single inheritance of classes and multiple for interface types. UNDER and INHERIT are different enough to be completely separate and coexisting. It's an interesting subject, but I don't have anything much else to say about this topic since I have no plans to implement it! I'd have to study postgres for another year probably first! :) On Sunday 31 December 2000 22:57, Hannu Krosing wrote: Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: They are all correct: UNDER is the new SQL99 syntax, INHERITS is the traditional Postgres syntax. Current docs do appear to be erroneous: they claim the UNDER phrase goes where INHERIT does, which is not what the grammar thinks. I haven't looked at SQL99 to see which is right. The grammar appears to be correct to the extent that SQL99 wants the UNDER before the column list, so I corrected the documentation at that point. However, the syntax as a whole is not SQL99-compliant. Hmm. After looking at the SQL99 syntax, it seems that what we've done with our grammar is to take the old INHERITS functionality and plaster a vaguely-SQL-like syntax on it. I have to wonder whether this is a good idea. I think it'll get in the way when and if we want to offer true SQL99 UNDER behavior, which is only marginally related to INHERITS. (In particular, SQL99 seems to want an explicit specification of the structured type that's being inherited.) I am strongly inclined to rip out the pseudo-UNDER clause and support only the old-style INHERITS syntax for 7.1. UNDER is adding no functionality and I think we will eventually regret using an SQL keyword for non-SQL semantics. Comments? I'm all for it, as UNDER and INHERITS seem to offer different benefits. As UNDER is strictly single-inheritance, the best way to implement it seems to use a single file for all tables "under" the root table which will give us almost automatic primary keys and other constraints which are much trickier to implement or even to define for multimple inheritance (e.g. how do you "inherit" a primary key from two parents' primary keys) So just leave it out until we have a _real_ under implementation, or else someone will use it and lock us into backwards-compatibility trap. -- Hannu -- ---- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/
[HACKERS] Considerations for running current cvs pgsql and pgsql release on same machine?
I'm wanting to run pgsql 7.0.3 release and pgsql current cvs on the same machine without them conflicting (if possible). Can someone explain what I should look out for when trying to do this? I assume I'll have to configure --with-pgport=5433 (something other than 5432). How will the use of the environment variables PGDATA and PGLIB be affected if I have them still pointing at the release version? I'm wanting to begin keeping an updated pgsql-cvs installation running and maybe get active in working on the sources. Maybe I can start out with documentation stuff. I've been following this list long enough and still enjoy it so I want to try towards contributing stuff. -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/
Re: [HACKERS] Considerations for running current cvs pgsql and pgsql release on same machine?
On Friday 22 December 2000 22:05, Tom Lane wrote: I routinely run multiple versions at the same time. You need a separate port, install directory, and data directory for each. Easiest way to do this is to configure the non-default versions with ../configure --with-pgport=nnn --prefix=/path/to/someplace to establish their ports and install dirs, and then initdb each version with the appropriate data directory specified. A user then doesn't have to do much except make his PATH point at the PREFIX/bin dir for the version he wants to use at the moment. You may also find that you have to pump up your kernel's IPC resource parameters in order to start up multiple postmasters. How will the use of the environment variables PGDATA and PGLIB be affected if I have them still pointing at the release version? They had better have the right values while initdb'ing or starting each individual version. There's no good reason to have either one set in the general environment, or actually to set them at all --- you can get the same results with command line switches to initdb and postmaster, with much less chance of bad side-effects. A tip I find handy is to make sure that the databases available under each live postmaster have distinct names. This helps to avoid the mistake of testing against 7.0.2 when you thought you were testing against 7.0.3 or current or whatever... Thanks for these tips. I took out all global PG environment variables from /etc/profile. The way I did it, was to make a directory /etc/pgsql.d and in there have files pgsql.sh and pgcvs.sh for production and cvs test environments. Each sets up the variables: # Change these two PGHOME=/usr/local/pgsql or /home/pgcvs/pgsql PGPORT=5432 or 5433 PGLIB=$PGHOME/lib PGDATA=$PGHOME/data LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PGLIB MANPATH=$MANPATH:$PGHOME/man PATH=$PGHOME/bin export PGHOME PGPORT PGLIB PGDATA LD_LIBRARY_PATH MANPATH PATH These two files are then included into .profile in user directories like: # Pgsql prod .. /etc/pgsql.d/pgsql.sh or # Pgsql cvs dev .. /etc/pgsql.d/pgcvs.sh The cvs development version runs under user pgcvs while the production runs under user postgres as normal. The only little problem about this setup is that I can almost just run pgsql.sh and pgcvs.sh to switch between the two environments while logged in as a user. But if I do, PATH, MANPATH and LD_LIBRARY path, because they append, don't replace one thing for another. I'm sure that can be fixed with some simple bash/awk/sed trick but I haven't tried yet. The next thing is to setup another local-only httpd on port 8080 or whatever and get another php to compile with the cvs libs so I can test web stuff. -- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/
Re: [HACKERS] DB Algorithm Essay, please help
Database research papers at berkeley are at: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/papers/ On Wednesday 13 December 2000 12:16, DÅ wrote: Hi! My name is Daniel Åkerud, a swedish studen, writing an essay for my exam. The label will be something like: "Database algorithms". I know it is a complex task, and will ofcourse, as soon as possible, specify more preciesly what it will be about. I have thoughts about writing about, for example, how searching a database will go faster by indexing certain columns in a table. And what makes this same procedure slower by indexing wrong, or too many. (Correct me if I am wrong). I assume that there is a cascade of algorithms inside the code of a databasemanager. There is no doubt work for me :) Do you have any tips of places where I can gather information? Do you recommend a book in this topic? I have plans of investingating some of the code in several of the Open Source databasemanagers out there. Thank you, I really appreciate your help! Daniel Åkerud SoftwareEngineering, Malmö University. [EMAIL PROTECTED] Get your FREE web-based e-mail and newsgroup access at: http://MailAndNews.com Create a new mailbox, or access your existing IMAP4 or POP3 mailbox from anywhere with just a web browser. -- ---- Robert B. Easter [EMAIL PROTECTED] - - CompTechNews Message Board http://www.comptechnews.com/ - - CompTechServ Tech Services http://www.comptechserv.com/ - -- http://www.comptechnews.com/~reaster/