Re: [GENERAL] PG periodic Error on W2K

2007-03-01 Thread Magnus Hagander
On Thu, Mar 01, 2007 at 09:44:19AM +0900, Paul Lambert wrote: I'm running PG 8.2.3 on We doze 2000 Server. (Should I apologise for that up front to appease the masses?) I am periodically getting errors pop up on the server console of the following nature: The File or directory

[GENERAL] usage for 'with recursive'?

2007-03-01 Thread hubert depesz lubaczewski
there have been a discussions about how posdtgresql needs 'with recursive' queries. not that i would like to object the idea (new feature is always a good thing), but is anybody able to show me real usage of this kind of queries? as i see it the only usage for 'with recursive' is when one have

[GENERAL] Please Help ! Error with Access 2003

2007-03-01 Thread hengky liwandouw
Dear all, I have another problem with Access 2003 as front end with Postgre 8.1, ODBC version 8.02.02 Unicode. I just upgrade the Point of Sales Program to Access 2003 MDE, all station running XP Home wth Access 2003 on P4 3.0, 512MB Memory, 40GB HDD. Server run Windows Server 2003

Re: [GENERAL] Please Help ! Error with Access 2003

2007-03-01 Thread Magnus Hagander
On Thu, Mar 01, 2007 at 02:31:12AM -0800, hengky liwandouw wrote: Dear all, I have another problem with Access 2003 as front end with Postgre 8.1, ODBC version 8.02.02 Unicode. I just upgrade the Point of Sales Program to Access 2003 MDE, all station running XP Home wth Access

Re: [GENERAL] Assistance with Query Optimisation?

2007-03-01 Thread Isak Hansen
On 3/1/07, Shaun Johnston [EMAIL PROTECTED] wrote: Hi Apologies in advance for the verbosity of my explanation for this problem, but I think it's all pertinent. I have a fairly simple query which postgresql's query planner seems to be interpreting / optimising in interesting ways: Query:

Re: [GENERAL] usage for 'with recursive'?

2007-03-01 Thread Kenneth Downs
hubert depesz lubaczewski wrote: there have been a discussions about how posdtgresql needs 'with recursive' queries. not that i would like to object the idea (new feature is always a good thing), but is anybody able to show me real usage of this kind of queries? as i see it the only usage for

[GENERAL] cast bytea to text

2007-03-01 Thread Willy-Bas Loos
Dear List, How can i cast bytea to text? I´ve read about the DECODE function, but my 8.1 backend doesn´t recognize it. I´m trying to create an implicit cast using the function: create or replace function bytea2text(bytea) returns text as $$ select DECODE($1, 'escape'); $$ language sql strict;

Re: [GENERAL] Please Help ! Error with Access 2003

2007-03-01 Thread Bill Moran
In response to hengky liwandouw [EMAIL PROTECTED]: Dear all, I have another problem with Access 2003 as front end with Postgre 8.1, ODBC version 8.02.02 Unicode. I just upgrade the Point of Sales Program to Access 2003 MDE, all station running XP Home wth Access 2003 on P4

Re: [GENERAL] cast bytea to text

2007-03-01 Thread Raymond O'Donnell
Willy-Bas Loos wrote: ERROR: function decode(bytea, unknown) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You may need to add explicit type casts. Context: SQL function bytea2text That's because the first parameter of decode() should be of

Re: [GENERAL] cast bytea to text

2007-03-01 Thread Peter Eisentraut
Willy-Bas Loos wrote: How can i cast bytea to text? I´ve read about the DECODE function, but my 8.1 backend doesn´t recognize it. You want to use encode() in that direction. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of

Re: [GENERAL] [HACKERS] urgent: upgraded to 8.2, getting kernel panics

2007-03-01 Thread Merlin Moncure
On 2/26/07, Merlin Moncure [EMAIL PROTECTED] wrote: On 2/23/07, Tom Lane [EMAIL PROTECTED] wrote: Merlin Moncure [EMAIL PROTECTED] writes: On friday we upgraded a critical backend server to postgresql 8.2 running on fedora core 4. Umm ... why that particular choice of OS? Red Hat dropped

Re: [GENERAL] [HACKERS] urgent: upgraded to 8.2, getting kernel panics

2007-03-01 Thread Magnus Hagander
On Thu, Mar 01, 2007 at 08:32:57AM -0500, Merlin Moncure wrote: Following an emergency downgrade back to 8.1, the kernel panics went away. Note that I don't believe for a second that the database was the root cause here...research suggest that the problem is due to some type of bug in the

[GENERAL] TSearch2: Can't build gendict output

2007-03-01 Thread Hannes Dorbath
PG 8.2.3 + tsearch_snowball_82.gz. gendict line: ./config.sh -n de -s -p german_UTF_8 -v -C 'Snowball stemmer for German (UTF8)' make in contrib/dict_de/: gcc -march=prescott -O2 -pipe -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels

Re: [GENERAL] TSearch2: Can't build gendict output

2007-03-01 Thread Hannes Dorbath
Seems I downloaded wrong libstemmer_c.tgz. Works with the files from my old install. On 01.03.2007 15:59, Hannes Dorbath wrote: What is the problem? -- Regards, Hannes Dorbath ---(end of broadcast)--- TIP 1: if posting/reading through Usenet,

Re: [GENERAL] Recursive/Wildcard Object Ownership Change

2007-03-01 Thread Brian A. Seklecki
Corrections (was in a hurry to get to class): - There is no way to specify recursion in ALTER _DATABASE_ OWNER TO rolename (changes all objects) ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] why can't I increase shared buffers to higher value?

2007-03-01 Thread Brian A. Seklecki
http://lists.freebsd.org/pipermail/freebsd-hackers/2006-December/018854.html ~BAS On Wed, 28 Feb 2007, Dino Vliet wrote: I have the following config but increasing the shared buffers to a value greater then 32 doesn't let the database server start (I want a value of 256MB there because I

Re: [GENERAL] PG periodic Error on W2K

2007-03-01 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: On Thu, Mar 01, 2007 at 09:44:19AM +0900, Paul Lambert wrote: I am periodically getting errors pop up on the server console of the following nature: The File or directory D:\PostgresQL\Data\global\pgstat.stat is corrupt and unreadable. Please run

Re: [GENERAL] Bad performace of a query

2007-03-01 Thread Kaloyan Iliev
Hi, The index doesn't cost you so much, seq SEQ Scan actully does: Seq Scan on isbns_a_descubrir  (cost=0.00..8067.91 rows=1 width=21) (actual time=30.044..30.044 rows=1 loops=2025) This seq scan is called once for every row of librosdisponibilidadtemp which passes the WHERE condition. So

[GENERAL] strange behaviour with sub-select and pl/pgSQL

2007-03-01 Thread Robert Partyka
Hi, I found PostgreSQL have strange behaviour with sub-select and pl/pgSQL, see the case study at: http://www.bobson.pl/pgsql/pgsql_sb1.html I know my version is quite old. Its most new in gentoo (hope 8.2 will be soon in gentoo portage). test=# select version();

[GENERAL] 2d array issues

2007-03-01 Thread John Gant
Hello, Can anyone tell me why the function below is breaking at the second assignment? I am trying to set values for columns 1 and 2 for row 1. The compilation and error are below the function definition. Thanks in advance. 1. CREATE OR REPLACE FUNCTION test() returns void AS $$ 2. declare

[GENERAL] 8.1.8 Installer Fails on Win2k Server

2007-03-01 Thread Saqib Awan
I am installing on a Cisco Media Server 7800 running Win2k Server and am noticing that the installer fails every time with the error dialog saying Failed to create process for initdb: Access is denied. It looks like that I need to change some permission in the registry allowing other users

Re: [GENERAL] PostgreSQL 8.2.3, Jboss 4.0.3 and postgresql-8.2-504.jdbc4

2007-03-01 Thread Andy Dale
Hi, Have tried putting the JDBC driver in $JBOSS_HOME/server/server config/lib, that is where the I always put jdbc drivers (The default Hypersonic driver is also in this directory). Cheers, Andy On 28/02/07, Andrew Madu [EMAIL PROTECTED] wrote: Hi, i've just upgraded from posgreSQL 8.1 to

[GENERAL] Constructors for dates, times, and timestamps

