[GENERAL] Stored procedures..PLEASE HELP

2006-01-17 Thread Minal A. Aryamane
hello all, I desparately need help in developing stored procedure using postgresql 8.0. I am using pgadmin for developing the stored procs. Can anyone please help me, The docs are really not helpful. am trying to pass values through a jsp page wherein I am accessing this stored procedures

Re: [GENERAL] Stored procedures..PLEASE HELP

2006-01-17 Thread Richard Huxton
Minal A. Aryamane wrote: hello all, I desparately need help in developing stored procedure using postgresql 8.0. I am using pgadmin for developing the stored procs. Can anyone please help me, The docs are really not helpful. am trying to pass values through a jsp page wherein I am accessing

Re: [GENERAL] Create/Erase 5000 Tables in PostGRE SQL in execution

2006-01-17 Thread Sergey Moiseev
Christopher Browne wrote: Orlando Giovanny Solarte Delgado wrote: It is a system web and each user can to do out near 50 consultations for session. I can have simultaneously around 100 users. Therefore I can have 5000 consultations simultaneously. Each consultation goes join to a space

[GENERAL] Is there a way to list runaway queries and kill them?

2006-01-17 Thread frank church
Is there a way to list runaway or long runninng queries and kill them? Frank This message was sent using IMP, the Internet Messaging Program. ---(end of broadcast)--- TIP 3: Have

[GENERAL] linking temporary tables from MS Access?

2006-01-17 Thread Zlatko Matić
Is it possible to use temporary tables from MS Access, as linked tables? I was not able to link, but maybe someone succeeded?

[GENERAL] general questions about joins in queries

2006-01-17 Thread Zlatko Matić
Hello. Is it better to use A) or B) ? A) SELECT"public"."departments".*,"public"."plants".*,"public"."batches_microbs".*,"public"."results_microbs".*FROM"public"."departments","public"."plants","public"."batches_microbs","public"."results_microbs"WHERE"plants"."department" =

Re: [GENERAL] general questions about joins in queries

2006-01-17 Thread Viktor Lacina
Hi, it's the same , try EXPLAIN query if you are not sure. Viktor Dne pondělí 16 ledna 2006 18:01 Zlatko Matić napsal(a): Hello. Is it better to use A) or B) ? A) SELECT public.departments.*, public.plants.*, public.batches_microbs.*, public.results_microbs.* FROM

[GENERAL] A tale of two similar databases

2006-01-17 Thread kishore . sainath
Hi All, I am using PostgreSQL 7.3.2 on a server running Red Hat Linux 9.0. I have two databases ( identical schema and similar data ). One database, D1 contains the actual data of a Production Application. The other D2 contains dummy data which is used during development and testing of the

Re: [GENERAL] Stored procedures..PLEASE HELP

2006-01-17 Thread Alagu Madhu
Hello, I am alagu madhu working as a Developer (postgresql).pls,send your table design. Minal A. Aryamane wrote: hello all, I desparately need help in developing stored procedure using postgresql 8.0. I am using pgadmin for developing the stored procs. Can anyone please help

Re: [GENERAL] A tale of two similar databases

2006-01-17 Thread Michael Glaesemann
On Jan 17, 2006, at 18:22 , [EMAIL PROTECTED] wrote: I am using PostgreSQL 7.3.2 on a server running Red Hat Linux 9.0. I'd highly recommend upgrading. The current release is 8.1.2. If you can't upgrade to 8.1, at least upgrade to the latest point release of 7.3, which is 7.3.13. There

Re: [GENERAL] A tale of two similar databases

2006-01-17 Thread Harry Jackson
On 17 Jan 2006 01:22:20 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, I am using PostgreSQL 7.3.2 on a server running Red Hat Linux 9.0. I have two databases ( identical schema and similar data ). One database, D1 contains the actual data of a Production Application. The other

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Marcin
On Mon, Jan 16, 2006 at 05:09:18PM -0500, Qingqing Zhou wrote: AFAICS the difference maybe related to this between 8.0 and 8.1 is the introduction of autovacuum. But seems you didn't turn it on. Do you observed only writes increased or both read/write? If the latter, that might be an

Re: [GENERAL] REFERENCES and UNIQUE

2006-01-17 Thread Michelle Konzack
Am 2006-01-04 12:08:30, schrieb Stephan Szabo: On Wed, 4 Jan 2006, Michelle Konzack wrote: | CREATE TABLE countries ( | serno int NOT NULL UNIQUE, | isocode varchar(2) NOT NULL UNIQUE, | EN textNOT NULL, | DE

Re: [GENERAL] Data loading from a flat file...

2006-01-17 Thread Michelle Konzack
Am 2006-01-05 23:04:16, schrieb Angshu Kar: Also, my data file is showing some ^M chars like B1^M C1^M E1 B2^M C2^M E2 If those ^M are coming from your data file, then you should use dos2unix filename and the problem is gone Greetings Michelle Konzack

[GENERAL] tablespace and pg_dump

2006-01-17 Thread Michelle Konzack
Hello, I have on my Server around 5000 $USER and each has its own database which is automaticly created id I add a new $USER with adduser. The Server has three 2 channel RAID-Controller and it is splitted into 6 Raid-5 (each 13+2 HDD of 76 GByte) Now $USER are on different Raid-5 sets and in

Re: [GENERAL] Strange error while executing query from front end:

2006-01-17 Thread Andrew Sullivan
On Mon, Jan 16, 2006 at 09:27:30AM +0530, Mavinakuli, Prasanna (STSD) wrote: Hi, I am getting following strange errors while executing queries. 1) ERROR: xlog flush request 0/108EA5F8 is not satisfied --- flushed only to 0/1813C60 If I had to guess, I'd say you're having a hard disk

[GENERAL] full text search

2006-01-17 Thread Martin Krallinger
Hi all, I am not a Postgres expert, and thus would like to ask you a question related to full text search (and indexing). I actually would like to search a table of over 10gb of free text. I am not quite sure which would be the best (fastest) way to do it. I was trying out tsearch-v2 but it

Re: [GENERAL] full text search

2006-01-17 Thread Oleg Bartunov
You may try tsearchd http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch2 Oleg On Tue, 17 Jan 2006, Martin Krallinger wrote: Hi all, I am not a Postgres expert, and thus would like to ask you a question related to full text search (and indexing). I actually would like to

Re: [GENERAL] linking temporary tables from MS Access?

2006-01-17 Thread Tony Caduto
Zlatko Matić wrote: Is it possible to use temporary tables from MS Access, as linked tables? I was not able to link, but maybe someone succeeded? It should work if you can do it all in the context of a single connection, but if it does not, just roll your own temp table, create one on the

[GENERAL] About Full-text searching under postgresql

2006-01-17 Thread Emi Lu
Hi, Could someone suggest some links/online docs about how postgreSQL supporting full-text searching please? Thanks a lot, Emi ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] About Full-text searching under postgresql

2006-01-17 Thread Larry Rosenman
Emi Lu wrote: Hi, Could someone suggest some links/online docs about how postgreSQL supporting full-text searching please? Thanks a lot, Emi For information about tsearch2 see http://www.devx.com/opensource/Article/21674 or http://www.devx.com/opensource/Article/21674/0/page/3 or

Re: [GENERAL] A tale of two similar databases

