[GENERAL] Segementation fault in PQgetvalue()

2008-03-13 Thread Nikhil Bokare
This is what I'm trying to: char lmt_str[100]; sprintf(lmt_str,%s,PQgetvalue(res, 0, nFields-1)); //the last field is of type timestamp This is giving segmentation fault. I'm confused -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Alban Hertroys
On Mar 13, 2008, at 2:00 AM, Berend Tober wrote: Alban Hertroys wrote: On Mar 11, 2008, at 10:28 PM, Tom Lane wrote: An ON CONNECT trigger enforced by the database seems a bit scary to me. If it's broken, how you gonna get into the DB to fix it? regards, tom lane If creating

Re: [GENERAL] porting vb6 code to pgplsql, referencing fields

2008-03-13 Thread josep porres
thanks Craig your assumption is right. I have a given table structure, so redesign it now is not possible due to having change a lot of things Furthermore, using M3TRAM INTEGER[5], PREU NUMERIC(10,2)[5] seems to me a very good way but I think it may appear problems when accessing to

Re: [GENERAL] Relocation error:/usr/lib/libpq.so.5:undefinedsymbol: krb5_cc_get_principal

2008-03-13 Thread Albe Laurenz
Tri Quach wrote: When I tried to install, I got this error. [EMAIL PROTECTED] pq8.2.6]# rpmbuild --rebuild --define 'buildrhel3 1' postgresql-8.2.6-1PGDG.f8.src.rpm -bash: rpmbuild: command not found Do you know where can I download rpmbuild for RHEL 3? You cannot download it, but it is

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Thomas Pundt
On Donnerstag, 13. März 2008, Scott Marlowe wrote: | My real complaint with InnoDB is it's a red headed step child.  If | mysql supported only innodb, it would be a very different database, | and probably a bit simpler as well.  no need to worry about how you | state fk-pk relationships (currently

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Dawid Kuroczko
On Tue, Mar 11, 2008 at 10:28 PM, Tom Lane [EMAIL PROTECTED] wrote: Kynn Jones [EMAIL PROTECTED] writes: If one can set up this insert operation so that it happens automatically whenever a new connection is made, I'd like to learn how it's done. For manual psql sessions, you can put some