2007-03-01 Thread Andrew T. Robinson
Migrating from DB/2 6.1 to PostgreSQL 8.1.4, The following work under DB/2, but I can find no analog in the PostgreSQL documentation: time('00:00:00') [there is to_date() and to_timestamp(), but no to_time()?] timestamp(u.date, u.time) [where u.date is of type DATE and u.time is of

Re: [GENERAL] performance of partitioning?

2007-03-01 Thread Brent Wood
George Nychis wrote: Hey all, So I have a master table called flows and 400 partitions in the format flow_* where * is equal to some epoch. Each partition contains ~700,000 rows and has a check such that 1 field is equal to a value: flows_1107246900_interval_check CHECK (interval =

Re: [GENERAL] Bad performace of a query

2007-03-01 Thread Kaloyan Iliev
Hi, The index doesn't cost you so much, seq SEQ Scan actully does: Seq Scan on isbns_a_descubrir  (cost=0.00..8067.91 rows=1 width=21) (actual time=30.044..30.044 rows=1 loops=2025) This seq scan is called once for every row of librosdisponibilidadtemp which passes the WHERE condition. So

[GENERAL] postgres init script reports failure, but postmaster started

2007-03-01 Thread IN Conny
Hi all, I'm not sure if the following is a bug or not. The symptoms I have is pretty much like this bug https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=166117 which have been documented in various archives. However, I run postgres 8.1. What I do is i try to restore from a backup. I have a

[GENERAL] Can I getting a unique ID from a select

2007-03-01 Thread Timasmith
I am using hibernate, using a view like a read only table and I need a primary key each time a select is issued. So in Oracle terms this might work, though I am skeptical that Hibernate is going to return a cached result. create view myview as select rownum, t1.field, t2.field from tableOne t1,

[GENERAL] US Highschool database in postgres

2007-03-01 Thread mobil
Is there a downlaodable high school database in postgresql thanks a lot guys Mobil ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

[GENERAL] postgres powered search engine

2007-03-01 Thread John
http://teenwag.com/search ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] General Ledger db design

2007-03-01 Thread Brent Wood
Filipe Fernandes wrote: [snip] Martin Winsler wrote: Does anybody have any experience or knowledge of building financial accounting databases? [snip] I too was thinking about building a double entry accounting system and I've been following this thread closely,

[GENERAL] Bug in row locking?

2007-03-01 Thread Ing. Pavel Hanák
Hi, I noticed a problem by trying to lock rows of the view for update, if the definition of the view consists the reference to another view. Example: create table test (a int) insert into test values (1) insert into test values (2) insert into test values (3) insert into test values (4)

[GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Shiva Sarna
Hi, I am working on a web application where the front end is struts framework and back end is PgSQL 7.4. The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I increase the max_connections of pgsql to 2000. Is there a limit to

Re: [GENERAL] PG periodic Error on W2K

2007-03-01 Thread Magnus Hagander
On Thu, Mar 01, 2007 at 10:45:16AM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: On Thu, Mar 01, 2007 at 09:44:19AM +0900, Paul Lambert wrote: I am periodically getting errors pop up on the server console of the following nature: The File or directory

Re: [GENERAL] General Ledger db design

2007-03-01 Thread Merlin Moncure
On 2/26/07, Filipe Fernandes [EMAIL PROTECTED] wrote: [snip] Martin Winsler wrote: Does anybody have any experience or knowledge of building financial accounting databases? [snip] I too was thinking about building a double entry accounting system and I've been following this thread closely,

[GENERAL] creating a function with a variable table name

2007-03-01 Thread George Nychis
Hey all, I'm trying to create a function in which the table a query is run on is variable, but I guess this is not as easy as I thought. BEGIN dp= CREATE FUNCTION stats_addr_dst(date,text) dp- RETURNS setof addr_count dp- AS 'SELECT ip,sum(dst_packets) dp' FROM( dp' (SELECT dst_ip

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Hannes Dorbath
On 28.02.2007 07:15, Shiva Sarna wrote: The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I increase the max_connections of pgsql to 2000. Consider using a connection pool.. -- Regards, Hannes Dorbath

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Bill Moran
In response to Shiva Sarna [EMAIL PROTECTED]: Hi, I am working on a web application where the front end is struts framework and back end is PgSQL 7.4. The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I increase the

Re: [GENERAL] Can I getting a unique ID from a select

2007-03-01 Thread Bill Moran
In response to Timasmith [EMAIL PROTECTED]: I am using hibernate, using a view like a read only table and I need a primary key each time a select is issued. So in Oracle terms this might work, though I am skeptical that Hibernate is going to return a cached result. create view myview as

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Joshua D. Drake
Hannes Dorbath wrote: On 28.02.2007 07:15, Shiva Sarna wrote: The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I increase the max_connections of pgsql to 2000. Consider using a connection pool.. But to answer the question,

Re: [GENERAL] Why does group by need to match select fields?

2007-03-01 Thread Erik Jones
On Feb 28, 2007, at 6:57 PM, Omar Eljumaily wrote: OK, I see what's going on. I can have more than one max(amount) with the same amount and payee. Thanks so much. Like I said, it's sort of dogged me off and on many times. Thanks. Bill Moran wrote: Omar Eljumaily [EMAIL PROTECTED]

Re: [GENERAL] creating a function with a variable table name

2007-03-01 Thread Joshua D. Drake
dp' HAVING sum(dst_packets)0 dp' ORDER BY sum(dst_packets) DESC;' dp- LANGUAGE SQL; ERROR: syntax error at or near $2 at character 179 LINE 6: FROM $2 ^ How can I pass the table name? Look at the EXECUTE option in plpgsql. Joshua D. Drake Thanks!

Re: [GENERAL] postgres init script reports failure, but postmaster started

2007-03-01 Thread Tom Lane
IN Conny [EMAIL PROTECTED] writes: If I, as a final step in the restoration, start up postgres with '/etc/init.d/postgresql-8.1 start' it will print [fail] to the shell and exit. This happens about halfway through the restoration of WAL archives. You're probably using an init script that is

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Joshua D. Drake
Bill Moran wrote: In response to Shiva Sarna [EMAIL PROTECTED]: Hi, I am working on a web application where the front end is struts framework and back end is PgSQL 7.4. *cough*, you are going to greatly decrease your ability to scale if you are running anything less than 8.1.

Re: [GENERAL] Constructors for dates, times, and timestamps

2007-03-01 Thread Tom Lane
Andrew T. Robinson [EMAIL PROTECTED] writes: The following work under DB/2, but I can find no analog in the PostgreSQL documentation: time('00:00:00') [there is to_date() and to_timestamp(), but no to_time()?] Write it as a cast, either SQL-spec CAST() or PG :: notation. regression=#

[GENERAL] ftell mismatch with expected position

2007-03-01 Thread Jan Muszynski
I found this thread (I'm posting here because I'm not subscribed to Hackers) http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg85241.html which seems to be talking about this issue. I'm just wondering what the current status on this is. Someone I know is getting this error -(I'm not

Re: [GENERAL] creating a function with a variable table name

2007-03-01 Thread A. Kretschmer
am Thu, dem 01.03.2007, um 11:17:46 -0500 mailte George Nychis folgendes: Hey all, I'm trying to create a function in which the table a query is run on is variable, but I guess this is not as easy as I thought. BEGIN dp= CREATE FUNCTION stats_addr_dst(date,text) ... dp' FROM $2

Re: [GENERAL] Constructors for dates, times, and timestamps

2007-03-01 Thread Martijn van Oosterhout
On Tue, Feb 27, 2007 at 07:47:32AM -0500, Andrew T. Robinson wrote: Migrating from DB/2 6.1 to PostgreSQL 8.1.4, The following work under DB/2, but I can find no analog in the PostgreSQL documentation: time('00:00:00') [there is to_date() and to_timestamp(), but no to_time()?]

[GENERAL] get username of user calling function?

2007-03-01 Thread George Nychis
Hi, Is it possible to get the username of the user calling a function? Just as a test, a function which would return the user their username. Thanks! George ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] cast bytea to text

2007-03-01 Thread Albe Laurenz
How can i cast bytea to text? I´ve read about the DECODE function, but my 8.1 backend doesn´t recognize it. I´m trying to create an implicit cast using the function: create or replace function bytea2text(bytea) returns text as $$ select DECODE($1, 'escape'); $$ language sql strict;

Re: [GENERAL] creating a function with a variable table name

2007-03-01 Thread George Nychis
do I need to use PREPARE with it also? A. Kretschmer wrote: am Thu, dem 01.03.2007, um 11:17:46 -0500 mailte George Nychis folgendes: Hey all, I'm trying to create a function in which the table a query is run on is variable, but I guess this is not as easy as I thought. BEGIN dp= CREATE

Re: [GENERAL] Why does group by need to match select fields?

2007-03-01 Thread Martijn van Oosterhout
On Wed, Feb 28, 2007 at 04:57:08PM -0800, Omar Eljumaily wrote: OK, I see what's going on. I can have more than one max(amount) with the same amount and payee. Thanks so much. Like I said, it's sort of dogged me off and on many times. Note that in the special case of max/min, you can use

Re: [GENERAL] Why does group by need to match select fields?

2007-03-01 Thread Martijn van Oosterhout
On Wed, Feb 28, 2007 at 04:57:08PM -0800, Omar Eljumaily wrote: OK, I see what's going on. I can have more than one max(amount) with the same amount and payee. Thanks so much. Like I said, it's sort of dogged me off and on many times. Note that in the case of min/max you can use ORDER

Re: [GENERAL] creating a function with a variable table name

2007-03-01 Thread A. Kretschmer
am Thu, dem 01.03.2007, um 11:47:02 -0500 mailte George Nychis folgendes: do I need to use PREPARE with it also? No. A. Kretschmer wrote: am Thu, dem 01.03.2007, um 11:17:46 -0500 mailte George Nychis folgendes: Hey all, Please no top-posting with fullquote below your text. Andreas

Re: [GENERAL] get username of user calling function?

2007-03-01 Thread A. Kretschmer
am Thu, dem 01.03.2007, um 11:40:11 -0500 mailte George Nychis folgendes: Hi, Is it possible to get the username of the user calling a function? You can use the current_user - variable. Select current_user; Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639

Re: [GENERAL] Bug in row locking?

2007-03-01 Thread Tom Lane
[EMAIL PROTECTED] (Ing. Pavel =?iso-8859-2?Q?Han=E1k?=) writes: But if you try to lock rows in the view vtest2, this error message occurs: ERROR: no relation entry for relid 5 Wow, amazing no one reported this before, because it seems to be broken all the way back to 7.3 ... will look into

Re: [GENERAL] How often do I need to reindex tables?

2007-03-01 Thread Vivek Khera
On Feb 28, 2007, at 5:35 PM, Bill Moran wrote: Just an FYI ... I remembered what prompted the cron job. We were seeing significant performance degradation. I never did actual measurements, but it was on the order of Bill, why is restoring taking such a long time? from other systems

Re: [GENERAL] get username of user calling function?

2007-03-01 Thread George Nychis
A. Kretschmer wrote: You can use the current_user - variable. Select current_user; I'm trying to create a function in which users can only kill their own processes, it works perfectly if i hardcode a username in such as this: CREATE FUNCTION kill_process(integer) RETURNS boolean AS 'select

Re: [GENERAL] US Highschool database in postgres

2007-03-01 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/27/07 01:04, mobil wrote: Is there a downlaodable high school database in postgresql What exactly do you mean by high school database? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux)

Re: [GENERAL] PG periodic Error on W2K

2007-03-01 Thread MargaretGillon
Date: Thu, 01 Mar 2007 10:06:44 +0900 From: Paul Lambert [EMAIL PROTECTED] To: Joshua D. Drake [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Subject: Re: PG periodic Error on W2K Message-ID: [EMAIL PROTECTED] I propound to all my sincerest of apologies for installing what I

Re: [GENERAL] get username of user calling function?

2007-03-01 Thread David Legault
On 3/1/07, George Nychis [EMAIL PROTECTED] wrote: A. Kretschmer wrote: You can use the current_user - variable. Select current_user; I'm trying to create a function in which users can only kill their own processes, it works perfectly if i hardcode a username in such as this: CREATE FUNCTION

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Bill Moran
In response to Joshua D. Drake [EMAIL PROTECTED]: Bill Moran wrote: In response to Shiva Sarna [EMAIL PROTECTED]: Hi, I am working on a web application where the front end is struts framework and back end is PgSQL 7.4. *cough*, you are going to greatly decrease your ability to

Re: [GENERAL] get username of user calling function?

2007-03-01 Thread George Nychis
David Legault wrote: See the EXECUTE function in the pl/pgSQL language in the docs for dynamic queries. So it turns out that in a SECURITY DEFINER the current_user is the owner of the function. I had to use session_user and it works now :) - George ---(end of

Re: [GENERAL] /libexec/ld-elf.so.1: Shared object libpq.so.4 not found

2007-03-01 Thread Palle Girgensohn
postgresql-8-2 installs libpq.so.5. You need to upgrade pgadmin to link with libpq.so.5, or you need to downgrade postgresql to 8.1.x. Once you downgraded postgres, you can upgrade it again using portupgrade; it will save a copy of libpq.so.4 in /usr/local/lib/ compat/pkg/, so as long as

Re: [GENERAL] cast bytea to text

2007-03-01 Thread Willy-Bas Loos
yep, sry it took me a while to answer. It works now. here´s my code: -- start code -- create or replace function bytea2text(bytea) returns text as $$ select ENCODE($1, 'escape'); $$ language sql strict; create cast (bytea as text) with function bytea2text(bytea) as implicit; -- end code --

Re: [GENERAL] get username of user calling function?

2007-03-01 Thread David Legault
On 3/1/07, George Nychis [EMAIL PROTECTED] wrote: David Legault wrote: See the EXECUTE function in the pl/pgSQL language in the docs for dynamic queries. So it turns out that in a SECURITY DEFINER the current_user is the owner of the function. I had to use session_user and it works now

Re: [GENERAL]

2007-03-01 Thread Josh Berkus
Radovan, I am interesting if you are planning or would like to incorporate pg_bulkload external function(s) into Postgresql 8.3 code. pg_bulkload is function which surpase COPY command in bulk data loading about 3 times. The correct place to propose this is on pgsql-hackers. The authors of

[GENERAL] PostgreSQL primary (sequence) key issue (Ruby/Rails)

2007-03-01 Thread Andrew Madu
Hi Guys, I'm completely stumped with this one! I've included ActiveRecord::Base.set_sequence_name in my environment.rb, and in my user.rb I've placed the following code: class Usertbl ActiveRecord::Base set_primary_key user_id set_sequence_name seq_user_mytable validates_uniqueness_of

Re: [GENERAL] PostgreSQL primary (sequence) key issue (Ruby/Rails)

2007-03-01 Thread Russ Brown
Joshua D. Drake wrote: On 01/03/07, Andrew Madu [EMAIL PROTECTED] wrote: Hi Dave, my apologies for contacting you off list but i'm having a spot of bother with postgreSQL sequence setup in rails. In addition to what is mentioned below, I have place the following line of code in my The

[GENERAL] hardware question - LSI MegaRaid 8480e

2007-03-01 Thread Alan Hodgson
Does anyone have anything specifically good or bad to say about the LSI MegaRaid 8480e, in particular RAID-10 performance, and performance and stability under Linux or any problems with the battery-backed cache option? I'm building a new database server and planning to hook one of these up to

[GENERAL] who uses tsearch2

2007-03-01 Thread John Smith
guys, need to pitch tsearch2+postgresql- need some big names who use ts2? jzs ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Constructors for dates, times, and timestamps

2007-03-01 Thread Andrew T. Robinson
Thanks for the pointers. I did figure out '-mm-dd'::date 'hh:mm:ss'::time And I also came up with (date_column::text || ' ' || time_column::text)::timestamp Which is too ugly for words. I appreciate the more elegant solutions posted to the list. I'm growing to like Postgres,

[GENERAL] Connections over SSH tunnels closing after idle time

2007-03-01 Thread Jerry Sievers
Curious if others have run into this; Client side is Ubuntu Linux, server side is Solaris 10/ SPARC. Pg version is 8.1.5. Connecting to some machines requires tunneling through another host that sits on 2 network interfaces. ssh -n -N -N port:remote.host:5432 tunnelhost Connections work as

Re: [GENERAL] hardware question - LSI MegaRaid 8480e

2007-03-01 Thread Merlin Moncure
On 3/1/07, Alan Hodgson [EMAIL PROTECTED] wrote: Does anyone have anything specifically good or bad to say about the LSI MegaRaid 8480e, in particular RAID-10 performance, and performance and stability under Linux or any problems with the battery-backed cache option? I'm building a new database

Re: [GENERAL] who uses tsearch2

2007-03-01 Thread Magnus Hagander
John Smith wrote: guys, need to pitch tsearch2+postgresql- need some big names who use ts2? http://search.postgresql.org, about 600,000 webpages and emails in the archives. //Magnus ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] PG periodic Error on W2K

2007-03-01 Thread Paul Lambert
[EMAIL PROTECTED] wrote: Date: Thu, 01 Mar 2007 10:06:44 +0900 From: Paul Lambert [EMAIL PROTECTED] To: Joshua D. Drake [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Subject: Re: PG periodic Error on W2K Message-ID: [EMAIL PROTECTED] I propound to all my sincerest of

Re: [GENERAL] strange behaviour with sub-select and pl/pgSQL

2007-03-01 Thread Tom Lane
Robert Partyka [EMAIL PROTECTED] writes: http://www.bobson.pl/pgsql/pgsql_sb1.html 8.2 won't flatten sub-selects that contain volatile functions in their targetlists... regards, tom lane ---(end of broadcast)--- TIP 6:

[GENERAL] is pg_standby over nfs expected to work?

2007-03-01 Thread Merlin Moncure
I have been experimenting with pg_standby with the primay copying files to a nfs folder mounted from a special server on the standby. Inevitably, the following happens: LOG: restored log file 000100E7 from archive LOG: restored log file 000100E8 from archive

Re: [GENERAL] Assistance with Query Optimisation?

2007-03-01 Thread Shaun Johnston
Isak Hansen wrote: First thing I notice is that your query plans seem to only use one index. Postgres should be able to combine the timestamp and account_id indexes in that first query, if the optimizer thought there was a point in doing so? Absolutely brilliant - this solved my issue,

[GENERAL] rpm containing pgdump

2007-03-01 Thread Frank Church
Which of the postgresql rpms contains pgdump. I have downloaded postgresql-server and postgresql-libs and pgdump is not included. Which rpm contains it? /frank ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] supporting 2000 simultaneous connections.

2007-03-01 Thread Mariano Mara
Shiva Sarna escribió: Hi, I am working on a web application where the front end is struts framework and back end is PgSQL 7.4. The client want us to support 2000 simultaneous users. My question is will there be any performance degradation if I increase the max_connections of pgsql to 2000.

Re: [GENERAL] rpm containing pgdump

2007-03-01 Thread Jorge Godoy
Frank Church [EMAIL PROTECTED] writes: Which of the postgresql rpms contains pgdump. I have downloaded postgresql-server and postgresql-libs and pgdump is not included. Which rpm contains it? On my SuSE box it is the 'postgresql' RPM. -- Jorge Godoy [EMAIL PROTECTED]

[GENERAL] Fun with Cursors- how to rewind a cursor

2007-03-01 Thread Postgres User
Hi, I'm opening a refcursor in Postgres to return a dataset to the client. However, before returning the cursor, I'd like to iterate thru the rows. Here's the code: DECLARE ref_entry refcursor; rec record; i integer = 0; v_list varchar = ''; BEGIN OPEN ref_entry FOR

[GENERAL] Constraint validation

2007-03-01 Thread Demian Lessa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, After browsing the source, and running some experiments, it seems like PostgreSQL blindly verifies all CHECK constraints for an update, even if the update COULDN'T possibly be violated by the specified update (for instance UPDATE table SET

Re: [GENERAL] Constraint validation

2007-03-01 Thread Tom Lane
Demian Lessa [EMAIL PROTECTED] writes: After browsing the source, and running some experiments, it seems like PostgreSQL blindly verifies all CHECK constraints for an update, even if the update COULDN'T possibly be violated by the specified update (for instance UPDATE table SET field3=value

[GENERAL] Thanks to all

2007-03-01 Thread Paul Lambert
Thanks to all who have helped me over the last month or so with converting my system from M$ SQL server to Postgres. Unfortunately I've decided to scrap the project and continue working with M$ SQL Server... PG just isn't doing what I want. No... I jest, I've finally got the entire

Re: [GENERAL] Thanks to all

2007-03-01 Thread Terry Fielder
You may encounter many things in life which you may regret having done. Converting from M$ SQL to PostgreSQL is probably *not* one of them. Terry Terry Fielder [EMAIL PROTECTED] Associate Director Software Development and Deployment Great Gulf Homes / Ashton Woods Homes Fax: (416) 441-9085

[GENERAL] Add items to a record variable

2007-03-01 Thread eddy sanchez
WEBMAIL Server: UDABOLnet, Universidad de Aquino Bolivia Can anyone help me??? I work with plpgsql and I need to add items to a record variable, with a for statement, something like this: declare v_rec record; begin for nn in (some_xpresion) loop v_rec = vrec + [new_item]; --Here I

[GENERAL] SOLVED: Re: PostgreSQL primary (sequence) key issue (Ruby/Rails)

2007-03-01 Thread Andrew Madu
Hi, this one has been finally put to bed!! -- Regards Andrew On 01/03/07, Andrew Madu [EMAIL PROTECTED] wrote: Hi Guys, I'm completely stumped with this one! I've included ActiveRecord::Base.set_sequence_name in my environment.rb, and in my user.rb I've placed the following code: class

Re: [GENERAL] Fun with Cursors- how to rewind a cursor

2007-03-01 Thread Postgres User
Thanks for the pointer. According to the Postgres docs: The portal name used for a cursor can be specified by the programmer or automatically generated. To specify a portal name, simply assign a string to the refcursor variable before opening it. So I added the following code: before opening

Re: [GENERAL] Add items to a record variable

2007-03-01 Thread Postgres User
If you need to return a record to another function or client program, you can always use this sytnax: SELECT var_a::integer, var_b::integer, var_c::integer... etc where var_a, var_b, etc and local variables that hold your calculated values. You dont need to create a local record structure-

Re: [GENERAL] Add items to a record variable

2007-03-01 Thread Eddy D. Sanchez
Thanks. But I need to add fields to a defined and filled record, I don't know if I can do it, and how can I do it. If I have: v_record record; EXECUTE 'select * from table' INTO v_record; supposing (after query) that v_record contains just one row with 5 fields, I need to add the 6th,

Re: [GENERAL] Fun with Cursors- how to rewind a cursor

2007-03-01 Thread Tom Lane
Postgres User [EMAIL PROTECTED] writes: So I added the following code: before opening cursor ref_entry = 'c_entry'; after looping thru cursor MOVE Backward All In c_entry; You have to use EXECUTE for the latter. regards, tom lane ---(end

Re: [GENERAL] Fun with Cursors- how to rewind a cursor

2007-03-01 Thread Postgres User
I had tried several variations of MOVE Backward inside an Execute statement earlier. And now, I'm seeing this error appear again: ERROR: 0A000: cannot manipulate cursors directly in PL/pgSQL I updated the Postgres function below with this replacement line: Execute 'MOVE Backward All In

Re: [GENERAL] How often do I need to reindex tables?

2007-03-01 Thread Tom Lane
Bill Moran [EMAIL PROTECTED] writes: Just an FYI ... I remembered what prompted the cron job. We were seeing significant performance degradation. I never did actual measurements, but it was on the order of Bill, why is restoring taking such a long time? from other systems people. At the

Re: [GENERAL] Add items to a record variable

2007-03-01 Thread Postgres User
The first hack is probably a little easier. Let me try and flesh it out for you: declare rec1 record; rec2 record; new_fields varchar = ''; begin select fieldlist from mytable into rec1; -- inspect and play with your rec1 here -- now start a loop to add new fields if

Re: [GENERAL] Differences in identical queries

2007-03-01 Thread Richard Huxton
Rob Schall wrote: Question for anyone... I have to queries. One runs in about 2 seconds. The other takes upwards of 2 minutes. I have a temp table that is created with 2 columns. This table is joined with the larger database of call detail records. However, these 2 queries are handled very