[GENERAL] serialization errors when inserting new records
Hoi, I searched the archives but couldn't find an answer to this: I have a table (simplyfied) CREATE TABLE test ( id INT PRIMARY KEY, name VARCHAR(250) ); I insert records with INSERT INTO test (id, name) SELECT COALESCE(MAX(id)+1, 1), 'name' FROM test Ofcourse this gives problems when two clients are inserting a record at the same time. (duplicate primary keys) But, i can't use a sequence in my application (the pk consists of more than just a sequence) one solution would be to do a 'LOCK TABLE test IN SHARE MODE' before inserting. This solves my problem but i'm not sure if its the best way to deal with this kind of concurrency problems ? Is there a better way ? Thanks in advance. Ralph. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [GENERAL] serialization errors when inserting new records
Am Samstag, den 22.01.2005, 11:14 +0100 schrieb Ralph van Etten: > Hoi, > > I searched the archives but couldn't find an answer to this: > > I have a table (simplyfied) > > CREATE TABLE test ( > id INT PRIMARY KEY, > name VARCHAR(250) > ); > > I insert records with > > INSERT INTO test (id, name) > SELECT COALESCE(MAX(id)+1, 1), 'name' FROM test > > Ofcourse this gives problems when two clients are inserting a record at > the same time. (duplicate primary keys) But, i can't use a sequence in my > application (the pk consists of more than just a sequence) > > one solution would be to do a 'LOCK TABLE test IN SHARE MODE' before > inserting. This solves my problem but i'm not sure if its the > best way to deal with this kind of concurrency problems ? Is there a > better way ? Of course. The solution to this problem is inherent to a good database and has therefore been done long long ago ;) See: http://borg.postgresql.org/docs/7.4/static/datatype.html#DATATYPE-SERIAL Regards Tino ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [GENERAL] serialization errors when inserting new records
Ralph van Etten wrote: Hoi, I searched the archives but couldn't find an answer to this: I have a table (simplyfied) CREATE TABLE test ( id INT PRIMARY KEY, name VARCHAR(250) ); I insert records with INSERT INTO test (id, name) SELECT COALESCE(MAX(id)+1, 1), 'name' FROM test Ofcourse this gives problems when two clients are inserting a record at the same time. (duplicate primary keys) But, i can't use a sequence in my application (the pk consists of more than just a sequence) It's not clear why you can't use a serial as the primary key or as part of the primary key. From your example it looks like you are trying to do exactly that. What does your *real* primary key consist of? Cheers, Gary. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
On Fri, Jan 21, 2005 at 06:19:53PM -0600, Andrew L. Gould wrote: > On Friday 21 January 2005 12:55 pm, Chris Green wrote: [snip question] > > Many languages have the capacity to access PostgreSQL databases > including Python (with PyGreSQL), Perl (with DBI), PHP (compile in > support), Delphi and Java (with JDBC) to name a few. The selection of > GUI tools for forms depends upon the language. > Yes, I was hoping for a bit more help than just a language interface but if I have to I'll go down that route. > You can also use other databases applications that make use of ODBC > links such as MS Access and Paradox. (Attempts with Lotus Approach > failed horribly.) At work, I've used MS Access to create several > front-end applications to PostgreSQL database servers. > Now that *is* a possibility, I have Access at least. Though that prevents me making a totally Linux based application. > Gnumeric, a spreadsheet application, is supposed to be able to access > several databases natively (not odbc) via gnomedb. I've gotten gnomedb > to connect to the database; but I can't find any documentation as to > how to get the data into the spreadsheet. > Those might be useful too, thanks. -- Chris Green ([EMAIL PROTECTED]) "Never ascribe to malice that which can be explained by incompetence." ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
None have mentioned pgaccess yet. I haven't used it on a regular basis, but at least it builds and runs on my Mac (and therefore, linux, etc.) Sean - Original Message - From: "Chris Green" <[EMAIL PROTECTED]> To: Sent: Saturday, January 22, 2005 7:57 AM Subject: Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there? On Fri, Jan 21, 2005 at 06:19:53PM -0600, Andrew L. Gould wrote: On Friday 21 January 2005 12:55 pm, Chris Green wrote: [snip question] Many languages have the capacity to access PostgreSQL databases including Python (with PyGreSQL), Perl (with DBI), PHP (compile in support), Delphi and Java (with JDBC) to name a few. The selection of GUI tools for forms depends upon the language. Yes, I was hoping for a bit more help than just a language interface but if I have to I'll go down that route. You can also use other databases applications that make use of ODBC links such as MS Access and Paradox. (Attempts with Lotus Approach failed horribly.) At work, I've used MS Access to create several front-end applications to PostgreSQL database servers. Now that *is* a possibility, I have Access at least. Though that prevents me making a totally Linux based application. Gnumeric, a spreadsheet application, is supposed to be able to access several databases natively (not odbc) via gnomedb. I've gotten gnomedb to connect to the database; but I can't find any documentation as to how to get the data into the spreadsheet. Those might be useful too, thanks. -- Chris Green ([EMAIL PROTECTED]) "Never ascribe to malice that which can be explained by incompetence." ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
On 21/01/2005 18:55 Chris Green wrote: All I want is a way to produce reasonably functional forms for entering data into a Postgresql database which will allow me to do the following:- Show a database table in a 'table view' type format which will allow deletion, modification and insertion of rows. Has 'hooks' so that one can have actions which occur on entry to and exit from certain fields. Can calculate and preload some fields. I don't need sophisticated layout facilities, nor do I need sophisticated reporting as I think knoda can do all I need on that front. OpenOffice has forms and database access. It may suit your needs. -- Paul Thomas +--+---+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+---+ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
On Saturday 22 January 2005 06:57 am, Chris Green wrote: > On Fri, Jan 21, 2005 at 06:19:53PM -0600, Andrew L. Gould wrote: > > On Friday 21 January 2005 12:55 pm, Chris Green wrote: > > [snip question] > > > Many languages have the capacity to access PostgreSQL databases > > including Python (with PyGreSQL), Perl (with DBI), PHP (compile in > > support), Delphi and Java (with JDBC) to name a few. The selection > > of GUI tools for forms depends upon the language. > > Yes, I was hoping for a bit more help than just a language interface > but if I have to I'll go down that route. There are many free GUI's built for database access (many of them web-based using php); but most of them focus on database administration. > > > You can also use other databases applications that make use of ODBC > > links such as MS Access and Paradox. (Attempts with Lotus Approach > > failed horribly.) At work, I've used MS Access to create several > > front-end applications to PostgreSQL database servers. > > Now that *is* a possibility, I have Access at least. Though that > prevents me making a totally Linux based application. CodeWeavers has MS Office 2000 working in their Crossover Office (WINE) product. Access locks up under heavy load (clinical data analysis), so it's not an option for my uses; but your needs may vary. > > > Gnumeric, a spreadsheet application, is supposed to be able to > > access several databases natively (not odbc) via gnomedb. I've > > gotten gnomedb to connect to the database; but I can't find any > > documentation as to how to get the data into the spreadsheet. > > Those might be useful too, thanks. Also, take a look at kexi (http://www.kexi-project.org), a KDE replacement for MS Access. Unfortunately, it's not soup yet. Good luck, Andrew Gould ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
On Sat, Jan 22, 2005 at 08:13:52AM -0500, Sean Davis wrote: > None have mentioned pgaccess yet. I haven't used it on a regular basis, > but at least it builds and runs on my Mac (and therefore, linux, etc.) > It looks good but I can't work out how to actually download it. -- Chris Green ([EMAIL PROTECTED]) "Never ascribe to malice that which can be explained by incompetence." ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
> There are many free GUI's built for database access (many of them > web-based using php); but most of them focus on database > administration. I think the reason for that is that database administration is easier to parameterize. There are so many different things that an application might (or should) do that writing a generalized application development tool is a huge task. Making it reasonably secure, multi-user aware and web-based adds extra levels of challenges. I've been playing around with writing a table-driven web-based database query/edit tool for the last year and a half. It works fairly well for some in-house applications and at one of my clients. Once I get through the major portion of the job for this client (around the end of April, I hope), I'm hoping to have time to look at what it would take to turn this into a project that can be released into the open source community. While it was written (in PHP) with PostgreSQL in mind, I've already used it with limited sucess with other database back ends, specifically MySQL and Oracle. I think it should be possible to make it work with any database for which there is a PEAR implementation in PHP. -- Mike Nolan ---(end of broadcast)--- TIP 8: explain analyze is your friend
[GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird
I know this isn't entirely postgresql specific, but it wouldn't be on another list either so here goes... I am writing an open source application where I would like to support at least oracle, and possibly firebird or DB2, in addition to postgresql which will be the default. I'm not going to try to support mysql. The application has many users, and in postgresql what works well is to create a schema for each user instead of a separate database. The main reason for schema's instead of databases is that the app runs under mod perl, and there are too many users to have a pool of open connections to each database. There are also a set of common functions that I usually store in the public schema. That way when working with the data of a particular user I can do a SET search_path TO user,public, and have access to all the functions without having to duplicate them in every schema. My question is how easily would this work with other databases? I know Oracle supports schema's, but I dont' know about the others. I also don't know if other databases have the concept of a search path, but I would think that they do. Chris ---(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] Data format and display
=?ISO-8859-1?Q?Josu=E9_Maldonado?= <[EMAIL PROTECTED]> writes: > I have a table that contains this raw data: > epr_procode | epr_tipo | epr_mes | epr_valor | zert_title > -+--+-+---+-- > 00C188 | VTA | 200309 | 2116. | Venta > 00C188 | CTO | 200309 | 1600.0700 | Costo > 00C188 | VTA | 200311 | 3450. | Venta > 00C188 | CTO | 200311 | 2687.4200 | Costo > I need to display it this way: > TITULO |200309|200310 |200311 |200312 > -+--+-+---+-- > Venta |2116. |0. |3450. |0. > Costo |1600.0700 |0. |2687.4200 |0. I think the "crosstab" functions in contrib/tablefunc/ might help you. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
[GENERAL] pg SQL question
There's probably an obvious answer for this, but I couldn't see it in the docs. What's the simplest way to concatenate multiple same-column values in SQL? For example, suppose I have table foo (key integer, id integer, entry varchar) with data key id entry 1 1 "Four score and seven years ago our fathers " 1 2 "brought forth on this continent, a new nation, " 1 3 "conceived in Liberty, and dedicated to the " 1 4 "proposition that all men are created equal." and I want to produce the following result: "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal." I know this could be done writing a plpgsql function, but it seems so basic, I thought there might be something I'm overlooking. TIA. Ed ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [GENERAL] SSL
"Oluwatope Akinniyi" <[EMAIL PROTECTED]> writes: > I presume this extract suggests that one is running a unix or linux > flavour. What are the equivalent location in Windows XP? You seem to be reading prerelease documentation. http://www.postgresql.org/docs/8.0/static/libpq-ssl.html 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
Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird
Chris <[EMAIL PROTECTED]> writes: > ... My question is how easily would this work with other databases? I > know Oracle supports schema's, but I dont' know about the others. I > also don't know if other databases have the concept of a search path, > but I would think that they do. AFAIK the idea of a schema search path is specific to PG. I'm not sure how you will handle your "public" functions in other DBMSes. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [GENERAL] pg SQL question
On Sat, Jan 22, 2005 at 02:03:58PM -0700, Ed L. wrote: > > There's probably an obvious answer for this, but I couldn't see it in the > docs. What's the simplest way to concatenate multiple same-column values > in SQL? You can create an aggregate that does nothing but concatenate the entries: CREATE AGGREGATE concat ( BASETYPE = TEXT, SFUNC = textcat, STYPE = TEXT, INITCOND = '' ); This uses the "textcat" function, which is already lurking in Postgres to implement the || operator. Then you can go: SELECT concat(entry) FROM ( SELECT * FROM speech ORDER BY id ) AS lines; And it will do what you want. The subselect with the ORDER BY guarantees that the lines come out in the order you put them in. Richard ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird
> > AFAIK the idea of a schema search path is specific to PG. I'm not sure > how you will handle your "public" functions in other DBMSes. > >regards, tom lane > I'll probably have to go research this for each database. I have no plans on immediately supporting other databases, but I don't want to use a structure that will be extremely difficult to port down the road. Chris ---(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
[GENERAL] About PostgreSQL 8.0
Hi. I've started to learn SQL about 6 months ago, and now I'd upgraded PostgreSQL 7.4 to new release 8.0. After upgrading I start to read the README file (how stupid I was) and there were instructions to how to do it; the upgrade I mean. Now I'm wondering, server is not running because fileformat or something like that is wrong - I did the upgrade wrongly. I do not have any relevant data in the Postgre database, so I don't need to backup it (which was one point of the upgrading). How I must have to proceed that I can start the Postgre server? Do I use the initdb command and if I do, how I do it with default locations? I'm very new on PostgreSQL and do not have much experience on SQL. I'm running on FC3. I hope that you understand what my problem is. I will explain more, if you don't. Plz, help me. -- Jarkko Elfving <[EMAIL PROTECTED]> ---(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] About PostgreSQL 8.0
On Sun, 23 Jan 2005 00:13:08 +0200, Jarkko Elfving <[EMAIL PROTECTED]> wrote: > Hi. > > I've started to learn SQL about 6 months ago, and now I'd upgraded > PostgreSQL 7.4 to new release 8.0. After upgrading I start to read the > README file (how stupid I was) and there were instructions to how to do > it; the upgrade I mean. Now I'm wondering, server is not running because > fileformat or something like that is wrong - I did the upgrade wrongly. > I do not have any relevant data in the Postgre database, so I don't need > to backup it (which was one point of the upgrading). How I must have to > proceed that I can start the Postgre server? Do I use the initdb command > and if I do, how I do it with default locations? I'm very new on > PostgreSQL and do not have much experience on SQL. I'm running on FC3. > > I hope that you understand what my problem is. I will explain more, if > you don't. If you don't care about losing your data, you can fix this by shutting down postgresql, deleting the contents of /var/lib/pgsql/data and then starting postgresql again. -- ~ L. Friedman[EMAIL PROTECTED] LlamaLand http://netllama.linux-sxs.org ---(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] About PostgreSQL 8.0
On Sun, Jan 23, 2005 at 12:13:08AM +0200, Jarkko Elfving wrote: > I've started to learn SQL about 6 months ago, and now I'd upgraded > PostgreSQL 7.4 to new release 8.0. After upgrading I start to read the > README file (how stupid I was) and there were instructions to how to do > it; the upgrade I mean. Now I'm wondering, server is not running because > fileformat or something like that is wrong - I did the upgrade wrongly. I'd guess that you didn't do an initdb and tried to run an 8.0 server with a 7.4 cluster. See the "Installation Instructions" chapter of the documentation, in particular the "If You Are Upgrading" section; see also "Migration Between Releases" in the "Backup and Restore" chapter and the documentation for initdb: http://www.postgresql.org/docs/8.0/static/installation.html http://www.postgresql.org/docs/8.0/static/migration.html http://www.postgresql.org/docs/8.0/static/app-initdb.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] pg_restore
"Niederland" <[EMAIL PROTECTED]> writes: > System: the released Postgres 8.0, winXP > Using: > pg_dump --format=t --blobs myDB > DBFile > pg_restore --create -dbname=crm DBFile > Resulted in: > pg_restore: [archiver] unsupported version (1.13) in file header Come to think of it, I'll bet that you cannot use "> DBFile" on Windows because it ends up opening the archive file in text instead of binary mode. SetOutput() in pg_backup_archiver.c tries to work around this by doing fn = fileno(stdout); AH->OF = fdopen(dup(fn), PG_BINARY_W); but it wouldn't surprise me in the least to learn that that doesn't work on Windows. Does it work if you use pg_dump --format=t --blobs -f DBFile myDB ? Can anyone on pgsql-hackers-win32 think of a way around this? 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
[GENERAL] Windows 2000 Slower Than Windows XP
I have been having quite a time trying to figure this one out. I have installed PostgreSQL OLE DB drivers (ver 1.0.0.15) on two separate machines. The only difference between the two machines is the OS, 2000 Pro (SP4) and XP Pro (SP2) and both are fully updated from fresh installs. The PostgreSQL 8.0 server is running on another Windows XP Pro machine (SP2, fully updated). I am performing a Select query like this: SELECT column1, column2, column3 FROM table1 WHERE column4 = 'value1' AND column5 ='value2' ORDER BY column1, column2; Connection String: Provider=PostgreSQL.1;Password="";User ID=client1;Data Source=server;Location=Media Database;Extended Properties="" The results take approximately 2 seconds on the XP machine and 8 seconds on the 2000 machine. Explain Analyze yields nearly identical times (45ms) between the two. Any ideas why this is occuring? Thank You, qlawson
Re: [GENERAL] "Invalid message format" error from JDBC driver
[EMAIL PROTECTED] writes: > Hello, all. I have a query that runs perfectly when I run it from > pgAdmin3, but bombs when I run it from ColdFusion using the JDBC > driver. I'm using postgres 7.4. The query uses dblink(), which I assume > is the source of the problem. > Can anyone provide me with any insight about why this would fail over > JDBC? Thanks If you didn't get any answers yet, try asking about it on pgsql-jdbc. Also, you might want to update your jdbc driver first, just to find out if the bug is already fixed. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] pg SQL question
On Sat, Jan 22, 2005 at 02:03:58PM -0700, Ed L. wrote: > > There's probably an obvious answer for this, but I couldn't see it > in the docs. What's the simplest way to concatenate multiple > same-column values in SQL? > > For example, suppose I have table foo (key integer, id integer, > entry varchar) with data > > key id entry > 1 1 "Four score and seven years ago our fathers " > 1 2 "brought forth on this continent, a new nation, " > 1 3 "conceived in Liberty, and dedicated to the " > 1 4 "proposition that all men are created equal." > > and I want to produce the following result: > > "Four score and seven years ago our fathers brought forth on this > continent, a new nation, conceived in Liberty, and dedicated to the > proposition that all men are created equal." SELECT f.key, array_to_string(ARRAY( SELECT entry FROM foo ORDER BY id WHERE key = f.key ), '') AS "blurb" FROM foo f; > I know this could be done writing a plpgsql function, but it seems > so basic, I thought there might be something I'm overlooking. Well, it's not *totally* basic, and it draws on a few different things, but you can do it with builtins. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote! ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] SCHEMA compatibility with Oracle/DB2/Firebird
On Sat, 22 Jan 2005 11:25:39 -0800, Chris <[EMAIL PROTECTED]> wrote: > I know this isn't entirely postgresql specific, but it wouldn't be on > another list either so here goes... > > I am writing an open source application where I would like to support > at least oracle, and possibly firebird or DB2, in addition to > postgresql which will be the default. I'm not going to try to support > mysql. FWIW, Firebird doesn't have any form of schemas or cross-database query support (although I think commercial third-party extensions might exist for the latter). You'll probably be best off explicitly providing schema names for your common functions, e.g. SELECT * FROM common.mytable . Depending on your app, that could be better from a security point of view in PostgreSQL as well, if you want to prevent your users from sneakily replacing the common database objects. Ian Barwick ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Windows 2000 Slower Than Windows XP
Sounds like it could be a networking issue to me. Perhaps the xp machine is resolving the db server name more efficiently. do both the xp machine and the win2k machine 1 have comparable network cards? 2 on the same subnet as each other and the db? 3 using the same dns or wins server? you could try putting an entry in the hosts file on the slow machine to resolve the name of the db machine and see if that helps. I'm no expert on Postgre SQL so maybe there is a driver difference or something that others on the list would know better. Hope that helps, Joe --- Quinton Lawson <[EMAIL PROTECTED]> wrote: > I have been having quite a time trying to figure > this one out. I have installed PostgreSQL OLE DB > drivers (ver 1.0.0.15) on two separate machines. > The only difference between the two machines is the > OS, 2000 Pro (SP4) and XP Pro (SP2) and both are > fully updated from fresh installs. The PostgreSQL > 8.0 server is running on another Windows XP Pro > machine (SP2, fully updated). > > I am performing a Select query like this: > SELECT column1, column2, column3 FROM table1 WHERE > column4 = 'value1' AND column5 ='value2' ORDER BY > column1, column2; > > Connection String: > Provider=PostgreSQL.1;Password="";User > ID=client1;Data Source=server;Location=Media > Database;Extended Properties="" > > The results take approximately 2 seconds on the XP > machine and 8 seconds on the 2000 machine. > > Explain Analyze yields nearly identical times (45ms) > between the two. > > Any ideas why this is occuring? > > Thank You, > qlawson = [EMAIL PROTECTED] http://www.joeaudette.com http://www.mojoportal.com __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Windows 2000 Slower Than Windows XP (SOLVED)
Thank you Joe for leading me in the right direction. I found the solution to the problem. It wasn't a hardware related problem or an OLE DB driver problem... By default, Windows XP installs the QoS Packet Scheduler service. It is not installed by default on Windows 2000. After I installed QoS Packet Scheduler on the Windows 2000 machine, the latency problem vanished. I am a happy PostgreSQL user now :) -qlawson - Original Message - From: Joe Audette To: pgsql-general@postgresql.org Sent: Saturday, January 22, 2005 9:47 PM Subject: Re: [GENERAL] Windows 2000 Slower Than Windows XP Sounds like it could be a networking issue to me.Perhaps the xp machine is resolving the db server namemore efficiently.do both the xp machine and the win2k machine1 have comparable network cards?2 on the same subnet as each other and the db?3 using the same dns or wins server?you could try putting an entry in the hosts file onthe slow machine to resolve the name of the db machineand see if that helps.I'm no expert on Postgre SQL so maybe there is adriver difference or something that others on the listwould know better.Hope that helps,Joe--- Quinton Lawson <[EMAIL PROTECTED]> wrote:> I have been having quite a time trying to figure> this one out. I have installed PostgreSQL OLE DB> drivers (ver 1.0.0.15) on two separate machines. > The only difference between the two machines is the> OS, 2000 Pro (SP4) and XP Pro (SP2) and both are> fully updated from fresh installs. The PostgreSQL> 8.0 server is running on another Windows XP Pro> machine (SP2, fully updated).> > I am performing a Select query like this: > SELECT column1, column2, column3 FROM table1 WHERE> column4 = 'value1' AND column5 ='value2' ORDER BY> column1, column2;> > Connection String:> Provider=PostgreSQL.1;Password="";User> ID=client1;Data Source=server;Location=Media> Database;Extended Properties=""> > The results take approximately 2 seconds on the XP> machine and 8 seconds on the 2000 machine.> > Explain Analyze yields nearly identical times (45ms)> between the two.> > Any ideas why this is occuring?> > Thank You,> qlawson=[EMAIL PROTECTED]http://www.joeaudette.comhttp://www.mojoportal.com__ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail ---(end of broadcast)---TIP 6: Have you searched our list archives? http://archives.postgresql.org
[GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while upgrading doesn't get anywhere)
Hi again... I tried to solve my PostgreSQL cluster problem like Michael Fuhr and Lonni Friedman helps me, but I didn't get it work. So I figured out that if I do an fresh installation and removed the PostgreSQL completely (even those JDBC and PL -drivers - everything) and be sure that it is completely removed. Then I installed it again with rpm -Uhv command and start to proceed like the manuals tells me, but now I'm in dead-end: initdb fails because postgres program was not found. How this could be happened? I did not removed the postgres user because I thought that is not needed to do. Initdb returns following fail: # su postgres bash-3.00$ initdb -D=/var/lib/pgsql/data/ fgets failure: Success The program "postgres" is needed by initdb but was not found in the same directory as "/usr/bin/initdb". Check your installation. I did check that file postgres really is in /usr/bin -folder. How should I proceed now? -- Jarkko Elfving <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Data entry - forms design or other APIs etc. - what is there?
Take a look at Ruby on Rails. http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html I haven't used it myself yet but looking through the above walkthrough, seems pretty easy to make data entry web forms. Chris Green wrote: On Fri, Jan 21, 2005 at 06:19:53PM -0600, Andrew L. Gould wrote: On Friday 21 January 2005 12:55 pm, Chris Green wrote: [snip question] Many languages have the capacity to access PostgreSQL databases including Python (with PyGreSQL), Perl (with DBI), PHP (compile in support), Delphi and Java (with JDBC) to name a few. The selection of GUI tools for forms depends upon the language. Yes, I was hoping for a bit more help than just a language interface but if I have to I'll go down that route. You can also use other databases applications that make use of ODBC links such as MS Access and Paradox. (Attempts with Lotus Approach failed horribly.) At work, I've used MS Access to create several front-end applications to PostgreSQL database servers. Now that *is* a possibility, I have Access at least. Though that prevents me making a totally Linux based application. Gnumeric, a spreadsheet application, is supposed to be able to access several databases natively (not odbc) via gnomedb. I've gotten gnomedb to connect to the database; but I can't find any documentation as to how to get the data into the spreadsheet. Those might be useful too, thanks. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while upgrading doesn't get anywhere)
On Sun, 23 Jan 2005 08:09:15 +0200, Jarkko Elfving <[EMAIL PROTECTED]> wrote: > Hi again... > > I tried to solve my PostgreSQL cluster problem like Michael Fuhr and > Lonni Friedman helps me, but I didn't get it work. So I figured out that > if I do an fresh installation and removed the PostgreSQL completely > (even those JDBC and PL -drivers - everything) and be sure that it is > completely removed. Then I installed it again with rpm -Uhv command and > start to proceed like the manuals tells me, but now I'm in dead-end: > initdb fails because postgres program was not found. How this could be > happened? I did not removed the postgres user because I thought that is > not needed to do. Initdb returns following fail: > > # su postgres > bash-3.00$ initdb -D=/var/lib/pgsql/data/ > fgets failure: Success > The program "postgres" is needed by initdb but was not found in the > same directory as "/usr/bin/initdb". > Check your installation. > > I did check that file postgres really is in /usr/bin -folder. > > How should I proceed now? Are you using the RPMs? If so, then starting postgresql with /etc/init.d/postgresql for the first time will run initdb for you. -- ~ L. Friedman[EMAIL PROTECTED] LlamaLand http://netllama.linux-sxs.org ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while
On Sat, 2005-01-22 at 22:23 -0800, Lonni J Friedman wrote: > On Sun, 23 Jan 2005 08:09:15 +0200, Jarkko Elfving <[EMAIL PROTECTED]> wrote: > > Hi again... > > > > I tried to solve my PostgreSQL cluster problem like Michael Fuhr and > > Lonni Friedman helps me, but I didn't get it work. So I figured out that > > if I do an fresh installation and removed the PostgreSQL completely > > (even those JDBC and PL -drivers - everything) and be sure that it is > > completely removed. Then I installed it again with rpm -Uhv command and > > start to proceed like the manuals tells me, but now I'm in dead-end: > > initdb fails because postgres program was not found. How this could be > > happened? I did not removed the postgres user because I thought that is > > not needed to do. Initdb returns following fail: > > > > # su postgres > > bash-3.00$ initdb -D=/var/lib/pgsql/data/ > > fgets failure: Success > > The program "postgres" is needed by initdb but was not found in the > > same directory as "/usr/bin/initdb". > > Check your installation. > > > > I did check that file postgres really is in /usr/bin -folder. > > > > How should I proceed now? > > Are you using the RPMs? If so, then starting postgresql with > /etc/init.d/postgresql for the first time will run initdb for you. > Yes. I'm using the RPM's and yes I'd used /etc/init.d/postgresql but it fails with errors: # /etc/rc.d/init.d/postgresql start Initializing database: [FAILED] Starting postgresql service: [FAILED] I did the folder /var/lib/pgsql as documets tells me to do and give rights to postgres as user and a group (hmm... I don't know how say this properly, so I paste the command what I was used: mkdir /var/lib/pgsql chown postgres:postgres /var/lib/pgsql /etc/rc.d/init.d/postgresql start) What I'm doing wrong? -- Jarkko Elfving <[EMAIL PROTECTED]> ---(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] Dead-end in PostgreSQL 8.0 fresh installation (while
Jarkko Elfving <[EMAIL PROTECTED]> writes: > Yes. I'm using the RPM's and yes I'd used /etc/init.d/postgresql but it > fails with errors: > # /etc/rc.d/init.d/postgresql start > Initializing database: [FAILED] > Starting postgresql service: [FAILED] > I did the folder /var/lib/pgsql as documets tells me to do and give > rights to postgres as user and a group (hmm... I don't know how say this > properly, so I paste the command what I was used: Uh, /var/lib/pgsql should have been created for you by RPM installation. I'm starting to think you have a corrupted postgresql-server RPM. Also, in your prior message: > bash-3.00$ initdb -D=/var/lib/pgsql/data/ > fgets failure: Success > The program "postgres" is needed by initdb but was not found in the > same directory as "/usr/bin/initdb". > Check your installation. As best I can tell from the source code, this could only happen if "/usr/bin/postgres -V" failed. What happens if you do that by hand? What does "ls -l /usr/bin/postgres" show? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] Dead-end in PostgreSQL 8.0 fresh installation (while
On Sun, 2005-01-23 at 02:15 -0500, Tom Lane wrote: > Uh, /var/lib/pgsql should have been created for you by RPM installation. > I'm starting to think you have a corrupted postgresql-server RPM. > > Also, in your prior message: > > > bash-3.00$ initdb -D=/var/lib/pgsql/data/ > > fgets failure: Success > > The program "postgres" is needed by initdb but was not found in the > > same directory as "/usr/bin/initdb". > > Check your installation. > > As best I can tell from the source code, this could only happen if > "/usr/bin/postgres -V" failed. What happens if you do that by hand? > What does "ls -l /usr/bin/postgres" show? > > regards, tom lane > Yes, I noticed that RPM did a folder /var/lib/pgsql but I was thinking 'coz I didn't get it worked that in easy way, I start to read some of Postrge instructions where was telling to do this. Anyway, I check what ls -l /usr/bin/postgres tells me, and result were expected: # ls -l /usr/bin/postgres -rwxr-xr-x 1 root root 2541272 Jan 18 11:31 /usr/bin/postgres Also I run a /usr/bin/postgres -V but this doesn't give any results. I'm quite new on Linux. -- Jarkko Elfving <[EMAIL PROTECTED]> ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster