Re: [GENERAL] grant select on all tables of schema or database

2006-09-27 Thread Najib Abi Fadel
when u connect to the database type:\h GRANTand you will get all the Grant options:GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }    ON DATABASE dbname [, ...]    TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]This will grant the privileges  on all tabl

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread John Sidney-Woollett
Stepping back a bit... Why not use an update trigger on the affected tables to record a lastupdated timestamp value when the record is changed. Surely this is simpler thanks computing some kind of row hash? John Karen Hill wrote: Tom Lane wrote: "Karen Hill" <[EMAIL PROTECTED]> writes: Ra

[GENERAL] grant select on all tables of schema or database

2006-09-27 Thread Gene
It seems like it should be a very easy problem to solve I just need one role to have select privileges on all the tables of a particular schema or database including any new tables that are created since they are created programmatically daily. I've combed google and the docs to no avail. Do I need

Re: [GENERAL] dbi-link questions + patch

2006-09-27 Thread David Fetter
On Wed, Sep 27, 2006 at 03:50:46PM +0200, Filip Rembiałkowski wrote: > Hi all :) > > first, sorry for crossposting but dbilink mailinglist is extremely low traffic > so I decided to mail this also to pgsql-general > > I'm looking for a solution that gives PostgreSQL "remote server" aka "proxy >

Re: [GENERAL] continued segmentation fault

2006-09-27 Thread Bob
Is there any reason can't update to a newer version. Like 8.x? Geoffrey wrote: > We continue to have segmentation faults of the /usr/bin/postgres process > as I mentioned in an earlier thread. In all cases, the core file > always indicates a segmentation fault, but the backtraces don't seem to >

Re: [GENERAL] Documenting stored procedures and functions

2006-09-27 Thread Jorge Godoy
Jim Nasby <[EMAIL PROTECTED]> writes: > Take a look at http://pgfoundry.org/projects/autodoc/. I believe it uses > comments (ie: COMMENT ON) as well, so you can get some info into that. Hi Jim! Thanks for pointing me to the tool. The correct link to it is http://www.rbt.ca/autodoc/. It might

[GENERAL] text to point conversion not working. ( cannot cast type text to point )

2006-09-27 Thread Dan Libby
Hi all, Using pgsql 8.0.1 I'm just starting with using the geometry data types in postgres, and ran into what seems like a very basic problem. Namely, I can't seem to convert/cast type text into type point when that text results from any expression. Ie, it *only* works for a plain string li

Re: [GENERAL] Replication and PITR

2006-09-27 Thread Robert Treat
On Monday 25 September 2006 07:48, Bo Lorentsen wrote: > Jeff Davis wrote: > > Standby mode means that the database is kept almost up to date with the > > master, but is not "up". When the master goes down, you can bring the > > standby machine up. Until then, you unfortunately can't even do read >

Re: [GENERAL] pl/perl autonomous transactions question

2006-09-27 Thread Robert Treat
On Monday 25 September 2006 15:05, Bob wrote: > I would like to use autonomous transactions for a large batch process and I > want this all encapsulated within stored procedures. I want to commit after > say every 15,000 records. The only way I have found to do this is to use > the perl DBI in my s

Re: [GENERAL] Solution for rolling back many transactions?

2006-09-27 Thread Lexington Luthor
Phillip Tornroth wrote: In case it's useful information, the test database is pretty small... Maybe 15 or 20 megs. The unit tests are individually pretty small.. Less than 100 inserts each, for sure... So there's not that much to 'roll back'.. As far as using transactions to undo the state of t

Re: [GENERAL] 'pg_ctl -w' times out when unix_socket_directory is

2006-09-27 Thread Jeff Davis
On Wed, 2006-09-27 at 14:26 -0700, Jeff Davis wrote: > When I have "unix_socket_directory" set to an alternate value, "pg_ctl - > D data -w start" times out. If I set it to default, it works fine. > > I'm using postgresql 8.1.4 on FreeBSD. > > Perhaps pg_ctl is waiting to see the socket file in /

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Karen Hill
Tom Lane wrote: > "Karen Hill" <[EMAIL PROTECTED]> writes: > > Ralph Kimball states that this is a way to check for changes. You just > > have an extra column for the crc checksum. When you go to update data, > > generate a crc checksum and compare it to the one in the crc column. > > If they ar

[GENERAL] 'pg_ctl -w' times out when unix_socket_directory is set

2006-09-27 Thread Jeff Davis
When I have "unix_socket_directory" set to an alternate value, "pg_ctl - D data -w start" times out. If I set it to default, it works fine. I'm using postgresql 8.1.4 on FreeBSD. Perhaps pg_ctl is waiting to see the socket file in /tmp/ before reporting that postgresql successfully started? Rega

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/27/06 16:02, Karen Hill wrote: > Gene Wirchenko wrote: [snip] >>> Yet what happens if there is a collision of the checksum for a row? >> Then you get told that no change has occurred when one has. I >> would call this an error. > > That's

Re: [GENERAL] change the order of FROM selection to make query work

2006-09-27 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > On Tue, 2006-09-26 at 09:19, Tom Lane wrote: >> I was aware that MySQL parses this sort of structure wrongly, but it's >> disappointing to hear that sqlite does too :-( > And I think MySQL fixed this abberant behaviour in the newest beta. Actually they

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Bill Moran
In response to Tom Lane <[EMAIL PROTECTED]>: > "Karen Hill" <[EMAIL PROTECTED]> writes: > > Ralph Kimball states that this is a way to check for changes. You just > > have an extra column for the crc checksum. When you go to update data, > > generate a crc checksum and compare it to the one in t

[GENERAL] memory issues when running with mod_perl

2006-09-27 Thread Jonathan Vanasco
Someone posted an issue to the mod-perl list a few weeks ago about their machine losing a ton of memory under a mod-perl2/apache/ postgres system - and only being able to reclaim it from reboots A few weeks later I ran into some memory related problems, and noticed a similar issue. Starti

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Karen Hill
Gene Wirchenko wrote: > >I just finished reading one of Ralph Kimball's books. In it he > >mentions something called a cyclical redundancy checksum (crc) > >function. A crc function is a hash function that generates a checksum. > > > >I am wondering a few things. A crc function would be extrem

Re: [GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Tom Lane
"Karen Hill" <[EMAIL PROTECTED]> writes: > Ralph Kimball states that this is a way to check for changes. You just > have an extra column for the crc checksum. When you go to update data, > generate a crc checksum and compare it to the one in the crc column. > If they are same, your data has not c

Re: [GENERAL] Cumulative aggregate

2006-09-27 Thread Tom Lane
"Paolo Saudin" <[EMAIL PROTECTED]> writes: > -- function for float (NOT WORKING) > create function myfloat4_sum(float4,float4) returns float4 > as 'select float4pl($1,$2)::float4;' > language SQL; > -- aggregate > create aggregate myagg2_sum (basetype = float4, sfunc = myfloat4_sum, stype > = float

Re: [GENERAL] How to Examine a view

2006-09-27 Thread Ray Stell
is this what you mean? testdb=# \d foo_view View "public.foo_view" Column | Type | Modifiers +---+--- x | character varying(20) | stuff | text | y | character varying(20) | View definition: SELECT a.x

Re: [GENERAL] postgress 8.1.4 deadlocking??

2006-09-27 Thread Casey Duncan
On Sep 27, 2006, at 12:35 PM, Rafal Pietrak wrote: Thenx Duncan for the analysis. This happend again, so I'm able to peek at the details you've pointed out. On Wed, 2006-09-27 at 09:33 -0700, Casey Duncan wrote: Sounds like it was blocked (unsure by what). You can use pg_locks to check that.

[GENERAL] cyclical redundancy checksum algorithm(s)?

2006-09-27 Thread Karen Hill
I just finished reading one of Ralph Kimball's books. In it he mentions something called a cyclical redundancy checksum (crc) function. A crc function is a hash function that generates a checksum. I am wondering a few things. A crc function would be extremely useful and time saving in determini

Re: [GENERAL] postgress 8.1.4 deadlocking??

2006-09-27 Thread Rafal Pietrak
Ups, missed the list recepient itself. Thenx Duncan for the analysis. This happend again, so I'm able to peek at the details you've pointed out. On Wed, 2006-09-27 at 09:33 -0700, Casey Duncan wrote: > Sounds like it was blocked (unsure by what). You can use pg_locks to > check that. That vie

[GENERAL] Cumulative aggregate

2006-09-27 Thread Paolo Saudin
Hi all, I want to write an aggregate to sum the values for rain precipitations. I found a working example with integer values, but I cannot find a way to to the same with float ones. Here is what I did :   -- table testcreate table mytest (fld1 int4, fld2 float4);insert into mytest values (1

Re: [GENERAL] How to create nightly backups in Linux

2006-09-27 Thread Steve Wampler
Andrus wrote: > I'm bit new to Linux. I'm using white-box linux and Postgres 8.1.4 > How to create backups of database with unique name in every night ? > Is there some script sample which can be called from /etc/crontab ? I use the following Z-shell script. Rewriting to bash should be trivial (p

Re: [GENERAL] hi, what is wrong with my newbie sql?

2006-09-27 Thread Tom Lane
"Ronin" <[EMAIL PROTECTED]> writes: > k = 10; > FOR k IN 1..10 LOOP > k = k +1; > END LOOP; > return k; An integer for-loop implicitly declares its control variable, so the "k" inside the loop is unrelated to the "k" ou

Re: [GENERAL] hi, what is wrong with my newbie sql?

2006-09-27 Thread Andreas Kretschmer
Ronin <[EMAIL PROTECTED]> schrieb: > Hi, the following sql returns "10" and not "20" as would be expected. > > Where is the error? This would for sure work in any programming > language, why is this different? > > CREATE FUNCTION test () RETURNS INTEGER AS ' > > DECLARE > k

Re: [GENERAL] [HACKERS] PostgreSQL HA questions

2006-09-27 Thread Andrew Sullivan
First, I'm moving this to -general, because this is way off topic for -hackers as near as I can tell. On Tue, Sep 26, 2006 at 10:39:18PM +0200, Dragan Zubac wrote: > 1. Is it possible for multiply PostgreSQL instances (engines,cores) to use > same DATA space? No. In fact, this is a very good w

Re: [GENERAL] cannt setup postgresql database for my opennms

2006-09-27 Thread Tom Lane
"=?utf-8?B?5p6X6bub546J?=" <[EMAIL PROTECTED]> writes: > Exception in thread "main" org.postgresql.util.PSQLException: > Connection refused. Check that the hostname and port are correct and > that the postmaster is accepting TCP/IP connections. > i have just now checked my postgre with command "ne

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution

2006-09-27 Thread Scott Marlowe
On Wed, 2006-09-27 at 00:22, Najib Abi Fadel wrote: > What is the problem with pg_pconnect and is pgpool easy to use with an > already running application ? > Should i expect a major performance boost ? pg_pconnect isn't "pooling" per se. In pooling, a large number of processes share a small num

Re: [GENERAL] change the order of FROM selection to make query work

2006-09-27 Thread Scott Marlowe
On Tue, 2006-09-26 at 09:19, Tom Lane wrote: > "Thomas Peter" <[EMAIL PROTECTED]> writes: > > the full code that does produce the error (and this error can be resolved > > as in OP described) is: > > Never oversimplify a bug report. > > > FROM ticket as t, permission as perm, enum as p > > LEFT O

[GENERAL] strange sql issue

2006-09-27 Thread Thomas Peter
hi, i support a trac [1] installation and changed the backend from sqlite to postgres 8.1.4 the following sql stopped working with postgres, and the fix of this problem seems strange to me. first the old sql, that worked with sqlite: SELECT p.value AS __color__, id AS ticket, summary, status, prio

Re: [GENERAL] Strange query results with invalid multibyte

2006-09-27 Thread Tom Lane
Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > On Wed, 2006-09-27 at 12:10 -0400, Tom Lane wrote: >> What you need to find out next is >> what character set encoding that locale implies on your machine. I'm >> betting it's not utf8 though :-( > If this is not what you mean, could you help me in

[GENERAL] continued segmentation fault

2006-09-27 Thread Geoffrey
We continue to have segmentation faults of the /usr/bin/postgres process as I mentioned in an earlier thread. In all cases, the core file always indicates a segmentation fault, but the backtraces don't seem to consistently point to any particular problem. Then again, when you go stomping aro

Re: [GENERAL] Postgresql reindex hangs when table is being updated

2006-09-27 Thread Scott Marlowe
On Tue, 2006-09-26 at 23:31, deep ... wrote: > Hi all, > > I'm running a web application supported by postgresql 7.4 on an unix > system. The management part of application requires reindexing of > tables. I see that whenever reindexing runs with the while the table > is getting updated/inserted i

[GENERAL] dbi-link questions + patch

2006-09-27 Thread Filip Rembiałkowski
Hi all :) first, sorry for crossposting but dbilink mailinglist is extremely low traffic so I decided to mail this also to pgsql-general I'm looking for a solution that gives PostgreSQL "remote server" aka "proxy tables" functionality. We're trying here to evaluate dbi-link, and have some probl

Re: [GENERAL] serial column

2006-09-27 Thread Brandon Aiken
Title: RE: [GENERAL] serial column Yes, but if I tear down the house at 245 Main St, we don't renumber 247 Main St and on down the line, do we? The problem here is that even if you get the sequencing to work, your table is dangerously unstable.  If you have 700 rows and you delete row #200,

[GENERAL] How to Examine a view

2006-09-27 Thread info
I have setup a view consisting of two tables and some compound fields. Now I would like from the client perspective see what those compound fields actually are originally. Let's (for simplicity I have inlcuded only one table) say we have: CREATE OR REPLACE VIEW clientview AS SELECT c.clientid, (c

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-27 Thread Najib Abi Fadel
What is the problem with pg_pconnect and is pgpool easy to use with an already running application ?Should i expect a major performance boost ? Najib."Joshua D. Drake" <[EMAIL PROTECTED]> wrote: Nikolay Samokhvalov wrote:> As for persistent connection with PHP, start from here:> http://php.net/pg_p

[GENERAL] Solution for rolling back many transactions?

2006-09-27 Thread Phillip Tornroth
The most cumbersome part of our many (hundreds) of unit tests that verify our data access is working, is creating and then deleting all of the test data. Currently, we're doing it at a pretty high level using java and our ORM (hibernate). It occurred to me that I can probably speed the dele

[GENERAL] hi, what is wrong with my newbie sql?

2006-09-27 Thread Ronin
Hi, the following sql returns "10" and not "20" as would be expected. Where is the error? This would for sure work in any programming language, why is this different? CREATE FUNCTION test () RETURNS INTEGER AS ' DECLARE k integer; BEGIN k = 10;

Re: [GENERAL] What is the Best Postgresql Load Balancing Solution available ?

2006-09-27 Thread Ben Trewern
You can try using pg_pconnect instead of pg_connect.  It has some downsides so see the docs.   Also - check your memory usage, it may be you could fix this by reducing work_mem or similar.   Regards,   Ben "Najib Abi Fadel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]...Hi

Re: [GENERAL] in failed sql transaction

2006-09-27 Thread Ralf Wiebicke
Sorry, I was a bit impatient and posted the same question in a newsgroup a few days before. There is an answer now: http://groups.google.de/group/comp.databases.postgresql/browse_thread/thread/36e5c65dd15b0388/1e5ff9b7e2c6863e?hl=de#1e5ff9b7e2c6863e Of course, if anyone has an additional idea,

[GENERAL] Postgresql reindex hangs when table is being updated

2006-09-27 Thread deep ...
Hi all, I'm running a web application supported by postgresql 7.4 on an unix system. The management part of application requires reindexing of tables. I see that whenever reindexing runs with the while the table is getting updated/inserted into, reindexing hangs. I understand this is because rein

Re: [GENERAL] change the order of FROM selection to make query work

2006-09-27 Thread Thomas Peter
Am 26.9.2006 schrieb "Tom Lane" <[EMAIL PROTECTED]>: >Define "stopped working" ... what was wrong exactly? oh, sorry. i forgot the error message: Error: org.postgresql.util.PSQLException: ERROR: invalid reference to FROM-clause entry for table "t", SQL State: 42P01, Error Code: 0 (i use squirrel

Re: [GENERAL] column names in select don't exists in insert to

2006-09-27 Thread Johan
Michael Fuhr schreef: > On Thu, Sep 21, 2006 at 01:32:47AM -0700, Johan wrote: > > Someone executed the query in psql for me and the problem seems to be > > in a stored procedure triggered after update. This procedure complains > > about the field. > > Were you able to fix the problem or are you

[GENERAL] cannt setup postgresql database for my opennms

2006-09-27 Thread 林黛玉
I am using linux Red Hat 8 OS, it may be 2 old now, ^_^ I have just installed my opennms by rpm package, and now i am running the installer to setup the PostgreSQL database: # $OPENNMS_HOME/bin/install -disU but some exception happens: ===

[GENERAL] How to create nightly backups in Linux

2006-09-27 Thread Andrus
I'm using the the following scheduler script to create nightly backups in Windows: set pgpassword=mypass set FILENAME=%DATE:~8,4%%DATE:~5,2%%DATE:~2,2%mybackup.backup "C:\Program Files\PostgreSQL\8.1\bin\pg_dump.exe" -i -Z9 -b -v -f "%FILENAME%" -F c -h localhost -U postgres mydb I'm bit new t

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-27 Thread Andrew Sullivan
On Wed, Sep 27, 2006 at 06:46:42PM +0200, Kai Hessing wrote: > > Deadlock means it hangs up and doesn't terminate through timeout. No, it doesn't. Deadlock means, for the two deadlocked queries, both cannot possibly finish because each waits on a lock that the other one holds. You can cause s

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-27 Thread Joe Conway
Kai Hessing wrote: Deadlock means it hangs up and doesn't terminate through timeout. The system goes into an endless loop. The part ('SELECT sid FROM stud_vera WHERE veraid = 2') seems to create a temporary table again and again and again It is possible for a query to run for many days, an

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-27 Thread Kai Hessing
Tom Lane wrote: > Kai Hessing <[EMAIL PROTECTED]> writes: >> No one any idea? *sigh* > > What makes you think it's a deadlock and not a very slow query? I'd be > checking if the tables were all ANALYZEd and comparing EXPLAIN output > to the old database ... *hmm* the difference of 5 seconds on 8

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-27 Thread Kai Hessing
Joe Conway wrote: > Martijn van Oosterhout wrote: >> It probably has something to with the fact that you didn't explain what >> you meant by "deadlock". Also, you refer to a temp table, yet don't >> indicate which table it is. Deadlock means it hangs up and doesn't terminate through timeout. The s

Re: [GENERAL] Dead Lock problem with 8.1.3

2006-09-27 Thread Kai Hessing
Alban Hertroys wrote: >>> SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid = >>> 34 AND s.sid NOT IN ( SELECT sid FROM stud_vera WHERE veraid = 2 ); > > I'm pretty sure it's not a deadlock. It probably takes very long for > some reason; maybe an explain of that query will gi

Re: [GENERAL] Sockets and posgtres

2006-09-27 Thread Tony Caduto
Jim Nasby wrote: If I'm understanding what you're trying to do (have a function connect to an external process?), I don't think anything exists right now. But it shouldn't be too hard to write something to do that. You might want to create a generic utility and put it on pgFoundry in case oth

Re: [GENERAL] postgress 8.1.4 deadlocking??

2006-09-27 Thread Casey Duncan
On Sep 27, 2006, at 7:28 AM, Rafal Pietrak wrote: Hi, I fell into the following problem (unfortunately, the database contents has sensitive customer information, so can publish very little of that). Currently postgress process takes close to 100% CPU time. I've restarted the process a mo

Re: [GENERAL] Strange query results with invalid multibyte

2006-09-27 Thread Joost Kraaijeveld
On Wed, 2006-09-27 at 12:10 -0400, Tom Lane wrote: > Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > > On Wed, 2006-09-27 at 11:00 -0400, Tom Lane wrote: > >> But have they got the same locale settings (lc_collate, lc_ctype)? > > > According to the postgresql.conf of the *working* database the l

Re: [GENERAL] Strange query results with invalid multibyte character

2006-09-27 Thread Tom Lane
Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > On Wed, 2006-09-27 at 11:00 -0400, Tom Lane wrote: >> But have they got the same locale settings (lc_collate, lc_ctype)? > According to the postgresql.conf of the *working* database the locales > are: > lc_messages = 'C' > lc_monetary = 'C' >

Re: [GENERAL] Strange query results with invalid multibyte

2006-09-27 Thread Joost Kraaijeveld
Hi Tom, On Wed, 2006-09-27 at 11:00 -0400, Tom Lane wrote: > "Joost Kraaijeveld" <[EMAIL PROTECTED]> writes: > > I have 2 database, both created with: > > CREATE DATABASE muntdev WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE > > = pg_default; > > But have they got the same locale settings (

Re: [GENERAL] File System Access:

2006-09-27 Thread Martijn van Oosterhout
On Wed, Sep 27, 2006 at 11:15:19AM -0400, Oisin Glynn wrote: > All, > > I have a need to create/copy/delete files on my server from a function > in PostreSql. I am running 8.x PostreSql on Windows 200x and my > functions etc are currently only in PL/pgSQL. Is there a way to create > files/copy

Re: [GENERAL] Fulltext index in postgres?

2006-09-27 Thread Hakan Kocaman
Title: Nachricht Hi,   try contrib/tsearch2 http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/   HTH     Hakan -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of HHDirecto.NetSent: Wednesday, September 27, 2006 4:56 PMTo: pgsql-genera

[GENERAL] File System Access:

2006-09-27 Thread Oisin Glynn
All, I have a need to create/copy/delete files on my server from a function in PostreSql. I am running 8.x PostreSql on Windows 200x and my functions etc are currently only in PL/pgSQL. Is there a way to create files/copy them and delete them from PL/pgSQL or could i call an external bat file

Re: [GENERAL] Strange query results with invalid multibyte character

2006-09-27 Thread Tom Lane
"Joost Kraaijeveld" <[EMAIL PROTECTED]> writes: > I have 2 database, both created with: > CREATE DATABASE muntdev WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = > pg_default; But have they got the same locale settings (lc_collate, lc_ctype)? regards, tom lane -

[GENERAL] Fulltext index in postgres?

2006-09-27 Thread HHDirecto . Net
I havet to develop an search engine over a postgres table. I know in mysql the fulltext index to do it more quicky than using like % ...There is any like t in postgres?Thanks

Re: [GENERAL] Sockets and posgtres

2006-09-27 Thread Jim Nasby
On Sep 26, 2006, at 3:25 PM, J S B wrote: Hi, I'm trying to make my database a client for an external unix based deamon process acting as a server. I was thinking of writing some clinet application in a shared object in the database (same as what we do with socket programing) that does oth

Re: [GENERAL] Strange query results with invalid multibyte

2006-09-27 Thread Gevik Babakhani
Hi Joost. (hoe gaat het ermee?) I would like to test this too. Could you please provide the data you are inserting into the database. Regards, Gevik On Wed, 2006-09-27 at 13:13 +0200, Joost Kraaijeveld wrote: > Hi, > > I have a strange problem. > > I have 2 database, both created with: > CRE

[GENERAL] postgress 8.1.4 deadlocking??

2006-09-27 Thread Rafal Pietrak
Hi, I fell into the following problem (unfortunately, the database contents has sensitive customer information, so can publish very little of that). Currently postgress process takes close to 100% CPU time. I've restarted the process a moment ago, and it was calm for a brief minute. It started

Re: [GENERAL] pl/pgsql NEW variable substitution

2006-09-27 Thread Jim Nasby
On Sep 27, 2006, at 6:16 AM, jef peeraer wrote: i want to check in a trigger if certain columns are not left empty. The columns i have to check are stored in another table. How do i do the following BEGIN SELECT INTO col_record * FROM modules WHERE type_module_id = NEW.type_module_id AND

Re: [GENERAL] Restart after power outage: createdb

2006-09-27 Thread Jim Nasby
On Sep 27, 2006, at 6:24 AM, Jon Lapham wrote: Jim Nasby wrote: [EMAIL PROTECTED] ~]$ psql bar psql: FATAL: database "bar" does not exist [EMAIL PROTECTED] ~]$ createdb bar createdb: database creation failed: ERROR: could not create directory "base/65536": File exists [EMAIL PROTECTED] ~]$ c

Re: [GENERAL] Documenting stored procedures and functions

2006-09-27 Thread Jim Nasby
On Sep 26, 2006, at 11:14 PM, Jorge Godoy wrote: I dunno if this is the best list to ask about it, but it sounded "general" enough to me :-) Sorry if I'm on the wrong place. I'd like to know how you're documenting your functions and stored procedures, including their usage, input and outpu

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Martijn van Oosterhout
On Wed, Sep 27, 2006 at 02:39:13PM +0300, Peter wrote: > COPY wont work... my list of columns for insert is also dynamically > built and will never cover all fields in table. You don't have to include all columns for copy, just the fields you copy into, the rest should get the default. COPY tabl

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Michael Glaesemann
On Sep 27, 2006, at 20:39 , Peter wrote: Using COPY avoids this issue ofcourse, because there's a direct link to the table. Similarly, as of 8.2 it will be possible to do: INSERT INTO table (blah) VALUES (x,y,a),(f,d,g),(s,f,g), etc... Which will also avoid the issue. COPY wont work... my

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Peter
Typecast eliminates the issue, you're right on that as well. However, my problem is that those statements are dynamically generated on various tables/columns, so typecasting would mean extracting target field type and translating fieldtype code into SQL typename. Rather messy.

Re: [GENERAL] Transaction is read-only in auto commit mode

2006-09-27 Thread Asok Chattopadhyay
Thanks Jim. I dowloaded the latest version of the JDBC drivers and installed them on the affected sites. So far, there were no error reported in the last12 hours. Hope it works!   Thanks again.   AsokJim Nasby <[EMAIL PROTECTED]> wrote: On Sep 26, 2006, at 3:26 PM, Asok Chattopadhyay wrote:> M

[GENERAL] Strange query results with invalid multibyte character

2006-09-27 Thread Joost Kraaijeveld
Hi, I have a strange problem. I have 2 database, both created with: CREATE DATABASE muntdev WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default; Running the queries below on the first database is OK and do what I expect. If I create a backup of the first datase and restore that b

reply-to address broken (Was: Re: [GENERAL] postgresql ddl scripts - drop object fails entire script)

2006-09-27 Thread Alban Hertroys
[EMAIL PROTECTED] wrote: On the one hand I like how the schema scripts fail when there is a single problem with a DDL statement. Your mail address bounces. Unfortunately my Trash is broken, so I can't show you the error; I was a bit quick deleting it. -- Alban Hertroys [EMAIL PROTECTED] mag

[GENERAL] pl/pgsql NEW variable substitution

2006-09-27 Thread jef peeraer
i want to check in a trigger if certain columns are not left empty. The columns i have to check are stored in another table. How do i do the following BEGIN SELECT INTO col_record * FROM modules WHERE type_module_id = NEW.type_module_id AND is_afsluit_kolom; IF NOT FOUND THEN RAISE

Re: [GENERAL] postgresql ddl scripts - drop object fails entire script

2006-09-27 Thread Alban Hertroys
[EMAIL PROTECTED] wrote: On the one hand I like how the schema scripts fail when there is a single problem with a DDL statement. On the other hand sometimes it is a pain - especially to take out all the 'drop sequence', 'drop table' etc commands when creating a new database. Until 8.2 is avail

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Martijn van Oosterhout
On Wed, Sep 27, 2006 at 01:05:56PM +0300, Peter wrote: > Typecast eliminates the issue, you're right on that as well. However, my > problem is that those statements are dynamically generated on various > tables/columns, so typecasting would mean extracting target field type > and translating fie

Re: [GENERAL] Restart after power outage: createdb

2006-09-27 Thread Jon Lapham
Jim Nasby wrote: [EMAIL PROTECTED] ~]$ psql bar psql: FATAL: database "bar" does not exist [EMAIL PROTECTED] ~]$ createdb bar createdb: database creation failed: ERROR: could not create directory "base/65536": File exists [EMAIL PROTECTED] ~]$ createdb bar Could this be a timing issue? IE: a

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Peter
Martijn van Oosterhout wrote: On Wed, Sep 27, 2006 at 12:14:44PM +0300, Peter wrote: create table temp(a timestamptz); insert into temp(a) select NULL; /* this passes */ insert into temp(a) select NULL union select NULL; /* fails: ERROR: column "a" is of type timestamp with time

Re: [GENERAL] Insert/select union bug

2006-09-27 Thread Martijn van Oosterhout
On Wed, Sep 27, 2006 at 12:14:44PM +0300, Peter wrote: > create table temp(a timestamptz); > > insert into temp(a) select NULL; /* this passes */ > > insert into temp(a) select NULL union select NULL; /* fails: > ERROR: column "a" is of type timestamp with time zone but expression is > of type t

[GENERAL] Insert/select union bug

2006-09-27 Thread Peter
create table temp(a timestamptz); insert into temp(a) select NULL; /* this passes */ insert into temp(a) select NULL union select NULL; /* fails: ERROR: column "a" is of type timestamp with time zone but expression is of type text */ I need to insert hundreds of thousands of rows, and insert