2006-01-17 Thread James Robinson
Have you vacuum'd and/or analyzed D2? http://www.postgresql.org/docs/8.1/static/maintenance.html http://www.postgresql.org/docs/8.1/static/sql-analyze.html James Robinson Socialserve.com ---(end of broadcast)--- TIP 3: Have

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Tom Lane
Marcin [EMAIL PROTECTED] writes: It seems that some changes to stats collector introduced in 8.1 are now eating my CPU power, and probably also the (I)/O bandwidth. :( Yeah, something wrong there :-(. What did you say your platform was exactly? Would you strace the collector process, and send

Re: [GENERAL] Strange error while executing query from front end:

2006-01-17 Thread Tom Lane
Andrew Sullivan [EMAIL PROTECTED] writes: On Mon, Jan 16, 2006 at 09:27:30AM +0530, Mavinakuli, Prasanna (STSD) wrote: ERROR: xlog flush request 0/108EA5F8 is not satisfied --- flushed only to 0/1813C60 If I had to guess, I'd say you're having a hard disk failure of some kind. In

[GENERAL] LIMIT + OFFSET

2006-01-17 Thread MG
Hello, I want to show an overview where you can place 16 data sets. I use the sql-statement SELECTF1,F2 FROM testtable limit 16 offset 0 To show different pages I vary the value for offset. But if I want to stay on a special data set, I have the problem to find the right value for offset.

Re: [GENERAL] LIMIT + OFFSET

2006-01-17 Thread A. Kretschmer
am 17.01.2006, um 16:43:36 +0100 mailte MG folgendes: Hello, I want to show an overview where you can place 16 data sets. I use the sql-statement SELECT F1,F2 FROM testtable limit 16 offset 0 To show different pages I vary the value for offset. But if I want to stay on a special data

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread Chris Browne
[EMAIL PROTECTED] (Jim C. Nasby) writes: On Mon, Jan 16, 2006 at 12:13:15PM -0500, Chris Browne wrote: What you seem to be after, here, would confine your telno formatting to telephone numbers for Canada and the United States, and would break any time people have a need to express telephone

Re: [GENERAL] Is there a way to list runaway queries and kill them?

2006-01-17 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 09:38:37AM +, frank church wrote: Is there a way to list runaway or long runninng queries and kill them? With the proper statistics collector settings you can see queries with the pg_stat_activity view. You can automatically kill long-lasting queries by setting the

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread David Fetter
On Tue, Jan 17, 2006 at 10:28:03AM -0600, Tony Caduto wrote: As long as we are talking wish lists... What I would like to see is some way to change the ordering of the fields without having to drop and recreate the table. Why are you asking us to optimize the 'SELECT *' case which almost

[GENERAL] Distance calculation

2006-01-17 Thread sunithab
Hi I have a latiude and longitude for a city and latitude, longitude foreach hotel in hotels table. I have to reitreive 20 hotels nearby to that city in 25 miles. The below is the query I am using to check the distance. But the query is slow because of distance calulation on fly and order

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Qingqing Zhou
On Tue, 17 Jan 2006, Marcin wrote: Playing with postgresql.conf I changed stats_command_string to off, reloaded config, and restarted connection from applications (the postgresql wasn't restarted). The write rate immediately drops down, and is now at 8000-9000 blocks per second (which is

Re: [GENERAL] Distance calculation

2006-01-17 Thread John Sidney-Woollett
I'm no expert on this but can't you limit the points to checking any hotel whose lat is +- 25km north/south of your city, AND whose longitude is also +- 25km of your city. It's crude but will probably eliminate lots of points you should never be checking... If you could index an approx lat

Re: [GENERAL] Distance calculation

2006-01-17 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 10:00:22AM -0800, [EMAIL PROTECTED] wrote: I have a latiude and longitude for a city and latitude, longitude foreach hotel in hotels table. I have to reitreive 20 hotels nearby to that city in 25 miles. The below is the query I am using to check the distance. But

[GENERAL] Change owner of all database objects

2006-01-17 Thread Andrus
Currently all my database objects are owned by superuser postgres . I need to change owner to a nonprivileged role for all objects in a database. I'm using Postgres 8.1 server and client in Windows XP, only plpSQL language installed in server. I'm thinking about the following possibilities:

Re: [GENERAL] Huge number of disk writes after migration to 8.1

2006-01-17 Thread Marcin
Qingqing Zhou wrote: A similar problem was reported before: http://archives.postgresql.org/pgsql-admin/2005-12/msg00266.php But we conclude that's not related to pgstats. See if that's related to your situation. Unfortunately, I don't think so. The 8.0.3 run just fine. And I don't

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread Jaime Casanova
8. The ability to use procedural-language extensions everywhere, not just in functions. Like where? Give an example. // PHP rows = pg_query('IF ... THEN ... ENDIF;'); // PHP rows = pg_query('SELECT CASE WHEN ... ELSE ... END;'); -- Atentamente, Jaime Casanova (DBA: DataBase

[GENERAL] Rule problem: return value of insert

2006-01-17 Thread Stephen Friedrich
Sorry a little long explanation, and probably an advanced problem. Any help would be much appreciated all the more!! I am trying to implement table partitioning (postgres 8.1.2). Basically I am dealing with Call Detail Records (cdrs) (telecom invoices) where each one contains possibly millions

[GENERAL] mac os x compile failure

2006-01-17 Thread Neil Brandt
I'm trying to compile postgres 8.1.2 on OS X 10.2.8. Unfortunately I'm not much of a compile-your-own guy, and I've hit a compile error that's beyond my improvisation abilities, and gets no google hits either. I realize this also an OS X expert thing: I'm also seeking help on one of the

Re: [GENERAL] mac os x compile failure

2006-01-17 Thread Joshua D. Drake
Neil Brandt wrote: I'm trying to compile postgres 8.1.2 on OS X 10.2.8. Unfortunately I'm not much of a compile-your-own guy, and I've hit a compile error that's beyond my improvisation abilities, and gets no google hits either. Make your life easy. Use Darwin ports:

Re: [GENERAL] mac os x compile failure

2006-01-17 Thread Tom Lane
Neil Brandt [EMAIL PROTECTED] writes: fd.c: In function `pg_fsync_writethrough': fd.c:271: `F_FULLFSYNC' undeclared (first use in this function) fd.c:271: (Each undeclared identifier is reported only once fd.c:271: for each function it appears in.) Hmm. This is our bug: the code mistakenly

Re: [GENERAL] Rule problem: return value of insert

2006-01-17 Thread Tom Lane
Stephen Friedrich [EMAIL PROTECTED] writes: In fact I have found some related mails in the archive, but I really do not understand why '0' is returned. The documentation (34.5. Rules and Command Status) says if I replace an INSERT with another INSERT the value returned should be from the new

Re: [GENERAL] Rule problem: return value of insert

2006-01-17 Thread Stephen Friedrich
Thanks for the quick answer - even though it does not solve my problem :-( Tom Lane wrote: Not when you're using a pile of conditional rules like that. The last one to fire determines the result, so you'll only see a nonzero count when inserting into the last subtable. Hm, it fails even if

Re: [GENERAL] Distance calculation

2006-01-17 Thread Tino Wildenhain
[EMAIL PROTECTED] schrieb: Hi I have a latiude and longitude for a city and latitude, longitude foreach hotel in hotels table. I have to reitreive 20 hotels nearby to that city in 25 miles. The below is the query I am using to check the distance. But the query is slow because of

[GENERAL] prepared statement results don't clear?

2006-01-17 Thread David Rysdam
I have a Tcl function that does this: 1) create prepared statement for binary insertion via pg_exec (and releases the result handle) 2) run statement with binary data via pg_exec_prepared (and releases the result handle) 3) deallocate statement via pg_exec (and releases the result handle)

Re: [GENERAL] Rule problem: return value of insert

2006-01-17 Thread Tom Lane
Stephen Friedrich [EMAIL PROTECTED] writes: Or do you mean that the last rule that gets evaluated will determine the result, even if it's where clause evaluates to false? Right. In effect, the last one in alphabetical order will always determine the result, whether it's the one that does the

[GENERAL] pg_dump throws no buffer space available error

2006-01-17 Thread Vishal Dixit
I can only reproduce this error on windows 2000, on all other operating systems it works fine. Sometimes I see No buffer space available error, other times I see Socket not open error. In the database, besides other tables we have one table that contains bytea type columns, we see the above error

[GENERAL] Windows re-installation problem

2006-01-17 Thread Rob Brenart
I uninstalled PostgreSQL from windows for the sake of re-installing (for the sake of documenting an install for our product on a clean machine), and now during re-install on the Service Configuration screen I get Invalid username specified: Logon failure: unknown user name or bad password.

[GENERAL] Text field performance

2006-01-17 Thread Glen Parker
We are having some performance issues we think may be related to large text field values, and many records. So, a couple questions... 1) Are text values always stored in the companion text file, or only if they exceed a certain size? What size? 2) When the query executer reads tuples

Re: [GENERAL] Text field performance

2006-01-17 Thread Tom Lane
Glen Parker [EMAIL PROTECTED] writes: We are having some performance issues we think may be related to large text field values, and many records. So, a couple questions... See http://www.postgresql.org/docs/8.1/static/storage-toast.html regards, tom lane

[GENERAL] Modify the password of the service account?

2006-01-17 Thread Joeseph Blowseph
Hi, I'd like to be able to modify the auto-generated password of the service account created during installation. I'm running XP Home which limits access to some of the snap-ins available on XP Pro. I've not been able to work out how to make the change. Any suggestions would be very welcome.

Re: [GENERAL] Text field performance

2006-01-17 Thread Glen Parker
We're still on 7.4 (sorry, probly should have mentioned that). Does that documentation apply to the 7.4 series as well? Maybe an easier question is, can we expect a TOAST performance increase when upgrading to 8.1? Thx again... -Glen Tom Lane wrote: Glen Parker [EMAIL PROTECTED] writes:

Re: [GENERAL] Text field performance

2006-01-17 Thread Neil Conway
On Tue, 2006-01-17 at 15:01 -0800, Glen Parker wrote: We're still on 7.4 (sorry, probly should have mentioned that). Does that documentation apply to the 7.4 series as well? AFAIK, there haven't been any major changes to TOAST since 7.4, so most of that documentation should be applicable.

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread Jim C. Nasby
On Tue, Jan 17, 2006 at 11:35:05AM -0500, Chris Browne wrote: Note: I spent most of yesterday dealing with this very issue, writing up a total of 31 eye-destroying regular expressions to generate a pl/tcl function to parse cases that I had handy... I daresay that even with so many

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread Chris Browne
[EMAIL PROTECTED] (Jim C. Nasby) writes: On Tue, Jan 17, 2006 at 11:35:05AM -0500, Chris Browne wrote: Note: I spent most of yesterday dealing with this very issue, writing up a total of 31 eye-destroying regular expressions to generate a pl/tcl function to parse cases that I had

Re: [GENERAL] mac os x compile failure

2006-01-17 Thread Michael Glaesemann
On Jan 18, 2006, at 4:56 , Tom Lane wrote: I'll try to see that this gets fixed for PG 8.1.3, but in the short run you might be best off to update your OS X installation, or revert to PG 8.0.* which doesn't try to use FULLFSYNC at all. Thanks for working on this, Tom. I've got a Mac OS X

Re: [GENERAL] prepared statement results don't clear?

2006-01-17 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 03:37:14PM -0500, David Rysdam wrote: I have a Tcl function that does this: 1) create prepared statement for binary insertion via pg_exec (and releases the result handle) 2) run statement with binary data via pg_exec_prepared (and releases the result handle) 3)

[GENERAL] SELECT Rules or stored procedure

2006-01-17 Thread Assad Jarrahian
I have a query that takes two tables (join) and does something on it. Lets say these tables are A and B. What I need is that everytime one of the tables (A) has its rows selected, I want to update the count (which is a column in A) for that row. I am not sure what is the best way to do this. 1)I

Re: [GENERAL] PostgreSQL Top 10 Wishlist

2006-01-17 Thread Joost Kraaijeveld
On Tue, 2006-01-17 at 09:52 -0800, David Fetter wrote: On Tue, Jan 17, 2006 at 10:28:03AM -0600, Tony Caduto wrote: As long as we are talking wish lists... What I would like to see is some way to change the ordering of the fields without having to drop and recreate the table. Why are