Re: [GENERAL] Is it possible (postgresql/mysql)

2006-08-16 Thread Harald Armin Massa
Louis,indizes are simply created outside the create tableCREATE INDEX someTable_Date_create  ON someTable  USING btree  (date_create);As you are working on transferring, maybe you like to drop those varchar(xx) and replace them with text. Saves a lot of hassle lateron. HaraldOn 8/16/06, louis gonza

Re: [GENERAL] Migrating PostgreSQL database to MySQL/MS Access

2006-08-13 Thread Harald Armin Massa
Merlin,the .net 'way' of database application development is to keep all the logic in the .net middleware.  please note that I am completelyopposed to this because it obfuscates good data management practices.are you serious and well informed about this? There is really again somebody throwing away

Re: [GENERAL] Tuning to speed select

2006-08-09 Thread Harald Armin Massa
Louis,Views certainly help in managing complexity. They do nothing to improve query-speed. Querying a view gets rewritten to queries to the underlying tables on the fly.(as long as there are no materialized views, which are still on a the TODO list) -- GHUM Harald Massapersuadere et programmareHara

Re: [GENERAL] could not open relation - why?

2006-08-07 Thread Harald Armin Massa
> Oh, I assumed you had reason to think that the error message came from> autovacuum.  It could easily have been the same situation except two> unrelated processes.Surely my mistake in error reporting. Just cut out the "surrounding lines" from the log; like in contextual diff :( > What indeed happe

Re: [GENERAL] could not open relation - why?

2006-08-07 Thread Harald Armin Massa
> 2006-08-07 13:20:27 LOG:  autovacuum: processing database "template1" > 2006-08-07 13:20:47 ERROR:  could not open relation with OID 311438> 2006-08-07 13:21:52 LOG:  autovacuum: processing database "postgres"The easiest explanation is that someone dropped a table just as autovacuum was trying to

[GENERAL] could not open relation - why?

2006-08-07 Thread Harald Armin Massa
Hello,within my log there is the following snippet:2006-08-07 13:20:27 LOG:  autovacuum: processing database "template1"2006-08-07 13:20:47 ERROR:  could not open relation with OID 3114382006-08-07 13:21:52 LOG:  autovacuum: processing database "postgres" now there are a number of possibilites, why

Re: [GENERAL] when do pg_temp SCHEMAS get purged?

2006-08-02 Thread Harald Armin Massa
Tom,> Those schemas seem to get more and more and more. Is anyprocess taking care > of purging the ones no longer needed?We don't bother.  One row in pg_namespace is not worth removing,especially when it's likely to be needed again someday.thanks for the information! Now I understand: every backend

[GENERAL] when do pg_temp SCHEMAS get purged?

2006-08-02 Thread Harald Armin Massa
I create 2 temp tables on each connection to store session relevant variables.It works beautifully with code I robbed accross postgresql mailinglists:CREATE OR REPLACE FUNCTION set_quarant(mylvlquarant int4)   RETURNS int4 AS$BODY$    BEGIN    perform relname from pg_class    where relname

Re: [GENERAL] Error in PostgreSQL query with psycopg

2006-07-31 Thread Harald Armin Massa
Parthan,never, never, never try quoting on your own! You can only fail. The only choice is to fail now or later.The only recommended way with Python and DBAPI2.0 is:lala="huibuh"cs.execute ("select bla from foo where schupp=%s", (lala,))or bettercs.execute ("select bla from foo where schupp=%(lala

Re: [GENERAL] psql seems to hang during delete query

2006-07-19 Thread Harald Armin Massa
You can't delete from a full disk :)No, really: database systems need space for logging, WAL, whatever.And even with "delete" PostgreSQL will free no single byte, as deleting is done with marking the row as deleted. Read up on multi version concurrency why this has to be that way. To reclaim space:

Re: [GENERAL] Newbie help please....

2006-07-17 Thread Harald Armin Massa
Sue,you can walk an easier road to get your Excel Table filled with PostgreSQL data:there is an ODBC.Driver for PostgreSQL, you can google it or find it within the standard PostgreSQL for Windows Installer. After installing the ODBC driver, PostgreSQL is a normal data soure to Excel; you can put yo

Re: [GENERAL] Scaleable DB structure for counters...

2006-07-16 Thread Harald Armin Massa
Eci,I could not google them up quickly, but there are people dealing with tables with millions of records in PostgreSQL.Per technical data the number of rows in a table is unlimited in PostgreSQL: http://www.postgresql.org/about/There may be performance-reasons to split up a table of that size, but

Re: [GENERAL] Scaleable DB structure for counters...

2006-07-16 Thread Harald Armin Massa
Eci,the usual way is:create table books (id_book serial, author text, title text ...)create table access (id_access serial, id_book int4, timeofaccess timestamp,...)then for every access you write 1 record to access. A rough estimate: a book may be lent out every hour once, so that is 8544 records

Re: [GENERAL] [pgadmin-support] Emergency - postgre is not working

2006-07-11 Thread Harald Armin Massa
ed with something like "pg_ctl.exe not found"; but your PostgreSQL installation seems fine. Tried to help you online, but you were unavailable... no idea of your time zone, though.Good luck with the repair, and please keep us posted,best wishes,Harald  On 7/11/06, Harald Armin Massa <

Re: [GENERAL] [pgadmin-support] Emergency - postgre is not working

2006-07-11 Thread Harald Armin Massa
the Owner (administrator) account and a postgre account - the postgre acccount requires a password - unfortunatly when I get the password from sambc/core.xml file - the password does not work HELP   Thank you Anika Evans On 7/10/06, Harald Armin Massa <[EMAIL PROTECTED] > wrote: Anik

Re: [GENERAL] Best security practices for installing pgSQL with my software

2006-06-12 Thread Harald Armin Massa
Greg, The program will have a database on the local PC, and be able to connect to the server database as well. Eventually they will synchronise the email, contacts etc.aaah. Like Lotus Notes.   I need the database on the local PC so the user can take their PC/laptop home and still work.Yes, now it

[GENERAL] Invitation to EuroPython conference

2006-06-11 Thread Harald Armin Massa
Python and PostgreSQL are a match made in heaven. That will be one of more then 100 talks at the EuroPython 2006 in CERN, Switzerland.Up to 2006-06-11 you can register at around 20% discount.Best wishes, HaraldSoftware developers from around the world will gather July 3-5 inGeneva, Switzerland for

Re: [GENERAL] Out of Memory Error on Postgresql 8.1.3. on win32

2006-06-08 Thread Harald Armin Massa
I didn't see any strange number in your log message and 16777212 is 16M,which is not a scary number ... is there any other memory-exhausting program in the same machine?Besides Windows 2003, PostgreSQL Server and the Oracel CLIENT libraries the only thing running is a script of mine (which uses aro

[GENERAL] Out of Memory Error on Postgresql 8.1.3. on win32

2006-06-08 Thread Harald Armin Massa
Hello,today postgresql 8.1.3 on win32 died:2006-06-08 16:33:09 LOG:  autovacuum: processing database "ibox"TopMemoryContext: 84400 total in 7 blocks; 12696 free (22 chunks); 71704 usedOperator class cache: 8192 total in 1 blocks; 4936 free (0 chunks); 3256 used TopTransactionContext: 8192 total in

Re: [GENERAL] Installing PostGreSQL automatically

2006-06-05 Thread Harald Armin Massa
, Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - on different matter: did you ever dream of visiting CERN? The place where the antimatter for exploding Vatican is created? To eat in cantinas with the worlds highest

Re: [GENERAL] Using postgresql as desktop DB

2006-06-03 Thread Harald Armin Massa
postgresql.conf. Best wishes, Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - on different matter: did you ever dream of visiting CERN? The place where the antimatter for exploding Vatican is created? To eat in cantinas with the

Re: [GENERAL] Free 1000 Rupee bank note

2006-05-29 Thread Harald Armin Massa
And even if you can convert it, as of today 1000 Rupees is 17.16745 Euro, or 21.85553 US Dollar, which, concerning the convertion fee, would not give a real good meal in Europe or USA. Harald - on different matter: did you ever dream of visiting CERN? The place where the antimatter for explodin

[GENERAL] challenging constraint situation - how do I make it real in SQL?

2006-05-24 Thread Harald Armin Massa
ime" each id only exists once? Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - PostgreSQL - supported by a community that does not put you on hold ---(end of broadcast)--- TIP

Re: [GENERAL] Installing PostGreSQL automatically

2006-05-23 Thread Harald Armin Massa
te: Ok, I have installed PostGreSQL as a service with pg_ctl. But when I try to start the service using pg_ctl start, I am told I have to run the service under a non-administrator account. Which account is used/created by the standard PostGreSQL MSI installer? -Original Message- From:

Re: [GENERAL] Installing PostGreSQL automatically

2006-05-22 Thread Harald Armin Massa
include" the MSI definitions from there (they are made for the "free" tools from MS to build installers) Best wishes Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - PostgreSQL -

Re: [GENERAL] Installing PostGreSQL automatically

2006-05-22 Thread Harald Armin Massa
to my application, and would like PgSQL to be installed in the background. What files/registry entries do I need to make to have this done? Thanks Greg -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - PostgreSQL - supporte

Re: [GENERAL] GUI Interface

2006-05-12 Thread Harald Armin Massa
Okay, so I voted and I see Linux leads the pack 16 of 29.  I return afew moments later and Linux leads the pack 13 to 24.  What gives?? Didn't you read about some part of the websites working on MySQL? Why are you then surprised?tongue-in-cheek,Harald-- GHUM Harald Massapersuadere et programmare Ha

Re: [GENERAL] Starting Postgresql as windows service

2006-04-25 Thread Harald Armin Massa
Rajarajan,please check the postgresql logs witin pg_logyour data directory defaults to [programs]\Postgresql\8.1\datawhere [programs] is ~"Programs and Files" in US Windows, and "Programme" in German Windows. Propably there is some problem with postgresql.conf or access to your datafiles; the log

Re: [GENERAL] psql: FATAL: missing or erroneous pg_hba.conf file

2006-04-21 Thread Harald Armin Massa
Mark,and what exactly is there in server log? psql: FATAL:  missing or erroneous pg_hba.conf file HINT:  See server log for details. Reading your words I assume you made a typing error while editing pg_hba.confHarald-- GHUM Harald Massapersuadere et programmareHarald Armin MassaReinsburgstraße 202

Re: [GENERAL] Unable to connect to PostgreSQL server

2006-04-20 Thread Harald Armin Massa
Martin,please check out the server configuration documentation athttp://www.postgresql.org/docs/8.1/interactive/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SETTINGS your configuration file of choice is postgresql.conf within the data directory.(btw: because the default is rather big, i

Re: [GENERAL] browser shows garbage instead of UTF-8 characters

2006-04-13 Thread Harald Armin Massa
Sadm,what is the encoding setting of your database driver?What happens if you put out the retrieved Data to a console or a debug window?Have you analyzed the garbage, what is it? Escaped Characters? Hungarian? Arabian? Chinese?? How do you "fetch a record", how do you output it to "THE" "Web browse

[GENERAL] how can I create the DML for an existing database - within an application

2006-04-12 Thread Harald Armin Massa
I want to get the output frompg_dump --struct-only --table=whateverinside a programm. Of course I could call pg_dump in a seperate process and capture the output and all; but ...as PGAdmin is doing it someway, I strongly suspect there is a kind of call to recreate the DML language from a table in t

Re: [GENERAL] Updating & inserting in one shot!

2006-04-10 Thread Harald Armin Massa
nearly ready to usereplace (int4, text, "timestamp") with your fieldtypes; its convention: first param is primary keyreplace    update bcachekredbetr set     betreuer=$2, letztespeicherung=$3     where id_p=$1; with the appropriate update (where clause -> references prim

[GENERAL] picking the correct locale when doing initdb

2006-03-16 Thread Harald Armin Massa
on bugs Magnus wrote:> It's a matter of picking the correct locale when you initdb your database.and he is PERFECTLY right. Getting the locale wrong while doing intidb can really screw up ones day. But: because of initdb being at the very beginning, it is a really tough decision based on not a lot

Re: [GENERAL] PostgreSQL on Windows not starting

2006-03-15 Thread Harald Armin Massa
Chris,i dove through all sorts of pain with windows security and PostgreSQL services while postgresql on win32 was in beta. Even deployed some big application to > 30 computers installing win32 PostgreSQL in beta. So, some areas where I had things to learn:  1.) group policies. On win32 computers w

Re: [GENERAL] What's a good default encoding?

2006-03-15 Thread Harald Armin Massa
Good default encoding:does somebody NOT agree that UTF8 is quite a recommendation, at least for all the people without Korean, Japanese and Chinese Chars? I know, that's at maximum 2/3 of our potential user base, but better then nothing. Maybe we could even "suggest" UTF8 in the "getting started" (

Re: [GENERAL] stored procedure

2006-03-14 Thread Harald Armin Massa
Mary wondered:>I am wondering how i could create stored procedure using postgresqlSee chapters 35ff in the Server programming manual @ http://www.postgresql.org/docs/8.1/interactive/server-programming.htmlBest wishesHarald-- GHUM Harald Massapersuadere et programmareHarald Armin MassaReinsburgstra

[GENERAL] Error correction to FAQ

2006-02-23 Thread Harald Armin Massa
Within the FAQ, Point 4.5 there is:[]The size of the PostgreSQL database file containing this data can be estimated as 6.4 MB: []685 database pages * 8192 bytes per page = 5,611,520 bytes (5.6 MB)So, the detailed calculation results in 5,6MB, surrounding text is 6,4 MB. Please somebod

Re: [GENERAL] Domains

2006-02-18 Thread Harald Armin Massa
I do not know about the word "domains" in this usage.But all your problems with "varchar(x)" for any values of x are solved by just using type "text"Harald 'email'(varchar 128). Then I change my mind and want to increase all columnst that have type 'emaill' to varchar(255). -- GHUM Harald Massapers

Re: [GENERAL] TSearch2 / German compound words / UTF-8

2006-01-27 Thread Harald Armin Massa
Teodor,To all: May be, we should put all snowball's stemmers (for all available languages and encodings) to tsearch2 directory?Yes, that would be VERY helpfull. Up to now I do not dare to use tsearch2 because "get stemmer here, get dictionary there..."Harald -- GHUM Harald Massapersuadere et progra

Re: [GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations loadable?

2005-11-25 Thread Harald Armin Massa
Florian, thank you very much for those solutions; I shortened them, resend them for "increased google presence" :) 1) Use [...] --disable-trigger option  [...] 2) foreign keys as "deferrable",  do "set contraints alldeferred" before loading the data. 3)  split the schema dump into two files, a) tab