Re: [GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread A. Kretschmer
am Thu, dem 13.03.2008, um 15:09:18 +0530 mailte Kakoli Sen folgendes: Dear all, The command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; is giving error: ERROR: database casdatabase does not exist.(Note that the db name in error is all in lower case). Also \l shows that

[GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread Kakoli Sen
Dear all, The command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; is giving error: ERROR: database casdatabase does not exist.(Note that the db name in error is all in lower case). Also \l shows that casDatabase exists. Why is 'casDatabase' being changed to 'casdatabase'?

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Scott Marlowe
On Thu, Mar 13, 2008 at 1:25 AM, Thomas Pundt [EMAIL PROTECTED] wrote: On Donnerstag, 13. März 2008, Scott Marlowe wrote: | My real complaint with InnoDB is it's a red headed step child. If | mysql supported only innodb, it would be a very different database, | and probably a bit simpler

Re: [GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread Albe Laurenz
Kakoli Sen wrote: The command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; is giving error: ERROR: database casdatabase does not exist.(Note that the db name in error is all in lower case). Also \l shows that casDatabase exists. Why is 'casDatabase' being changed to

Re: [GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread Kakoli Sen
Hi, This time the command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; did not give error. But the permission is still not there. I run the following commands : psql -d casDatabase -U tester -W. Then \z command shows empty Access Privileges on all tables. Also select * from

[GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread David Gagnon
Hi all, I think the title says everything:-) I just what a way to create a TEMP for the current transaction only. If possible I don't want to create the TEMP table first, specify all column types, etc. CREATE TEMP TABLE _T_CR1 AS SELECT CRNUM, CRYPNUM, CRMONT, CRDATE, GLNUM, CRRRNUM,

Re: [GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread A. Kretschmer
am Thu, dem 13.03.2008, um 16:22:28 +0530 mailte Kakoli Sen folgendes: Hi, This time the command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; did not give error. Okay. But the permission is still not there. I run the following commands : psql -d casDatabase -U

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Daniel Verite
Tom Lane wrote: For manual psql sessions, you can put some setup commands in ~/.psqlrc. In any other context I'm afraid you're stuck with modifying your client application code. An ON CONNECT trigger enforced by the database seems a bit scary to me. If it's broken, how you gonna

[GENERAL] pgfoundry is down

2008-03-13 Thread Alvaro Herrera
Hi, pgFoundry seems down. Any chance you could take a look at it? -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] ER diagram tool

2008-03-13 Thread sathiya psql
Is there any tool to draw ER diagram from SQL schema file...

[GENERAL] Generate schema like uml diagrams from existing db

2008-03-13 Thread vivek
Hello friends, Thanks for reading this post. I have a very huge database with many relationships among tables. I want to generate a schema diagram (something like a uml diagram) from the database. Is there any tool that does that or any postgresql command that can export a file in some

[GENERAL] Recomendations on raid controllers raid 1+0

2008-03-13 Thread Glyn Astill
Hi chaps, I'm looking at switching out the perc5i (lsi megaraid) cards from our Dell 2950s for something else as they're crap at raid 10. Thing is I'm not entirely sure where to start, we're using 6 SAS drives and also need a bbu cache. The perc5i has 256mb which I'm sure would be fine for us.

Re: [GENERAL] Problem with GRANT in 7.4.19

2008-03-13 Thread Dawid Kuroczko
On Thu, Mar 13, 2008 at 11:52 AM, Kakoli Sen [EMAIL PROTECTED] wrote: This time the command GRANT ALL PRIVILEGES ON DATABASE casDatabase to tester; did not give error. But the permission is still not there. I run the following commands : psql -d casDatabase -U tester -W. Then \z

Re: [GENERAL] pgfoundry is down

2008-03-13 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Coming back up ... just finishing the fsck's ... - --On Thursday, March 13, 2008 09:09:32 -0300 Alvaro Herrera [EMAIL PROTECTED] wrote: Hi, pgFoundry seems down. Any chance you could take a look at it? -- Alvaro Herrera

Re: [GENERAL] Functional Index Question

2008-03-13 Thread James B. Byrne
On Wed, March 12, 2008 17:02, hubert depesz lubaczewski wrote: correct way: select lower(trim(both ' ' from(regexp_replace(' depeSz hub ', E'\\s+', ' ', 'g' ; now. i would suggest *not* to use this as base for index. make a wrapper function instead: create function cleaned(text)

Re: [GENERAL] Functional Index Question

2008-03-13 Thread hubert depesz lubaczewski
On Thu, Mar 13, 2008 at 09:04:28AM -0400, James B. Byrne wrote: To return to my first question. Is doing this sort of thing considered good a practice? for me - yes. keeping it in database is the best and safest option. but you might get issues with orms. where they really belong. However,

[GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Clodoaldo
This is 8.2.6 in Fedora 8 and the same database with which there were performance problems when migrating to 8.3. The migration was not done. The thread was this: http://archives.postgresql.org/pgsql-general/2008-01/msg00508.php The database performance slowly degrades and after two weeks i

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Marko Kreen
On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: On Tue, Mar 11, 2008 at 10:28 PM, Tom Lane [EMAIL PROTECTED] wrote: Kynn Jones [EMAIL PROTECTED] writes: If one can set up this insert operation so that it happens automatically whenever a new connection is made, I'd like to learn

Re: [GENERAL] pg_type.relacl

2008-03-13 Thread Roberts, Jon
I thought I would share my hack to return a useful and dblink save way of getting who has been granted to what functions. CREATE SCHEMA admin; CREATE TYPE admin.dba_fn_roles AS (schema_name character varying, function_name character varying, owner character varying, grantor

Re: [GENERAL] FROM + JOIN when more than one table in FROM

2008-03-13 Thread Sam Mason
On Wed, Mar 12, 2008 at 12:48:22PM +0100, Ivan Sergio Borgonovo wrote: On Wed, 12 Mar 2008 11:48:24 +0100 Martijn van Oosterhout [EMAIL PROTECTED] wrote: Perhaps this would owrk: FROM sm inner join st inner join pt inner join pm one of the inner join doesn't have an on relationship.

[GENERAL] Percent-encoding conversion to binary, %C2%A9 = ©

2008-03-13 Thread Hans Schou
Hi I have a little trouble with the chr() function. I have a string like this: Copyright+%C2%A9+1856+Na%C3%AFve+retros%C2%AE which should be converted to binary string like: Copyright © 1856 Naïve retros® Is there an easy way to do this conversion? I have tried to do it with a function, but

Re: [GENERAL] Segementation fault in PQgetvalue()

2008-03-13 Thread Tom Lane
Nikhil Bokare [EMAIL PROTECTED] writes: This is what I'm trying to: char lmt_str[100]; sprintf(lmt_str,%s,PQgetvalue(res, 0, nFields-1)); //the last field is of type timestamp This is giving segmentation fault. I'm confused The only way PQgetvalue will return NULL is if the row/column

[GENERAL] Segmentation fault (core dumped) loading data on 8.3 upgrade: undefined symbol 'pg_valid_server_encoding_id',lazy binding failed!

2008-03-13 Thread Chris Paul
Hello pgsql-general, I exported an 8.2.6 database and am trying to load it on 8.3.0. I get this error: [EMAIL PROTECTED]:/var/postgres]$ ql -d postgres bak/dump.bak /usr/local/bin/psql:/usr/local/bin/psql: undefined symbol 'pg_valid_server_encoding_id' lazy

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Greg Smith
On Thu, 13 Mar 2008, Clodoaldo wrote: I recently had a crash during a bulk insert when i updated to the 2.6.24.3-12.fc8 kernel. I rebooted and Postgresql did its thing to recover and everything was working. I made the previous kernel, 2.6.23.15-137.fc8, the default in grub.conf and rebooted.

Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-13 Thread Dean Gibson (DB Administrator)
On 2008-03-12 21:30, Scott Marlowe wrote: ... Can't rename a db, complains that it doesn't exist. Yet psql -l shows that it does and I can connect to it ??? mmdcc228_SETUP(120)% psql stdb2 -c alter database stdb rename to stdb_tmp ERROR: database stdb does not exist

[GENERAL] United States PostgreSQL Association launched!

2008-03-13 Thread Selena Deckelmann
The United States PostgreSQL Association is launched! Our draft mission can be found at http://www.postgresql.us. We will support PostgreSQL in the US through user group development, conferences, education initiatives and fun. We will be a sister organization to PostgreSQL EU, the Japanese

Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-13 Thread Gauthier, Dave
No schemas per-se. After the initdb, I jump right in with createdb foo, createdb foo2, etc... . I don't think it's an encoding propbem. The problem popped up after running script that ran successfully for many months. Somethign changed (as it were). Ya, I'm thinking of dumping all the

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Alvaro Herrera
Clodoaldo escribió: Now what is happening is that reindex does not finish even with a small 6,500 rows table and after a reboot. In top there is no CPU or memory usage by postmaster and vmstat shows no disk activity. Hmm, are you vacuuming the system catalogs appropriately? -- Alvaro

Re: [GENERAL] Functional Index Question

2008-03-13 Thread Craig Ringer
James B. Byrne wrote: I am considering moving theses sorts of purification routines into the DBMS because I feel that is where they really belong. However, the prevailing sentiment of the community surrounding Rails seems to hold otherwise so I wonder if this is really the right thing to do.

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Clodoaldo
2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: Now what is happening is that reindex does not finish even with a small 6,500 rows table and after a reboot. In top there is no CPU or memory usage by postmaster and vmstat shows no disk activity. Hmm, are you

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Alvaro Herrera
Clodoaldo escribió: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: Now what is happening is that reindex does not finish even with a small 6,500 rows table and after a reboot. In top there is no CPU or memory usage by postmaster and vmstat shows no disk

Re: [GENERAL] porting vb6 code to pgplsql, referencing fields

2008-03-13 Thread Craig Ringer
josep porres wrote: I have a given table structure, so redesign it now is not possible due to having change a lot of things Furthermore, using M3TRAM INTEGER[5], PREU NUMERIC(10,2)[5] seems to me a very good way but I think it may appear problems when accessing to that table from third

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Lincoln Yeoh
At 11:37 AM 3/13/2008, Scott Marlowe wrote: I remember seeing something about some problems that using the tablespace per table option on some mysql site... goes to look... paraphrased from the Mysql Performance Blod... Using the innodb_file_per_table=1 setting really tends to work against

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Clodoaldo
2008/3/13, Greg Smith [EMAIL PROTECTED]: On Thu, 13 Mar 2008, Clodoaldo wrote: I recently had a crash during a bulk insert when i updated to the 2.6.24.3-12.fc8 kernel. I rebooted and Postgresql did its thing to recover and everything was working. I made the previous kernel,

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Craig Ringer
David Gagnon wrote: I just what a way to create a TEMP for the current transaction only. If possible I don't want to create the TEMP table first, specify all column types, etc. Well, you can get half way there with SELECT ... INTO TEMPORARY TABLE tablename, eg: SELECT 1 AS n, TEXT

Re: [GENERAL] Recomendations on raid controllers raid 1+0

2008-03-13 Thread Vivek Khera
On Mar 13, 2008, at 7:50 AM, Glyn Astill wrote: I'm looking at switching out the perc5i (lsi megaraid) cards from our Dell 2950s for something else as they're crap at raid 10. Use an actual LSI branded card instead of the Dell improved version. -- Sent via pgsql-general mailing list

[GENERAL] empty pg_stat user views

2008-03-13 Thread Robert Gobeille
On Posgresql 8.1, debian I have turned on stats collection: stats_start_collector = on stats_command_string = on stats_block_level = on stats_row_level = on stats_reset_on_server_start = on and am collecting system stats (eg. pg_statio_sys_tables). This is great. select count(*) from

Re: [GENERAL] Recomendations on raid controllers raid 1+0

2008-03-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 13 Mar 2008 14:18:43 -0400 Vivek Khera [EMAIL PROTECTED] wrote: On Mar 13, 2008, at 7:50 AM, Glyn Astill wrote: I'm looking at switching out the perc5i (lsi megaraid) cards from our Dell 2950s for something else as they're crap at raid

[GENERAL] WAL Archiving Error

2008-03-13 Thread Nikola
I am running PostgreSQL 8.2.4 on Windows 2003 Server. For past year or so I have been archiving logs without any problems. Recently I noticed a problem that appeared at random since I haven't changed the configuration. In the pg_log I noticed archiving works fine and then it gets stuck on a

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread rrahul
Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. But why does the client list dosen't tell that? I see Mysql bosting for Google,Yahoo, Alcatel.. What about Postgres the list is not that

Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-13 Thread Tom Lane
Gauthier, Dave [EMAIL PROTECTED] writes: Can't rename a db, complains that it doesn't exist. Yet psql -l shows that it does and I can connect to it ??? mmdcc228_SETUP(120)% psql stdb2 -c alter database stdb rename to stdb_tmp ERROR: database stdb does not exist Hmm, I wonder if this

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Steve Crawford
Currently postgresql's vacuum full also locks the affected tables. Does 8.3 vacuum full effectively make a copy of the entire table? How much extra space will the various vacuums use while vacuuming? As to 8.3 and how it handles vacuum-full internally, I can't say for certain without

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread kevin
Quoting Craig Ringer [EMAIL PROTECTED]: David Gagnon wrote: I just what a way to create a TEMP for the current transaction only. If possible I don't want to create the TEMP table first, specify all column types, etc. Well, you can get half way there with SELECT ... INTO TEMPORARY

Re: [GENERAL] Segmentation fault (core dumped) loading data on 8.3 upgrade: undefined symbol 'pg_valid_server_encoding_id',lazy binding failed!

2008-03-13 Thread Tom Lane
Chris Paul [EMAIL PROTECTED] writes: I exported an 8.2.6 database and am trying to load it on 8.3.0. I get this error: [EMAIL PROTECTED]:/var/postgres]$ ql -d postgres bak/dump.bak /usr/local/bin/psql:/usr/local/bin/psql: undefined symbol

[GENERAL] functions, replication and portability was: Functional Index Question

2008-03-13 Thread Ivan Sergio Borgonovo
On Fri, 14 Mar 2008 02:26:06 +0900 Craig Ringer [EMAIL PROTECTED] wrote: To me it seems obvious that such routines should be in the database, but I guess that's partly because of the sort of work I'm doing. Other apps can then use the in-DB routines, rather than To me too but... Then again,

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Alvaro Herrera
Steve Crawford escribió: Currently postgresql's vacuum full also locks the affected tables. Does 8.3 vacuum full effectively make a copy of the entire table? How much extra space will the various vacuums use while vacuuming? As to 8.3 and how it handles vacuum-full internally, I can't

Re: [GENERAL] Recomendations on raid controllers raid 1+0

2008-03-13 Thread Ivan Sergio Borgonovo
On Thu, 13 Mar 2008 14:18:43 -0400 Vivek Khera [EMAIL PROTECTED] wrote: On Mar 13, 2008, at 7:50 AM, Glyn Astill wrote: I'm looking at switching out the perc5i (lsi megaraid) cards from our Dell 2950s for something else as they're crap at raid 10. Use an actual LSI branded card instead of

[GENERAL] Dump format for long term archiving.

2008-03-13 Thread Ron Mayer
If one wanted to dump some postgres databases for long term archival storage (maybe decades), what's the recommended dump format? Is the tar or plain text preferred, or is there some other approach (xml? csv?) I should be looking at instead? Or should we just leave these in some postgres

Re: [GENERAL] Dump format for long term archiving.

2008-03-13 Thread Tom Lane
Ron Mayer [EMAIL PROTECTED] writes: If one wanted to dump some postgres databases for long term archival storage (maybe decades), what's the recommended dump format? Plain text pg_dump output, without question. Not only is it the most likely to load without problems, but if necessary you

Re: [GENERAL] Dump format for long term archiving.

2008-03-13 Thread brian
Ron Mayer wrote: If one wanted to dump some postgres databases for long term archival storage (maybe decades), what's the recommended dump format? Is the tar or plain text preferred, or is there some other approach (xml? csv?) I should be looking at instead? Or should we just leave these in

Re: [GENERAL] Subplan and index usage

2008-03-13 Thread Tom Lane
Vyacheslav Kalinin [EMAIL PROTECTED] writes: [ poor estimation for ] select * from cities where ( ficity_id in ( select ficity_id from cities_name_words where fsword like 'novgorod%' union select ficity_id from

Re: [GENERAL] Segmentation fault (core dumped) loading data on 8.3 upgrade: undefined symbol 'pg_valid_server_encoding_id',lazy binding failed!

2008-03-13 Thread Chris Paul
Tom Lane wrote: Chris Paul [EMAIL PROTECTED] writes: I exported an 8.2.6 database and am trying to load it on 8.3.0. I get this error: [EMAIL PROTECTED]:/var/postgres]$ ql -d postgres bak/dump.bak /usr/local/bin/psql:/usr/local/bin/psql: undefined symbol

Re: [GENERAL] Can't rename an existnig DB because it doesn't exist???

2008-03-13 Thread Dean Gibson (DB Administrator)
On 2008-03-13 10:10, Gauthier, Dave wrote: Ya, I'm thinking of dumping all the problem DBs, deleting them, recreating and reloading. Last thought: have you tried uninstalling and reinstalling PostgreSQL? If something is corrupted on the disk, it's either the data or the software. An

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Adrian Klaver
On Thursday 13 March 2008 4:49 am, David Gagnon wrote: Hi all, I think the title says everything:-) I just what a way to create a TEMP for the current transaction only. If possible I don't want to create the TEMP table first, specify all column types, etc. CREATE TEMP TABLE _T_CR1 AS

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Colin Wetherbee
Adrian Klaver wrote: On Thursday 13 March 2008 4:49 am, David Gagnon wrote: Hi all, I think the title says everything:-) I just what a way to create a TEMP for the current transaction only. If possible I don't want to create the TEMP table first, specify all column types, etc. CREATE

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Adrian Klaver
On Thursday 13 March 2008 2:46 pm, Colin Wetherbee wrote: Adrian Klaver wrote: On Thursday 13 March 2008 4:49 am, David Gagnon wrote: Hi all, I think the title says everything:-) I just what a way to create a TEMP for the current transaction only. If possible I don't want to

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Colin Wetherbee
Adrian Klaver wrote: On Thursday 13 March 2008 2:46 pm, Colin Wetherbee wrote: Adrian Klaver wrote: On Thursday 13 March 2008 4:49 am, David Gagnon wrote: Hi all, I think the title says everything:-) I just what a way to create a TEMP for the current transaction only. If possible I

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Tom Lane
Colin Wetherbee [EMAIL PROTECTED] writes: Adrian Klaver wrote: Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ; I don't know what version the OP is using, but that doesn't work on 8.1: Seems to be there in 8.2 and up. regards, tom lane -- Sent

[GENERAL] Question about the cluster command

2008-03-13 Thread Anton Andreev
Hi, Can I cluster the tuples in a table like that: group by company_id order by opendate desc How do I create an index representing the above logic to use it with the cluster command. Can I automate the clustering process to best optimize my database performance and always get the data about

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Colin Wetherbee
Tom Lane wrote: Colin Wetherbee [EMAIL PROTECTED] writes: Adrian Klaver wrote: Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ; I don't know what version the OP is using, but that doesn't work on 8.1: Seems to be there in 8.2 and up. In 8.2: cww=# BEGIN; BEGIN

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Colin Wetherbee
Colin Wetherbee wrote: Tom Lane wrote: Colin Wetherbee [EMAIL PROTECTED] writes: Adrian Klaver wrote: Try CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b) ; I don't know what version the OP is using, but that doesn't work on 8.1: Seems to be there in 8.2 and up. In 8.2:

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Tom Lane
Colin Wetherbee [EMAIL PROTECTED] writes: Colin Wetherbee wrote: cww=# CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b); FWIW, the output of \h CREATE TABLE in both 8.1 and 8.2 suggest that this should be possible. \h CREATE TABLE AS is what describes this variant ...

[GENERAL] My CPU usage remains over 50% with Postgre

2008-03-13 Thread Guillermo Arias
Hello, i have a problem with Postgre. When i perform a query Postgre do it all right, but CPU usage remains over 50%, even if i finished with queries. I try rebooting the pc, it works fine; for some time i have around 1% to 5% of cpu usage, but if i start other query it raises to 50% and keep it

Re: [GENERAL] Is there a way to elegantly do a : CREATE TEMP TABLE X AS SELECT .... ON COMMIT DROP

2008-03-13 Thread Colin Wetherbee
Tom Lane wrote: Colin Wetherbee [EMAIL PROTECTED] writes: Colin Wetherbee wrote: cww=# CREATE TEMP TABLE foo ON COMMIT DROP AS (SELECT 1 AS a, 2 AS b); FWIW, the output of \h CREATE TABLE in both 8.1 and 8.2 suggest that this should be possible. \h CREATE TABLE AS is what describes this

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Adrian Klaver
On Thursday 13 March 2008 5:36 am, rrahul wrote: Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. But why does the client list dosen't tell that? I see Mysql bosting for Google,Yahoo, Alcatel..

Re: [GENERAL] Dump format for long term archiving.

2008-03-13 Thread Andrej Ricnik-Bay
On 14/03/2008, brian [EMAIL PROTECTED] wrote: The version you dump it from is unlikely to be difficult to find ten years from now. I'd just make sure to append the pg version to the archive so it's obvious to any future data archaeologists what's needed to breathe life back into it. Let me

Re: [GENERAL] Trigger to run @ connection time?

2008-03-13 Thread Dawid Kuroczko
On Thu, Mar 13, 2008 at 2:18 PM, Marko Kreen [EMAIL PROTECTED] wrote: On 3/13/08, Dawid Kuroczko [EMAIL PROTECTED] wrote: An application which uses tsearch2 ('SELECT set_curdict() / set_curcfg()' being called upon session start). That is fine and that works. Now, using statement

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Andrej Ricnik-Bay
On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. But why does the client list dosen't tell that? I see Mysql bosting for Google,Yahoo,

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Clodoaldo
2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: Now what is happening is that reindex does not finish even with a small 6,500 rows table and after a reboot. In top there is no CPU or

[GENERAL] tsearch2 word separators

2008-03-13 Thread Sushant Sinha
A document may contain date in the traditional format. For example it may contain '11/1/2007'. It will be useful if we can directly search for year in a document. However, the 'default' tsearch2 parser does not break down integers separated by '/'. So I my search for '2007' will not match

Re: [GENERAL] My CPU usage remains over 50% with Postgre

2008-03-13 Thread Tom Lane
Guillermo Arias [EMAIL PROTECTED] writes: Hello, i have a problem with Postgre. When i perform a query Postgre do it all right, but CPU usage remains over 50%, even if i finished with queries. I try rebooting the pc, it works fine; for some time i have around 1% to 5% of cpu usage, but if i

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Tom Lane
Andrej Ricnik-Bay [EMAIL PROTECTED] writes: On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: I see Mysql bosting for Google,Yahoo, Alcatel.. What about Postgres the list is not that impressive. What then? Could it be marketing or the sad results of a avalanche effect? Geee, there's a

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread David Wall
What then? Could it be marketing or the sad results of a avalanche effect? Geee, there's a thought. What a wide variety of topics. One big difference for me is that MySQL used to be open source, but it no longer is. It's an odd hybrid OSS that barely makes sense to me since they claim

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Steve Crawford
Andrej Ricnik-Bay wrote: On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: Thanks to all you wonderful people out their. I don't know if its your love for Postgres or nepothism that makes it look far superior than mysql. But why does the client list dosen't tell that? I see Mysql bosting

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Greg Smith
On Thu, 13 Mar 2008, rrahul wrote: I see Mysql bosting for Google,Yahoo, Alcatel.. Sure they are. Do some reading on the Google installation. The blog list at http://www.mysql.com/customers/customer.php?id=75 works as well as any. The reality here is that Google was just about fed up

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Ivan Sergio Borgonovo
On Thu, 13 Mar 2008 20:08:27 -0400 Tom Lane [EMAIL PROTECTED] wrote: Andrej Ricnik-Bay [EMAIL PROTECTED] writes: On 14/03/2008, rrahul [EMAIL PROTECTED] wrote: I see Mysql bosting for Google,Yahoo, Alcatel.. What about Postgres the list is not that impressive. What then? Could it

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 13 Mar 2008 20:08:27 -0400 Tom Lane [EMAIL PROTECTED] wrote: Marketing. Remember that MySQL AB have a strong financial incentive to make organized efforts to locate and publicize impressive-sounding users of MySQL. (I've heard rumors

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Chris Browne
[EMAIL PROTECTED] (David Wall) writes: What then? Could it be marketing or the sad results of a avalanche effect? Geee, there's a thought. What a wide variety of topics. One big difference for me is that MySQL used to be open source, but it no longer is. It's an odd hybrid OSS that barely

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Andrej Ricnik-Bay
On 14/03/2008, Steve Crawford [EMAIL PROTECTED] wrote: What can I say? 96% of personal computers run some form of windows. Does that mean it's a superior product to a PC running Linux, or a Mac w/ MacOS? I'd say no (actually more like NOOO!), because windows doesn't let me do 80%

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Greg Smith
On Fri, 14 Mar 2008, Andrej Ricnik-Bay wrote: A silly question in this context: If we know of a company that does use PostgreSQL but doesn't list it anywhere ... can we take the liberty to publicise this somewhere anyway? Bad idea. There are companies who consider being listed as a user of

Re: [GENERAL] postgre vs MySQL

2008-03-13 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 14 Mar 2008 00:05:10 -0400 (EDT) Greg Smith [EMAIL PROTECTED] wrote: On Fri, 14 Mar 2008, Andrej Ricnik-Bay wrote: A silly question in this context: If we know of a company that does use PostgreSQL but doesn't list it anywhere ... can

[GENERAL] Using MicroOLAP DAC to connect to Database - Problem with Grid

2008-03-13 Thread J Ottery
Running Windows XP. Delphi 7 programming environment Installed PostgreSQL. Downloaded and installed TRIAL MicroOLAP DAC components for postgreSQL. Linked to a DBGrid component via PSQLTable and Datasource. I can connect to and view the table in the grid BUT if I try to add (post) a record (just

Re: [GENERAL] Reindex does not finish 8.2.6

2008-03-13 Thread Scott Marlowe
On Thu, Mar 13, 2008 at 5:49 PM, Clodoaldo [EMAIL PROTECTED] wrote: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: 2008/3/13, Alvaro Herrera [EMAIL PROTECTED]: Clodoaldo escribió: Now what is happening is that reindex does not finish even with