[GENERAL] Get the exeption error description

2007-05-23 Thread Paolo Saudin
Hi, Is there a way to know the error description / message in a BEGIN END block in a plpgsql functioin as in the 'Appendix A. PostgreSQL Error Codes' ? I would like to pass it back to the function caller DECLARE the_error varchar; BEGIN .. ... ...

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Marek Lewczuk
Dave Page pisze: Joshua D. Drake wrote: Now this I agree with. I am sure postgresql hackers are happy to help the pljava team get things where they need to be, but -hackers needs to be focusing on releasing 8.3. pl/java is actually one of the problems that pgInstaller is currently facing. In a

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Marek Lewczuk
Guy Rouillier pisze: Nothing productive will come of a language debate; let's just say there are things you can do with a complete programming language at your disposal that you can't do with PL/pgsql. I use Java in the database, Exactly - sometimes we need to write something more complicated

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Richard Huxton
Purusothaman A wrote: Richard Huxton, Thanks for your detailed reply. I am maintaining various database of same kind in postgresql. Here I have shown various corrupted last line of output of select * from pg_largeobject where oid = xx; in 5 databases. I have used '\o e:\\filename.xml' befo

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Purusothaman A
Richard Huxton, Thanks for your detailed reply. I am maintaining various database of same kind in postgresql. Here I have shown various corrupted last line of output of select * from pg_largeobject where oid = xx; in 5 databases. I have used '\o e:\\filename.xml' before executing query and

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Tom Lane
Ron Johnson <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] ("Harpreet Dhaliwal") writes: >>> I was just wondering if Vacuum Db in postgresql is somehow superior >>> to the ones that we have in other RDBMS. > So it's not "near-zero cost", it's "deferred cost". Exactly. VACUUM sucks (ahem) in al

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Tom Lane
Dave Page <[EMAIL PROTECTED]> writes: > I'm not going to comment on who's fault it is, but the OP quoted 100 > updates and 600 selects per *second*. I can't imagine Flickr or Slashdot > (which is heavily csched for reading) are under anything like that sort > of constant load. I'm pretty sure I re

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/07 18:54, [EMAIL PROTECTED] wrote: > Would I be right in thinking that, in general, a column to hold > timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' > and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? > > To put i

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/07 20:29, Tom Allison wrote: [snip] > Bottom line, if the DBA or anyone says we can't support RI or UNIQUE > because of the performance overhead... I would be inclined to look for > another DBA. > But I have to admit. I am extremely opiniona

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Dave Page
Alexander Staubo wrote: > On 5/23/07, PFC <[EMAIL PROTECTED]> wrote: >> +---+---+--+-+ >> | Table | Op| Msg_type | Msg_text| >> +---+---+--+-+ >> | for

[GENERAL] Timestamp with time zone: why not?

2007-05-23 Thread km
Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? To put it another way, for what reasons might the 'TIMESTAMP' type be preferred to 'TIMESTAMP WITH TIME ZONE

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Dave Page
Joshua D. Drake wrote: > Now this I agree with. I am sure postgresql hackers are happy to help > the pljava team get things where they need to be, but -hackers needs to > be focusing on releasing 8.3. pl/java is actually one of the problems that pgInstaller is currently facing. In a nutshell, if w

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Guy Rouillier
Joshua D. Drake wrote: We have limited time; taking time from other things to spend on pljava is quite likely not to be a wonderful idea. It requires that people whose expertise *isn't* Java spend a lot of time learning Java details. Now this I agree with. I am sure postgresql hackers are happ

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread Chuck D.
On Wednesday 23 May 2007 18:59, you wrote: > > I don't believe this is good design. You'll have to have a trigger or > something to verify that the country_id+state_id on the city table are > exactly equal to the country_id+state_id on the state table. If you > don't, you might have something li

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread Chuck D.
On Wednesday 23 May 2007 17:56, you wrote: > seems hard to enforce integrity in your model. how are you going to > ensure that the user's city-state-country combo a valid one? (well, you > can, but it is a pain). ask yourself: can a city be in more than one > country? probably not (even if the name

