Re: [GENERAL] Gentoo for production DB server?

2004-08-24 Thread Gavin M. Roy
I've been extremely happy with my gentoo boxes. I switched from Slackware over the past year or so after many years of Slackware zealotry. I have nothing bad to say about using Gentoo other than I personally wouldnt use portage/ebuilds for PostgreSQL. Personally I always have better experien

Re: [GENERAL] Is this legal SQL? Is it a good practice?

2004-08-24 Thread Carlos Moreno
Peter Eisentraut wrote: I just noticed that from a C or C++ program using libpq or libpq++, I can send *one* command that contains several SQL statements separated by semicolon. But I'm wondering -- is this a PostgreSQL extension, or is it "legal SQL"? The whole libpq API is made up out of thin ai

Re: [GENERAL] Upgrading PostgreSQL 7.1.3

2004-08-24 Thread Bill Moran
Date: Sun, 24 Aug 2003 23:25:24 +0200 The date's wrong on your computer. "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi: > > I'm planning to migrate a postgres database version 7.1.3 to a newer > version. There are some tables with up to 5 million records and I'm > b

Re: [GENERAL] Gentoo for production DB server?

2004-08-24 Thread Greg Donald
On Tue, 2004-08-24 at 16:33, Christine Desmuke wrote: > At the risk of starting a flame-war, I'd like some more details on the > use of Gentoo Linux for a production PostgreSQL server. There have been > a couple of comments lately that it is not such a great idea; does > anyone have specific experi

Re: [GENERAL] NAB : insert into select distinct => when used on null, distinct causes loss of type knowledge

2004-08-24 Thread Frank van Vugt
Hi Tom, > No, because it never had any: NULL is typeless (type UNKNOWN, to the > parser). But to do a DISTINCT, the parser has to assign datatypes to all the > columns (to determine the comparison rules). The default assumption for an > UNKNOWN constant is type TEXT. I grok, thanks for the quick

[GENERAL] Gentoo for production DB server?

2004-08-24 Thread Christine Desmuke
Hello: At the risk of starting a flame-war, I'd like some more details on the use of Gentoo Linux for a production PostgreSQL server. There have been a couple of comments lately that it is not such a great idea; does anyone have specific experience they'd be willing to share? Some background: we'

Re: [GENERAL] NAB : insert into select distinct => when used on null, distinct causes loss of type knowledge

2004-08-24 Thread Tom Lane
Frank van Vugt <[EMAIL PROTECTED]> writes: > So it seems distinct applied to the second column causes it to lose knowledge > on its type. No, because it never had any: NULL is typeless (type UNKNOWN, to the parser). In the straight INSERT this doesn't matter because we don't have to resolve the

Re: [GENERAL] How is this possible? (more on deadlocks)

2004-08-24 Thread Stephan Szabo
On Tue, 24 Aug 2004, Carlos Moreno wrote: > Ok, now I'm really intrigued by what looks to me > (possibly from a naive point of view) like a bug, > or rather, a limitation on the implementation. Yep. See recent (and historical) discussions on needing a weaker lock than FOR UPDATE for handling fo

[GENERAL] Upgrading PostgreSQL 7.1.3

2004-08-24 Thread [EMAIL PROTECTED]
Hi: I'm planning to migrate a postgres database version 7.1.3 to a newer version. There are some tables with up to 5 million records and I'm begining to suffer from data corruption in indexes and tables. I did some hardware checkings and everything seems ok. The last move, as someone suggested

[GENERAL] NAB : insert into select distinct => when used on null, distinct causes loss of type knowledge

2004-08-24 Thread Frank van Vugt
Hi, Not exactly a showstopper, but I noticed this behaviour: db=# create table f1 (id int, value int); CREATE TABLE db=# insert into f1 select 1 as id, null; INSERT 25456306 1 db=# insert into f1 select distinct 2 as id, null; ERROR: column "value" is of type integer but expression is of type

Re: [GENERAL] Problem to connect to the Windows Port

