[GENERAL] date expressions
I checked the manual on this but couldn't find a clear answer: I've got two dates in a database, a start date and and end date, which are type "date." I want to compare these dates to today's date in the SQL statement, something along the lines of "startdate date enddate". Can this be done in the SQL select statement? Thanks in advance _ Get It Gear -- http://www.getitgear.com
[GENERAL] postgresql and web application
Hello All, I am trying to develop web application with postgresql as datastorage, using zope. I read in documentation that postgresql is not multithreaded. So, I understand that I can't use one connection to database for all users and I must to open new connection for every user. Am I right? Or maybe exists a way to work with one connection, wich will execute a several queries simultaneously? -- Best regards, Yury ICQ 11831432 mailto:[EMAIL PROTECTED]
Re: [GENERAL] date expressions
surfer girl wrote: I checked the manual on this but couldn't find a clear answer: I've got two dates in a database, a start date and and end date, which are type "date." I want to compare these dates to today's date in the SQL statement, something along the lines of "startdate date enddate". Can this be done in the SQL select statement? SELECT .. FROM .. WHERE startdate current_date AND enddate current_date
[GENERAL] DB replication
Hi, We have an application which has databases in 2 different machines. The databases are small (25 MB). Every 15 minutes we want DB of one machine to be synced with another machine. Are there ready made utilities in postgres to do this. One way is to take a pgdump, tar it, ftp it and then restore it into the other machine. This has a problem if I want to sync selected tables. Also this means the entire data gets reloaded, whereas only the incremental changes should get dumped. Any help is appreciated. Murali Differentiated Software Solutions Pvt. Ltd., 176, Gr. Floor, 6th Main 2nd Block RT Nagar Bangalore - 560 032 India Ph: 91 80 3431470 email : diffs+AEA-vsnl.com http://www.diffs-india.com
[GENERAL] postgresql and web application
Hello All, I am trying to develop web application with postgresql as datastorage, using zope. I read in documentation that postgresql is not multithreaded. So, I understand that I can't use one connection to database for all users and I must to open new connection for every user. -- Best regards, Yury ICQ 11831432 mailto:[EMAIL PROTECTED]
[GENERAL] demande d'aide
bonjour; tout d'abord, je me presente. je suis un étudiant marocain de la 4eme année et je prépare un projet de fin d'étude dans les deux mois qui suivent. j'aimerais savoir,s'il vous plait, si POSTGRES est intégré dans une version de LINUX et aussi, j'aimerais savoir le mieux entre POSTGRES et MYSQL. dans l'attent de votre réponse agréer monsieur mes salutations les plus vifs. __ Get Your Private, Free Email at http://www.hotmail.com
Re: [GENERAL] unexpected error with array
This example is straight from bruce's book but I am getting an error. Help! [PostgreSQL 6.5.3 on i386-pc-bsdi3.0, compiled by gcc2 ] [snip] test= select col1[4] from array_test; ERROR: Unable to locate type name 'col1' in catalog This is a known bug and will be fixed in 7.0. I think Bruce's book is based on 7.0. -- Tatsuo Ishii
Re: [GENERAL] postgresql and web application
On Fri, 24 Mar 2000, Yury Don wrote: I am trying to develop web application with postgresql as datastorage, using zope. I read in documentation that postgresql is not multithreaded. So, I understand that I can't use one connection to database for all users and I must to open new connection for every user. Am I right? Or maybe exists a way to work with one connection, wich will execute a several queries simultaneously? Zope (actually, Z Pygres Database Adapter) does all neccessary thread locking, so you don't need to worry about shared connections. Also, Zope will open additional connections when it see it'd need more connections. Just download and install proper Database Adapter. The one from Ross Reedstrom is the thing to use. There is Python/Zope Russian mailing list. You are welcome: echo subscribe python | mail [EMAIL PROTECTED] The list is not very active, and I'd be glad inviting more contributors :) Oleg. Oleg Broytmannhttp://members.xoom.com/phd2.1/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN.
Re: [GENERAL] avoiding duplicates
Hi everyone, I have a generel SQL question. What is the best way to avoid inserting duplicate tuples in a table ? using constraints ? Please refer me to a resource about this topic. Thank you for your time, -Sheila __ Get Your Private, Free Email at http://www.hotmail.com
Re: [GENERAL] DB replication
I've had the same question, I believe the best it gets will be something like running rsync over an encrypted (if needed for security) tunnel (ssh). But you'll have to user some dump utility as far as I know. Cheers Wim. - Oorspronkelijk bericht - Van: Differentiated Software Solutions Pvt. Ltd. +ADw-diffs+AEA-vsnl.com+AD4- Aan: +ADw-pgsql-general+AEA-postgresql.org+AD4- Verzonden: Friday, March 24, 2000 9:19 AM Onderwerp: +AFs-GENERAL+AF0- DB replication +AD4- Hi, +AD4- +AD4- We have an application which has databases in 2 different machines. +AD4- The databases are small (25 MB). +AD4- +AD4- Every 15 minutes we want DB of one machine to be synced with another +AD4- machine. Are there ready made utilities in postgres to do this. +AD4- One way is to take a pgdump, tar it, ftp it and then restore it into the +AD4- other machine. +AD4- This has a problem if I want to sync selected tables. Also this means the +AD4- entire data gets reloaded, whereas only the incremental changes should get +AD4- dumped. +AD4- +AD4- Any help is appreciated. +AD4- +AD4- Murali +AD4- +AD4- Differentiated Software Solutions Pvt. Ltd., +AD4- 176, Gr. Floor, 6th Main +AD4- 2nd Block RT Nagar +AD4- Bangalore - 560 032 +AD4- India +AD4- Ph: 91 80 3431470 +AD4- email : diffs+AEA-vsnl.com +AD4- http://www.diffs-india.com +AD4-
Re: [GENERAL] use of currval and nextval in PHP3
You only need grants on select and update for sequence tables. Mikio Mike Mascari wrote: sheila bel wrote: Hi everyone, I'm trying to use currval from php3. This is what I'm doing : $result=pg_Exec($conn,$addstmt) (where $addstmt is a insert statement) $result2=pg_Exec($conn,"SELECT currval('table_id_seq')"); This is the ERROR message that I'm getting: Warning: PostgresSQL query failed: ERROR: table_id_seq.currval: Permission denied. in /home/httpd/html/ces/php3/add.php3 on line 51 In psql I have granted permission as follows : grant all on table to nobody; Does anyone know why I'm getting this error and how it can be fixed ? Is there any other way of using currval or nextval in php3 ? Thanks in advance for your help, -Sheila Sequences have permissions as well. So all you should have to do is: grant all on table_id_seq to nobody; Hope that helps, Mike Mascari -- ** ** * Mikio-Yves Matsuo Newbridge Networks Corporation * * Software Designer 600 March Road Box 13600 * * [EMAIL PROTECTED]Kanata, Ontario K2K 2E6* * http://www.newbridge.com * ** **
Re: [GENERAL] demande d'aide
'jour Linux, soi-meme, ca n'est plus que le "kernel", ou la systeme d'operation soi-meme. On dit aussi la systeme Gnu/Linux, parce que presque tous les utilities au niveau de fiche sont ecrit par la groupe GNU (http://www.gnu.org), aussi que des applications, comme emacs, etc. Mais tous les distributeurs de Linuxe, soit RedHat, soit Corel, soit Debian, soit n'importe qui, presentent leur distribution avec beaucoup des applications qui ne coute rien, et, d'habitude, on trouve postgresql la. Le plupart des distributions utilise une methode facile d'installation, soit les RPMS de RedHats, soit les packages de Debian. Alors, postgresql n'est pas integre, mais c'est facile a retrouver et a installer. En plus de ca, on peut prendre la source et la compilez tres facilement pour beaucoup des varietes de Unix. Peut-etre tout le monde va me battre pour ce-ci, mais on ne peut pas dire "le mieux" database. MySQL est bien vite et assez facile a comprendre, et on veut peut-etre l'utiliser pour applications simple du WWW. Postgresql est plus conformable au SQL-92, et il a plus des caracteristiques encherissant la tache du programmeur. On me dit qu'il est plus "scalable" aussi, mais franchement je ne sais pas. Meilleurs voeux, Moray McConnachie - Original Message - From: "chriqi abdelkarim" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 24, 2000 1:16 PM Subject: [GENERAL] demande d'aide bonjour; tout d'abord, je me presente. je suis un étudiant marocain de la 4eme année et je prépare un projet de fin d'étude dans les deux mois qui suivent. j'aimerais savoir,s'il vous plait, si POSTGRES est intégré dans une version de LINUX et aussi, j'aimerais savoir le mieux entre POSTGRES et MYSQL. dans l'attent de votre réponse agréer monsieur mes salutations les plus vifs.
[GENERAL] Should've used postgresql! ;-)
http://linuxtoday.com/ -- Timothy H. Keitt National Center for Ecological Analysis and Synthesis 735 State Street, Suite 300, Santa Barbara, CA 93101 Phone: 805-892-2519, FAX: 805-892-2510 http://www.nceas.ucsb.edu/~keitt/ Fatal error: Call to unsupported or undefined function mysql_errno() in /www/lt/include/db_mysql.inc on line 49
Re: [GENERAL] DB replication
I'd recommend changing the structure of your tables, adding a record_added field, and then do a SELECT * FROM table WHERE record_added CURRENT_TIMESTAMP - '15min' ::datetime and having a PERL program pipe the results of the select into the other database using DBI with two connections. BTW: The SELECT statement above probably doesn't work, as I can never remember the time functions/macros. It should give you the general idea though. At 04:19 AM 3/24/00, Differentiated Software Solutions Pvt. Ltd. wrote: Hi, We have an application which has databases in 2 different machines. The databases are small (25 MB). Every 15 minutes we want DB of one machine to be synced with another machine. Are there ready made utilities in postgres to do this. One way is to take a pgdump, tar it, ftp it and then restore it into the other machine. This has a problem if I want to sync selected tables. Also this means the entire data gets reloaded, whereas only the incremental changes should get dumped. Any help is appreciated. Murali Differentiated Software Solutions Pvt. Ltd., 176, Gr. Floor, 6th Main 2nd Block RT Nagar Bangalore - 560 032 India Ph: 91 80 3431470 email : diffs+AEA-vsnl.com http://www.diffs-india.com
Re: [GENERAL] avoiding duplicates
On Fri, 24 Mar 2000, sheila bel wrote: Hi everyone, I have a generel SQL question. What is the best way to avoid inserting duplicate tuples in a table ? using constraints ? Please refer me to a resource about this topic. primary key -- which you can say is also a contraint. of course, unique contraint also.
[GENERAL] Postgres and clustering/scaling....
Our company is getting to where we need to think of turning our Postgres server into a cluster. We've come up with a few very viable ideas, but we'd love to hear of anything that others have done along this line. steve
[GENERAL] postgresql 7.0beta2 - bugs?
hi, i just upgraded to postgresql 7.0beta2 on a i586 linux machine running redhat 6.1. the compile/install went without a hitch. when trying to run the regression tests, here is what i noticed... regress.sh: psql does not support the -X option. not too sure what it was for in earlier versions. so i simply deleted the option :) command 'dropdb' was not found. changed all occurences to 'destroydb' with these changes, all the regression tests run, but all of them fail. seems like the actual tests are passing (ie, the sql is ok) but diff fails. the reason seems to be an extra blank line after each command in the results. is there a new suite of expected/* and resultmap for postgresql7.0? i will help with their creation in whatever way i can... sampath -- Sampath Krishna, Ph.D. 285 Greenfield Road Bridgewater, NJ 08807 Home: 908-429-0450 Work: 973-267-8830 x1987 [EMAIL PROTECTED]
Re: [GENERAL] demande d'aide
Postgres fait partie de RedHat linux. Postgres ne se compare pas facilement a MYSQL car il est un vrai RDBMS (relational database). MYSQL est une emulation partielle. Patrick Robin chriqi abdelkarim wrote: bonjour; tout d'abord, je me presente. je suis un étudiant marocain de la 4eme année et je prépare un projet de fin d'étude dans les deux mois qui suivent. j'aimerais savoir,s'il vous plait, si POSTGRES est intégré dans une version de LINUX et aussi, j'aimerais savoir le mieux entre POSTGRES et MYSQL. dans l'attent de votre réponse agréer monsieur mes salutations les plus vifs. __ Get Your Private, Free Email at http://www.hotmail.com -- Patrick Robin [EMAIL PROTECTED] Walt Disney Feature Animation 500 South Buena Vista Street Burbank,California 91521-4817
[GENERAL] limit on 'text' field?
Hi folks, I have an UPDATE command that's storing news articles and writing an article to a field of type 'text' and it's failing with a "query too long" error message. I tried pasting the query into psql and it's giving me the "query buffer max length of 16384 exceeded" error. So, I guess the first question is, what's the length on a 'text' field? And where do I go from here? Is it Large Objects? (I've seen that mentioned on this list but don't know much about that.) If anyone has any ideas, or references of places to look for more information, that would be great. thanks, -stan