Re: [GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Francisco Reyes
Joris Dobbelsteen writes: Try this: SELECT distinct export_messages.export_id as id, exports.export_id as exports_export_id FROM export_messages LEFT OUTER JOIN exports ON (export_messages.export_id = exports.export_id) WHERE exports.export_id IS NOT NULL; In my case I needed "IS NULL" Y

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
never mind. first query after a restart is slow... On May 23, 2007, at 10:14 PM, Tom Allison wrote: I noticed that the option for 'E' is not enabled in 8.2 by default ( standard_conforming_strings (boolean) ). I turned this on and the SQL statements went from 0.5 sec to 3.8 sec each. Is

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
I noticed that the option for 'E' is not enabled in 8.2 by default ( standard_conforming_strings (boolean) ). I turned this on and the SQL statements went from 0.5 sec to 3.8 sec each. Is this expected? On May 23, 2007, at 8:00 PM, [EMAIL PROTECTED] wrote: Hi, If you have a statement us

Re: [GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Francisco Reyes
Joris Dobbelsteen writes: Did you really check your list thoroughly. SELECT distinct export_messages.export_id as id FROM export_messages LEFT OUTER JOIN exports ON (export_messages.export_id = exports.export_id); Take any value from "SELECT export_id FROM exports" Does it not exist in you

Re: [GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
The " is definitely not the error -- it's a CGI thing. I think this might tie back to another email I posted where I'm trying to escape all these characters programmatically instead of passing them in as '?' and letting perl to the parsing for me. On May 23, 2007, at 8:00 PM, [EMAIL PROTEC

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Tom Allison
On May 23, 2007, at 12:54 PM, Scott Ribe wrote: "*Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level." Pure, utter, unad

[GENERAL] bytea & perl

2007-05-23 Thread Tom Allison
I've been running into problems with some characters that I believe can be solved using bytea variable type instead of varchar() I'm picking up data from email and trying to put it into a table. I'm trying to "merge" two different types of SQL and I'm really not sure how this can be done...

Re: [GENERAL] Searching data across tables, some large

2007-05-23 Thread Robert Fitzpatrick
On Wed, 2007-05-23 at 19:48 -0400, Robert Fitzpatrick wrote: > On Wed, 2007-05-23 at 18:53 -0400, Ericson Smith wrote: > > Yeah, we've used Tsearch with joins and searches on other fields on > > the tsearch table no problem. Tsearches are just another part of a > > WHERE clause. > > > > And can

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread Jorge Godoy
"Chuck D." <[EMAIL PROTECTED]> writes: > 1) The first is this. I have 3 tables. Country, state and city. Country > has > a country_id to identify a country, state has a state_id and country_id to > identify a state, and city has a city_id, state_id and country_id (for easy > reference) to i

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/07 19:17, Chris Browne wrote: > [EMAIL PROTECTED] ("Harpreet Dhaliwal") writes: >> I was just wondering if Vacuum Db in postgresql is somehow superior >> to the ones that we have in other RDBMS. > > The thing that is more akin to VACUUM, in O

Re: [GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Joris Dobbelsteen
>-Original Message- >From: Francisco Reyes [mailto:[EMAIL PROTECTED] >Sent: donderdag 24 mei 2007 2:04 >To: Joris Dobbelsteen >Cc: PostgreSQL general >Subject: Re: [GENERAL] Delete with subquery deleting all records > >Joris Dobbelsteen writes: > >> Hint: LEFT JOIN is your mistake... > >Th

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Chris Browne
[EMAIL PROTECTED] ("Harpreet Dhaliwal") writes: > I was just wondering if Vacuum Db in postgresql is somehow superior > to the ones that we have in other RDBMS. The thing that is more akin to VACUUM, in Oracle's case, is the rollback segment. In Oracle, Rollback segments are areas in your databas

Re: [GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Francisco Reyes
Joris Dobbelsteen writes: Hint: LEFT JOIN is your mistake... The use of left join in general.. or my left join? When I do the left join by itself I verified manually and it had the data I wanted. Thought: are you sure you are going to delete those rows? In there cases human verification is

Re: [GENERAL] What does this error mean?

2007-05-23 Thread SCassidy
Hi, If you have a statement using placeholders like: select id from info where device_type = ? and drive_mfg = ? and then prepare and execute it, something like: $sth=$dbh->prepare($stmt) || errexit("bad prepare for stmt $stmt, error: $DBI::errstr"); $rc=$sth->execute('TYPE1

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread George Pavlov
seems hard to enforce integrity in your model. how are you going to ensure that the user's city-state-country combo a valid one? (well, you can, but it is a pain). ask yourself: can a city be in more than one country? probably not (even if the name is the same it is not the same city!). can a state

Re: [GENERAL] Searching data across tables, some large

2007-05-23 Thread Robert Fitzpatrick
On Wed, 2007-05-23 at 18:53 -0400, Ericson Smith wrote: > Yeah, we've used Tsearch with joins and searches on other fields on > the tsearch table no problem. Tsearches are just another part of a > WHERE clause. > And can there be Tsearch fields built based on fields in different tables? Where ca

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Harpreet Dhaliwal
I was just wondering if Vacuum Db in postgresql is somehow superior to the ones that we have in other RDBMS. On 5/23/07, Alexander Staubo <[EMAIL PROTECTED]> wrote: On 5/23/07, Dann Corbit <[EMAIL PROTECTED]> wrote: > In SQL*Server it is called "UPDATE STATISTICS" > > http://msdn2.microsoft.com

Re: [GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Joris Dobbelsteen
Hint: LEFT JOIN is your mistake... Thought: are you sure you are going to delete those rows? In there cases human verification is usually the way to go, though it takes a lot of time. Read on... >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >Franc

[GENERAL] Geographic data sources, queries and questions

2007-05-23 Thread Chuck D.
Greetings all, I have a couple issues regarding geographic names databases. 1) The first is this. I have 3 tables. Country, state and city. Country has a country_id to identify a country, state has a state_id and country_id to identify a state, and city has a city_id, state_id and country_id

[GENERAL] Delete with subquery deleting all records

2007-05-23 Thread Francisco Reyes
I have two tables exports export_messages They were done without a foreign key and I am trying to clean the data to put a constraint. For every record in exports_messages there is supposed to be a matching record in exports with a export_id (ie export_id is the foreign key for export_message

[GENERAL] What does this error mean?

2007-05-23 Thread Tom Allison
Cannot mix placeholder styles ":foo" and "$1" at / sw/lib/perl5/5.8.6/darwin-thread-multi-2level//DBD/Pg.pm line 174. I keep finding it from time to time on one script I have and I have no clue what it's telling me. ---(end of broadcast)--- TI

Re: [GENERAL] Searching data across tables, some large

2007-05-23 Thread Ericson Smith
Yeah, we've used Tsearch with joins and searches on other fields on the tsearch table no problem. Tsearches are just another part of a WHERE clause. Regards - Ericson Smith Developer http://www.funadvice.com On 5/23/07, Robert Fitzpatrick <[EMAIL PROTECTED]> wrote: Thanks to Richard for the he

[GENERAL] Searching data across tables, some large

2007-05-23 Thread Robert Fitzpatrick
Thanks to Richard for the help earlier this week with performance questions, once I was able to get pgsql and mssql using the same resources and doing some tuning, I was able to get comparable results. The issue still though, I have this view that I designed with the thought in mind to provide all

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Thomas Kellerer
Marek Lewczuk wrote on 23.05.2007 21:37: I would like to know your opinion about pljava and its future I have never used Java-in-the-database with any of the DBMS I have used and I have never understood the reasoning behind it. My personal opinion is, that it's not needed. Most of the time th

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread PFC
What version of that pathetic RDBMS is this? MySQL 5.0.40, on gentoo Linux, Core 2 Duo. The table in question takes about 100 inserts/deletes and 600 selects per second. MyISAM isn't able to finish the benchmark. Actually, I have to run REPAIR TABLE every 20 minutes, since it c

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Alexander Staubo
On 5/23/07, PFC <[EMAIL PROTECTED]> wrote: +---+---+--+-+ | Table | Op| Msg_type | Msg_text| +---+---+--+-+ | forum_bench.posts | check | warning |

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/07 12:48, PFC wrote: > >> Some big sites do of course juggle performance vs in-database run-time >> checks, but the statements as typically presented by MySQL partisans, > > Live from the front : > > This freshly created database ha

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Alexander Staubo
On 5/23/07, Dann Corbit <[EMAIL PROTECTED]> wrote: In SQL*Server it is called "UPDATE STATISTICS" http://msdn2.microsoft.com/en-us/library/ms187348.aspx No -- MS SQL Server's "update statistics" is the equivalent of "analyze", not "vacuum." Alexander. ---(end of broad

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Joshua D. Drake
Chris Browne wrote: [EMAIL PROTECTED] (Marek Lewczuk) writes: At this point in time, a much more important feature of PostgreSQL would be for version 8.3 to be released. That process is running into *some* problems vis-a-vis the review process. The last that I heard, it was somewhat indeterm

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Dann Corbit
In SQL*Server it is called "UPDATE STATISTICS" http://msdn2.microsoft.com/en-us/library/ms187348.aspx Oracle tuning is a lot more fiddly: http://searchoracle.techtarget.com/originalContent/0,289142,sid41_gci121 3646,00.html From: [EMAIL PROTECTED] [mai

Re: [GENERAL] the future of pljava development

2007-05-23 Thread Chris Browne
[EMAIL PROTECTED] (Marek Lewczuk) writes: > Hello everyone, > I would like to start very important (from my point of view) topic - > the future of pljava in PostgreSQL development. Thomas Hallgren > (creator of pljava) has made a great job setting up the project, but > there are many things to do (

Re: [GENERAL] Database Security

2007-05-23 Thread Raymond O'Donnell
On 23/05/2007 21:31, Danilo Freitas da Costa wrote: How can I configure access level to a database? How can I force every user type your password to access the database? http://www.postgresql.org/docs/8.2/static/client-authentication.html Ray.

[GENERAL] Database Security

2007-05-23 Thread Danilo Freitas da Costa
Hi all!!! I'm using Postgres at company I work for few time. I already tried many ways to create a security for my database but not sucessfull. The postgres was installed with default configuration and I had definied "postgres" as root user. However, someone else user I create have full access

Re: [GENERAL] Need software infrastructure advice

2007-05-23 Thread Andrew Sullivan
On Wed, May 23, 2007 at 01:51:28PM -0500, Aaron Zeitler wrote: > Internet went down for a few minutes (or days). The main problem with this > solution is that Slony-1 says that you really shouldn't have more than a > dozen places that you replicate to, and I have 60. I would also like to be > abl

Re: [GENERAL] Performance

2007-05-23 Thread Joshua D. Drake
Donald Laurine wrote: My question is on Postgres performance. I have three systems all running the same database and have the same data feed. One the of the systems is running 7.4.8 and the other two are at 8.1.4 They all run under Linux. The type of machines are not really important to my que

[GENERAL] the future of pljava development

2007-05-23 Thread Marek Lewczuk
Hello everyone, I would like to start very important (from my point of view) topic - the future of pljava in PostgreSQL development. Thomas Hallgren (creator of pljava) has made a great job setting up the project, but there are many things to do (e.g. preparing pljava for PostgreSQL 8.3) in ord

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Andrew Sullivan
On Wed, May 23, 2007 at 12:12:52PM +1000, Naz Gassiep wrote: > give me nightmares. Is it really true that large sites turn RI off to > improve performance, You can't "turn it off", but you can "not use it". And I suppose there are shops where they don't use it; after all, you can make any comput

Re: [GENERAL] Remove query results from cache

2007-05-23 Thread Alvaro Herrera
André Volpato wrote: > Hello, > > Is there any way to remove the results of certain query, from the memory > cache ? > I´m doing some performance tests, and I need the planner to make his > work every time I run the statements, without changing them. > > Running vmstat, I can se the memory cach

Re: [GENERAL] Performance

2007-05-23 Thread Martijn van Oosterhout
On Wed, May 23, 2007 at 10:12:09AM -0700, Donald Laurine wrote: > Now my question. The performance of each of these databases is > decreasing. I measure the average insert time to the database. This > metric has decreased by about 300 percent over the last year. I run > vacuum analyze and vacuum

Re: [GENERAL] query log corrupted-looking entries

2007-05-23 Thread George Pavlov
Hoping to resurrect this thread. I am seeing more and more of this as the database gets more usage and it really messes up query log analysis. A quick summary: When I posted this was getting corrupted query log entries. I still am. They look like this (the problem line + one line before and after

[GENERAL] Need software infrastructure advice

2007-05-23 Thread Aaron Zeitler
Note: The meat and potatoes of my request is in the "What I would like" section. Everything else is just explanation. Currently my company is using software that really isn't meeting our needs. We have tried to get the 3rd party to allow us to help with their source, but they won't allow us to h

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Richard P. Welty
Scott Marlowe wrote: 2: Handling RI in the application doesn't scale. If everything you do requires you to check in the app, lock the whole table to prevent race conditions, and then commit, you'll never scale to any real number of users. You can have reliability and performance if you do RI

Re: [GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-23 Thread Joshua D. Drake
Rick Schumeyer wrote: When you say "reconfigure db" does this mean "recreate all your tsearch indexes"? Well if you install tsearch2 ahead of time, the restore will take care of that for you. What we typically do is this: schema dump rip out tsearch2 rip out all foreign keys, index creation

[GENERAL] Remove query results from cache

2007-05-23 Thread André Volpato
Hello, Is there any way to remove the results of certain query, from the memory cache ? I´m doing some performance tests, and I need the planner to make his work every time I run the statements, without changing them. Running vmstat, I can se the memory cache grows, and the planner do not 'f

[GENERAL] Performance

2007-05-23 Thread Donald Laurine
My question is on Postgres performance. I have three systems all running the same database and have the same data feed. One the of the systems is running 7.4.8 and the other two are at 8.1.4 They all run under Linux. The type of machines are not really important to my question, since I am not

Re: [GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Alexander Staubo
On 5/23/07, Harpreet Dhaliwal <[EMAIL PROTECTED]> wrote: I was wondering if Vacuum DB concept in Postgres is really novel and there's no concept like this in other RDBMS like oracle or sql server. If at all other RDBMS have such a concept implemented, how good or bad it is as compared to postgres

Re: [Re] Re: [Re] Re: [GENERAL] Winsock error 10035 while trying to upgrade from 8.0 to 8.2

2007-05-23 Thread Magnus Hagander
Cyril VELTER wrote: >> Cyril VELTER wrote: >>> No I'm not. It's not even complied in the server nor in the pg_dump > binary. >>> The server is built on windows using MSYS simply with ./configure && >>> make > all >>> && make install >>> >>> >>> I've been able to reproduce the p

[GENERAL] Vacuum DB in Postgres Vs similar concept in other RDBMS

2007-05-23 Thread Harpreet Dhaliwal
Hi, I was wondering if Vacuum DB concept in Postgres is really novel and there's no concept like this in other RDBMS like oracle or sql server. If at all other RDBMS have such a concept implemented, how good or bad it is as compared to postgres's vacuum db concept. Any type of pointers would be

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread PFC
Some big sites do of course juggle performance vs in-database run-time checks, but the statements as typically presented by MySQL partisans, Live from the front : This freshly created database has had to endure a multithreaded query assault for about 2 hours. It gave up.

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Alexander Staubo
On 5/23/07, Naz Gassiep <[EMAIL PROTECTED]> wrote: "*Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level." It's not just the big

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Scott Marlowe
Naz Gassiep wrote: I'm working in a project at the moment that is using MySQL, and people keep making assertions like this one: "*Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread Scott Ribe
> "*Really* big sites don't ever have referential integrity. Or if the few > spots they do (like with financial transactions) it's implemented on the > application level (via, say, optimistic locking), never the database level." Pure, utter, unadulterated bullshit. Speaking as someone who had year

Re: [GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-23 Thread Rick Schumeyer
When you say "reconfigure db" does this mean "recreate all your tsearch indexes"? Joshua D. Drake wrote: Rick Schumeyer wrote: I have a database running under pg 8.1.4 that uses tsearch2. I am upgrading to pg 8.2.4. I dumped the pg 8.1.x database and tried to install it in pg 8.2.4. This

Re: [GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-23 Thread Richard Huxton
Rick Schumeyer wrote: I have a database running under pg 8.1.4 that uses tsearch2. I am upgrading to pg 8.2.4. I dumped the pg 8.1.x database and tried to install it in pg 8.2.4. This does not seem to work. Is there a procedure for this that someone can point me to? You might find this us

Re: [GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-23 Thread Joshua D. Drake
Rick Schumeyer wrote: I have a database running under pg 8.1.4 that uses tsearch2. I am upgrading to pg 8.2.4. I dumped the pg 8.1.x database and tried to install it in pg 8.2.4. This does not seem to work. Is there a procedure for this that someone can point me to? You uninstall tsearch2

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Richard Huxton
Purusothaman A wrote: Dear Richard Huxton, Thanks for your quick reply. only the first 3 values(HX, MASK, Rockey4ND) are file object's oid value. the other two are are not oid values. Umm - OK. Can I suggest perhaps having different tables for different types of data? I have shown origina

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread Alvaro Herrera
André Volpato wrote: > The ammount of space saved seems pretty clear to me. Yeah, zero most of the time due to alignment. > What are you saying is that the index behaviour is the same, for all > types smaller than 4 bytes ? For query performance, in a search is > based on that standalone inde

[GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-23 Thread Rick Schumeyer
I have a database running under pg 8.1.4 that uses tsearch2. I am upgrading to pg 8.2.4. I dumped the pg 8.1.x database and tried to install it in pg 8.2.4. This does not seem to work. Is there a procedure for this that someone can point me to? ---(end of broadcast)-

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
André Volpato escreveu: Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Purusothaman A
Dear Richard Huxton, Thanks for your quick reply. only the first 3 values(HX, MASK, Rockey4ND) are file object's oid value. the other two are are not oid values. I have shown original output values displayed by postgresql client. I can explain more. 1. HX is a XML file. after downloading that

Re: [GENERAL] Sequential scan from simple query

2007-05-23 Thread Leif B. Kristensen
On Wednesday 23. May 2007 16:31, Leif B. Kristensen wrote: >I've also tried: > >pgslekt=> create index last_edit_key on persons(last_edit); > >But that doesn't make any difference. But this one did: pgslekt=> create index last_edited_persons_key on persons(last_edit,person_id); CREATE INDEX pgsl

Re: [GENERAL] Sequential scan from simple query

2007-05-23 Thread Tom Lane
"Leif B. Kristensen" <[EMAIL PROTECTED]> writes: > Can anybody tell me why the following query requires a full table scan? > pgslekt=> explain select person_id, last_edit from persons >order by last_edit desc, person_id desc limit 50; > 'persons' is a regular table where person_id

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I cha

[GENERAL] Sequential scan from simple query

2007-05-23 Thread Leif B. Kristensen
Can anybody tell me why the following query requires a full table scan? pgslekt=> explain select person_id, last_edit from persons order by last_edit desc, person_id desc limit 50; QUERY PLAN

Re: [GENERAL] deleting/dropping tables...

2007-05-23 Thread Richard Huxton
bruce wrote: I'm trying to resinstall the db/sql, and it's generating a great deal of errors. I figured the easy solution would be to delete/drop the database/tables, but when i did a : drop database gforge; the gforge database is still in the database list when i do a "psql \l" Then you shou

[GENERAL] deleting/dropping tables...

2007-05-23 Thread bruce
Hi.. New to postgres. I'm trying to install an app that uses postgres for the db. I'm trying to resinstall the db/sql, and it's generating a great deal of errors. I figured the easy solution would be to delete/drop the database/tables, but when i did a : drop database gforge; the gforge databas

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread Tom Lane
=?ISO-8859-1?Q?Andr=E9_Volpato?= <[EMAIL PROTECTED]> writes: > I need to store one-length values like '1', '2', '3' or '4' . > Today, this field is indexed with btree and is of type smallint (int2). > How much performance will be improved if I change it to "char" (1 byte > length) ? The improve

Re: [GENERAL] Several queries consume 100 % processor

2007-05-23 Thread Richard Huxton
J. ORIOL wrote: I'm filling a 40 x 10 matrix of data (A string grid), that's 400 cells being calculated aproximately with 6 to 8 queries each one of them. That's 4800 queries to fill the matrix. In the server, this task delays 8 secs. but in the client are 40 secs. What takes 40 seconds? If y

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread PFC
"*Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level." Sure, but in the forum benchmark I just did, when using MyISAM, with

[GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
Hello, I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I change it to "char" (1 byte length) ? Or int2 is the best solution in this case ? Thanks ! -- []´s, André

Re: [GENERAL] Several queries consume 100 % processor

2007-05-23 Thread J. ORIOL
Thanks by your replies, Richard, Martijn. The queries are very normal, neither complex or large. My tables are pretty small too. (My SQL skills are the same, I'm afraid) So, what I'm doing with my app: I'm filling a 40 x 10 matrix of data (A string grid), that's 400 cells being calculated apro

Re: [GENERAL] Several queries consume 100 % processor

2007-05-23 Thread Richard Huxton
J. ORIOL wrote: Hi, I have an app working over LAN , XP + Postgres 8.2. OK - so that's on the server, yes? > The problem is that a client send several queries and the processor show me 100 % usage. (P IV 3 Ghz with 1 Gb RAM) That's what's supposed to happen. Any process will either: 1.

Re: [GENERAL] Several queries consume 100 % processor

2007-05-23 Thread Martijn van Oosterhout
On Wed, May 23, 2007 at 07:50:42AM -0500, J. ORIOL wrote: > Hi, > > I have an app working over LAN , XP + Postgres 8.2. The problem is > that a client send several queries and the processor show me 100 % > usage. (P IV 3 Ghz with 1 Gb RAM) and stops all its tasks until > queries finishes. > > Thi

[GENERAL] Several queries consume 100 % processor

2007-05-23 Thread J. ORIOL
Hi, I have an app working over LAN , XP + Postgres 8.2. The problem is that a client send several queries and the processor show me 100 % usage. (P IV 3 Ghz with 1 Gb RAM) and stops all its tasks until queries finishes. This queries are send from inside app code, should I create procedures for

Re: [GENERAL] Integrity on large sites

2007-05-23 Thread btober
- Original Message Follows - From: "Stuart Cooper" <[EMAIL PROTECTED]> >> "*Really* big sites don't ever have referential >> integrity. Or if the few spots they do (like with >> financial transactions) it's implemented on the >application level (via, say, optimistic locking), never the >da

Re: [GENERAL] Using a trigger with an object-relational manager

2007-05-23 Thread Rick Schumeyer
Actually, the situation is slightly more complicated. It's more like I have tables A1, A2, and A3 each of which must have a corresponding row in B. So each of A1, A2 and A3 has a BEFORE INSERT trigger that creates a row in B and sets a FK in A1 (or A2 or A3). So I can't just use the same PK

Re: [GENERAL] Using a trigger with an object-relational manager

2007-05-23 Thread Rick Schumeyer
I just realized that I was having a slight brain-freeze earlier. ActiveRecord creates an A object first, then tells pg to INSERT it, but nothing is actually returned by the INSERT statement. (I assume that Hibernate et. al would be the same). So of course it does not see the result of the tr

Re: [GENERAL] Using a trigger with an object-relational manager

2007-05-23 Thread PFC
On Wed, 23 May 2007 14:41:00 +0200, Rick Schumeyer <[EMAIL PROTECTED]> wrote: Actually, the situation is slightly more complicated. It's more like I have tables A1, A2, and A3 each of which must have a corresponding row in B. So each of A1, A2 and A3 has a BEFORE INSERT trigger that creat

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Richard Huxton
Purusothaman A wrote: Thanks Richard Huxton for your reply. I use client side api for uploading and downloading files. Its not happening immediately. But when database grows with data, file object got corrupted. Yes, but *HOW* - is it a different file, length is different, what? My table st

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-23 Thread Purusothaman A
Thanks Richard Huxton for your reply. I use client side api for uploading and downloading files. Its not happening immediately. But when database grows with data, file object got corrupted. My table structure is as follows. Table "public.conf" Column | Type | Modif

Re: [GENERAL] partial word matching

2007-05-23 Thread Hannes Dorbath
On 22.05.2007 22:49, Mage wrote: as far as I know treach2 doesn't support partial word matching. Last time I checked it didn't. (I also googled before I asking this). Am I wrong? If not, we would implement some FTI, something like the old and decrepated FTI-crontib. Where should we start readi

Re: [GENERAL] Lock table, Select for update and Serialization error

2007-05-23 Thread Albe Laurenz
One last comment: sudhir wrote: > T1# BEGIN -- snapshot taken > T1# Set transaction isolation level serializable; > T2# BEGIN -- snapshot taken > T2# Set transaction isolation level serializable; > T1# Update account set bal=bal-100 where accno=129; The 'snapshot taken' are misplaced. The snapsh