2004-08-24 Thread Doug McNaught
Tom Lane <[EMAIL PROTECTED]> writes: > "Cornelia Boenigk" <[EMAIL PROTECTED]> writes: >> C:\>psql -h 192.168.1.8 -U postgres -d minitest >> psql: could not connect to server: Connection refused >> Is the server running on host "192.168.1.8" and accepting >> TCP/IP connections on po

Re: [GENERAL] Is this legal SQL? Is it a good practice?

2004-08-24 Thread Peter Eisentraut
Carlos Moreno wrote: > I just noticed that from a C or C++ program using > libpq or libpq++, I can send *one* command that > contains several SQL statements separated by > semicolon. > But I'm wondering -- is this a PostgreSQL extension, > or is it "legal SQL"? The whole libpq API is made up out

Re: [GENERAL] Problem to connect to the Windows Port

2004-08-24 Thread Tom Lane
"Cornelia Boenigk" <[EMAIL PROTECTED]> writes: > C:\>psql -h 192.168.1.8 -U postgres -d minitest > psql: could not connect to server: Connection refused > Is the server running on host "192.168.1.8" and accepting > TCP/IP connections on port 5432? "Connection refused" suggests that

[GENERAL] Is this legal SQL? Is it a good practice?

2004-08-24 Thread Carlos Moreno
I just noticed that from a C or C++ program using libpq or libpq++, I can send *one* command that contains several SQL statements separated by semicolon. Something like: PgDatabase db (" "); const char * const sql = "insert into blah (...); insert into blah (...)"; if (db.Exec (sql) == PG

[GENERAL] How is this possible? (more on deadlocks)

2004-08-24 Thread Carlos Moreno
Ok, now I'm really intrigued by what looks to me (possibly from a naive point of view) like a bug, or rather, a limitation on the implementation. I can't find a reasonable justification why the following would cause a deadlock: I run two instances of psql using the same DB on the same machine. On

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Thomas Hallgren
Karsten Hilbert wrote: a) More software can make use of your good name and reputation. That's rather dangerous, don't you think ? If PostgreSQL proper (eg the core server) wants to keep its good name it better make sure it is bundled with "good" "add-ons". And that would require precisely the addit

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Marc G. Fournier
On Tue, 24 Aug 2004, Jan Wieck wrote: I want to get rid of the recommendations-vacuum. I don't care if we don't pick the ultimately best of everything that way. If there is a consensus of people who use these things, repeating their recommendation will seldom be bad advice. Those people have pro

Re: [GENERAL] Checking whether postgresql is running