[GENERAL] pg_dump --data-only: is dump ordered to keep foreign-key-relations loadable?

2005-11-24 Thread Harald Armin Massa
I migrated one database from 8.0 to 8.1That I used to do add "without oids" to all tables.First step so:pg_dump --schema-only  -U user databasethe file was edited, all tables to "withoud oids"; and reloaded in 8.1After that I pg_dump --data-only -U user databaseand tried to reload the data. But it

Re: [GENERAL] Private email requests

2005-11-23 Thread Harald Armin Massa
Bruce, list, I translated that part to german, I know the source is strong in Germany - maybe it can be a helpfull addition - even if most speak English, they are even more happy to read sth. in German. Harald  Due to time constraints, I do not directly answer general PostgreSQLquestions.  For a

Re: [GENERAL] shorter way to get new value of serial?

2005-11-21 Thread Harald Armin Massa
Alban Hertroys,Why don't you just use the default? You could entirely do away with the 'result' variable that way:because I need to know which is the new id of that computer. The other way would be "insert if not exists" and again "select where name = ..." -> 1 statement more, and without a stored

[GENERAL] shorter way to get new value of serial?

2005-11-18 Thread Harald Armin Massa
I have a table:CREATE TABLE rechner(  id_r int4 NOT NULL DEFAULT nextval('rechner_id_r_seq'::regclass),  name text,  CONSTRAINT rechner_pkey PRIMARY KEY (id_r)) CREATE UNIQUE INDEX rechner_name   ON rechner  USING btree  (name);and want to have the existing or new id of 'newobjekt'CREATE OR REPLACE

<    1   2