2004-08-24 Thread Carlos Moreno
Ennio-Sr wrote: [Possible duplicate: original sent to novice never got through! -;(] Hi all! Testing a script where I need to make sure that postgresql is running before passing a instruction I faced this curious behaviour: This is the relevant content of the script: -- #!/bin/bas

Re: [GENERAL] No connection to a PG 8.0 Beta 1 win32 server

2004-08-24 Thread Richard Huxton
Secrétariat wrote: I see in the log file that parameter "tcpip_socket" was invalid, but how can I connect my W2k client with pgAdmin III to my XP Pro server using Beta1 ? Is the Beta1 à standalone version ? Nope - AFAIK it's a full version. The documentation for 8.0beta is available online at: ht

Re: [GENERAL] Problem to connect to the Windows Port

2004-08-24 Thread Cornelia Boenigk
Hi Magnus Thanks. > If you meant to match the entire subnet (192.168.*.*), instead put > host minitest postgres 192.168.0.0 255.255.0.0 password Ok. I changed the line in pg_hba.conf to host all all 192.168.0.0 255.255.0.0 password then rebooted the computer and tried again: C:\>psql -h 192.

[GENERAL] Checking whether postgresql is running

2004-08-24 Thread Ennio-Sr
[Possible duplicate: original sent to novice never got through! -;(] Hi all! Testing a script where I need to make sure that postgresql is running before passing a instruction I faced this curious behaviour: This is the relevant content of the script: -- #!/bin/bash /usr/lib/post

Re: [GENERAL] No connection to a PG 8.0 Beta 1 win32 server

2004-08-24 Thread Secrétariat
I see in the log file that parameter "tcpip_socket" was invalid, but how can I connect my W2k client with pgAdmin III to my XP Pro server using Beta1 ? Is the Beta1 à standalone version ? regards, luc. > Tom Lane write : > No, it's easier than that: there is no "tcpip_socket" parameter anymore, >

[GENERAL] postgres replication only some datas

2004-08-24 Thread Matthias Blohm
Hello, a question about a tool or a possibility how could something work. following situation: we have a database which is full of very sensitive information and needed that db to use our online website. but now we move the website to a server outside our office and needed to replicate only some da

Re: [GENERAL] problem with postgresql-dump while upgrading to 7.4

2004-08-24 Thread Oleg
On Fri, 2004-08-20 at 16:46, Oleg wrote: Dear All, I have upgraded Postgresql from 7.3 to 7.4. Starting pg brings error: The database is in an older format that cannot be read by version 7.4 of PostgreSQL dpkg-upgrade postgresql fails I tried postgresql-dump. While dumping it brings the following

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Thomas Hallgren
Tom Lane wrote: Enlarging the core committee by the amount you seem to be thinking of would transform it into something quite different than it is now (in particular it would be too large to make decisions effectively, IMHO). I can relate to that. Lean and mean is good. So pehaps the core commi

Re: [GENERAL] Pgsql beta 8 on windows starts and stops automatically.

2004-08-24 Thread Terry Yapt
That's right.. I have deleted postmaster.pid and all was ok now.. Thanks.. On Mon, 23 Aug 2004 10:35:00 +0200, [EMAIL PROTECTED] ("Magnus Hagander") wrote: >> Hello all, >> >> I am testing PostgreSQL 8.0 beta on a windows xp >> professional. In the time when I did the install I have been

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Marc G. Fournier
On Mon, 23 Aug 2004, Thomas Hallgren wrote: Tom Lane wrote: Enlarging the core committee by the amount you seem to be thinking of would transform it into something quite different than it is now (in particular it would be too large to make decisions effectively, IMHO). I can relate to that. Lean a

Re: [GENERAL] UTF-8 and LIKE vs =

2004-08-24 Thread Tom Lane
David Wheeler <[EMAIL PROTECTED]> writes: >>> Hmm. I tried putting your string into a UNICODE database and I got >>> ERROR: invalid byte sequence for encoding "UNICODE": 0xc7 >> >> Really? Curious. > Oh, are you sure that you got my UTF-8 data? Because it came back in > your reply all mangled.

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Marc G. Fournier
On Mon, 23 Aug 2004, Thomas Hallgren wrote: In times when people download gigabytes of film and music using BitTorrent, I think that's the least of our problems. But of course, the distribution should be kept at a reasonable size. That's why I'd like a better solution to replace the inferior one

Re: [GENERAL] Unsupported 3rd-party solutions (Was: Few questions

2004-08-24 Thread Tom Lane
Thomas Hallgren <[EMAIL PROTECTED]> writes: > ... My suggestion is not that you take on more work but > rather that the comittee is allowed to grow and take on responsabilities > and people beyond the developers of the core database. Enlarging the core committee by the amount you seem to be thin

Re: [GENERAL] UTF-8 and LIKE vs =

2004-08-24 Thread David Wheeler
On Aug 24, 2004, at 12:20 PM, Peter Eisentraut wrote: broken, and that they're useless for multilingual use. I don't agree with that, but perhaps we differ in our interpretation of "multilingual use". If you have special requirements, you can always turn the locales off. Well, we're getting beyond

Re: [GENERAL] SELECT to an external file

2004-08-24 Thread Oliver Elphick
On Tue, 2004-08-24 at 18:08, Mário Gamito wrote: > Hi, > > How can i draw the results of a SELECT in to a file in the filesystem ? Using psql: 1. \o /path/to/file SELECT ... ; \o 2. psql -d my_database -c "SELECT ... " >/path/to/file -- Oliver Elphick

Re: [GENERAL] UTF-8 and LIKE vs =

2004-08-24 Thread David Wheeler
On Aug 23, 2004, at 10:25 PM, Joel wrote: If the locale machinery iw functioning correctly (and if I understand correctly), there ought to be a setting that would allow those to collate to the same point. Bleh. There must be some distinction between them. It sounds like querying for synonyms. I'm

Re: [GENERAL] SELECT to an external file

2004-08-24 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Tue, 24 Aug 2004, [ISO-8859-1] Mário Gamito wrote: > How can i draw the results of a SELECT in to a file in the filesystem ? Use \o: test=# \o testfile test=# SELECT * from mytable; test=# All the output is redirected to testfile. Regards

Re: [GENERAL] Dump and Restore

2004-08-24 Thread Oliver Elphick
On Tue, 2004-08-24 at 17:36, Eduardo S. Fontanetti wrote: > I am using pg_dump. > > It means that I can't restore to a different name > database?? If you use pg_dump[all] without other options it will dump to a text file. Just edit the database name. -- Oliver Elphick

[GENERAL] SELECT to an external file

2004-08-24 Thread Mário Gamito
Hi, How can i draw the results of a SELECT in to a file in the filesystem ? Warm Regards, Mário Gamito ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] pg_stat_activity versus ps

2004-08-24 Thread Jeff Amiel
That was it. (not having it turned on. duh). Guess I should have read section 23.2 of the docs..."The Statistics Collector" Thanks for the heads up. Jeff Tom Lane wrote: Jeff Amiel <[EMAIL PROTECTED]> writes: however, if I checked pg_stat_activity during the same time period, I saw nothing

Re: WG: Re: Re: [GENERAL] select ... where ='' does a seqscan [auf Viren geprueft]

2004-08-24 Thread Tom Lane
Silvio Matthes <[EMAIL PROTECTED]> writes: > 2.) Would it be wiser to change all the empty values to some placeholder > (e.g. 'empty')? You're missing the point entirely. '' is being treated specially because the planner can see from the column statistics that it occurs a lot. Substituting a di

Re: [GENERAL] select ... where ='' does a seqscan [auf Viren

2004-08-24 Thread Tom Lane
Silvio Matthes <[EMAIL PROTECTED]> writes: > But in my opinion with the multicolumn index in mind the server should do > a index scan, because there are only 7 rows with param_name='KUNDEN_NR' > and param_value=''?!? We do not have any cross-column statistics at the moment, so the planner is una

Re: [GENERAL] pg_stat_activity versus ps

2004-08-24 Thread Tom Lane
Jeff Amiel <[EMAIL PROTECTED]> writes: > however, if I checked pg_stat_activity during the same time period, I > saw nothing populated in the current_query column...ever. Did you have it turned on? (stats_command_string config parameter) Were you checking as superuser?

Re: [GENERAL] Dump and Restore

2004-08-24 Thread Eduardo S. Fontanetti
I am using pg_dump. It means that I can't restore to a different name database?? Eduardo S. Fontanetti --- Paul Thomas <[EMAIL PROTECTED]> escreveu: > > On 24/08/2004 14:40 Eduardo S. Fontanetti wrote: > > How can I do a test if my dumping is really > working, I > > can't apply the dump in my

WG: Re: Re: [GENERAL] select ... where ='' does a seqscan [auf Viren geprueft]

2004-08-24 Thread Silvio Matthes
>Am Dienstag, 24. August 2004 11:59 schrieb Silvio Matthes: >> So using the index does need more time than a sequential scan? >It's possible.  If you want to prove the opposite, please post the output of >EXPLAIN ANALYZE in both cases. On my system, with PostgresQL 8.0Beta1, I could prove the o

Re: [GENERAL] select ... where ='' does a seqscan [auf Viren

2004-08-24 Thread Silvio Matthes
Hello Tom, >> I try to select the rows of a table where the content of a varchar-column >> is empty ('') and PostgresQL is doing a seqscan. >If there are a very large number of rows with param_value='', it's >entirely possible that using an index to find them is counterproductive. That's right.

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow

2004-08-24 Thread Gaetano Mendola
Shelby Cain wrote: --- Tom Lane <[EMAIL PROTECTED]> wrote: Ah-hah. The win32 hackers should confirm this, but my recollection is that sync/fsync are no-ops under Cygwin (one of the several reasons we would never recommend that port for production use). So this would fit the assumption that the 7.

Re: [GENERAL] Invalid input for integer on VIEW

2004-08-24 Thread Tom Lane
mike <[EMAIL PROTECTED]> writes: > If I do the same query, except to create a new table, everything works, > so is this a view bug? Possibly, but you haven't given enough info to let someone else reproduce the problem. A SQL script that creates all the necessary tables and the view and then trigg

Re: [GENERAL] Dump and Restore

2004-08-24 Thread Ron St-Pierre
Eduardo S. Fontanetti wrote: How can I do a test if my dumping is really working, I can't apply the dump in my database, because it will overwrite a lot of data. I was thinking about restore in another database name, but I can't, it always restore on the original database. Somebody have a cooking r

Re: [GENERAL] No connection to a PG 8.0 Beta 1 win32 server

2004-08-24 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Secrétariat wrote: >> I already receive 8 times this message, not responding to my question ! >> The question is : >> Why when I enable "tcpip_socket = true" in the postgresql.conf it becomes >> impossible to restart the service ?! (so hosts conections a

Re: [GENERAL] UTF-8 and LIKE vs =

2004-08-24 Thread Peter Eisentraut
David Wheeler wrote: > But given what you've said, Tatsuo, it makes me wonder if it's worth > it to use the system locale default when running initdb? Yes, because that is the locale that the user prefers. If a locale is broken then you shouldn't set it as system locale in the first place. --

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-24 Thread Tom Lane
Shelby Cain <[EMAIL PROTECTED]> writes: > Sounds reasonable. However, I don't see the same > performance hit while doing bulk database operations > (ie: inserts, deletes, updates). Is that expected > behavior? Do vacuum operations fsync()/_commit() more > often? IIRC, vacuum fsyncs once per tab

Re: [GENERAL] Is it possible...

2004-08-24 Thread Richard Huxton
Uwe C. Schroeder wrote: I wasn't able to get a usable answer by googling: Is there a way to create a view on a table that converts rows to columns ? [snip] Is the above doable with a view? Any pointers will be appreciated. Search the postgresql-sql list archives for "Arbitrary Cross-tab" for rece

Re: [GENERAL] Is it possible...

2004-08-24 Thread Joe Conway
Uwe C. Schroeder wrote: parentid firstkey secondkey 1firstvalue secondvalue 2firstvalue secondvalue I hate the idea of writing code that really creates and fills a table, particularly since the original table has a lot of rows. Is the above doable with a view? Any po

Re: [GENERAL] No connection to a PG 8.0 Beta 1 win32 server

2004-08-24 Thread Gaetano Mendola
Secrétariat wrote: I don't have a telnet server on the Win XP Pro PC acting as PG server for Beta1 ! So ? If you do: telnet 5432 the command only open a TCP connection to the port 5432, this will test if you are able to reach your server. Regards Gaetano Mendola ---(end of

[GENERAL] Is it possible...

2004-08-24 Thread Uwe C. Schroeder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I wasn't able to get a usable answer by googling: Is there a way to create a view on a table that converts rows to columns ? Example: I have a table create table blah ( id int4 serial, parentid int4, pname varchar(64

Re: [GENERAL] Invalid input for integer on VIEW

2004-08-24 Thread mike
On Tue, 2004-08-24 at 15:42 +0100, mike wrote: > I have the following view definition > > Column | Type | Modifiers > +---+--- > bcode | character varying(15) | > subhead| text | > sc_descrip

Re: [ADMIN] [GENERAL] Dump and Restore

2004-08-24 Thread Thilina Gunasekara
Assuming you're using Unix Box 1. Dump your database DB_X pg_dump -v -U postgresUsername DB_X | gzip -f - > DB_X.gz 2.Create database DB_Y psql -U postgresUsername template1 CREATE DATABASE DB_Y \q 3. zcat DB_X.gz | psql -U postgresUsername -f - DB_Y Thilina -Original Message- From: [E

Re: [GENERAL] select ... where ='' does a seqscan [auf Viren geprueft]

2004-08-24 Thread Tom Lane
Silvio Matthes <[EMAIL PROTECTED]> writes: > I try to select the rows of a table where the content of a varchar-column > is empty ('') and PostgresQL is doing a seqscan. If there are a very large number of rows with param_value='', it's entirely possible that using an index to find them is counte

Re: [GENERAL] Dump and Restore

2004-08-24 Thread Paul Thomas
On 24/08/2004 14:40 Eduardo S. Fontanetti wrote: How can I do a test if my dumping is really working, I can't apply the dump in my database, because it will overwrite a lot of data. I was thinking about restore in another database name, but I can't, it always restore on the original database. Someb

[GENERAL] Not able to build libpq for Windows using 8.0.0 beta1

2004-08-24 Thread Vidyasagara Guntaka
Hi, I'm not able to compile libpq for Windows environment using the 8.0.0 beta 1 source tree. I got the following errors (The entire compilation output is listed below): C:\temp\postgresql-8.0.0beta1\src>nmake /f win32.mak Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyrig

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-24 Thread Shelby Cain
--- Tom Lane <[EMAIL PROTECTED]> wrote: > Ah-hah. The win32 hackers should confirm this, but > my recollection is > that sync/fsync are no-ops under Cygwin (one of the > several reasons > we would never recommend that port for production > use). So this would > fit the assumption that the 7.4 co

Re: [GENERAL] pg_dump in stand alone backend

2004-08-24 Thread Tom Lane
Ulrich Wisser <[EMAIL PROTECTED]> writes: > I need to to disconnect any other users and do "vacuum full verbose > analyze" "reindex database" and reindex all tables. And for these I will > stop the postmaster and run a stand alone backend. I think the real problem here is stone-age maintenance p

Re: [GENERAL] Python and 8.0 beta

2004-08-24 Thread Gaetano Mendola
Clodoaldo Pinto Neto wrote: >>Are there any python drivers that work with the version 8 beta? >> >>The version seven ones didn't. > > > This script is working with version 7.4.2, FC2, python 2.3.3 > > [SNIP] May you test the following script and let me know which error you are encountering: #!/usr/

Re: [GENERAL] Connection to a PG 8.0 Beta 1 win32 server

2004-08-24 Thread Gaetano Mendola
Secrétariat wrote: Hello ! I've installed the Beta 1 on Win XP Pro, it seem working correctly. I load a database from Linux 7.4.3 with pgdumpall, it works too. But I can't connect from other PC over the LAN (I modified pg_hba.conf for the hosts). If I write in postgresql.conf : tcpip_socket = true

Re: [GENERAL] Bad planner results

2004-08-24 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > I think this is just a bad case of "nested loops are costed wrong". Looks to me like a statistical failure. Why does it think there will be 4000 rows out of that join when there are only 93? regards, tom lane -

[GENERAL] pg_stat_activity versus ps

2004-08-24 Thread Jeff Amiel
I ran a home-grown self continuous stress test tool against my 7.4.2 database. I banged 'ps' (running freebsd) while it was active and witnessed several of the 'back end' postgres processes exeucting queries, commits, inserts, etc(the actual work the processes were doing was listed in the