[GENERAL] Is this a bug? Insert float into int column inserts rounded value instead of error.

2007-08-27 Thread Matthew Schumacher
List, One of the reasons why I use postgres is because you can insert data and it will work or give you an error instead of converting, truncating, etc... well I found a place where postgres makes an erroneous assumption and I'm not sure this is by design. When inserting a float such as

Re: [GENERAL] Query performance inconsistant.

2006-09-07 Thread Matthew Schumacher
Tom Lane wrote: Jeff Davis [EMAIL PROTECTED] writes: From what you described, I would not expect many locking problems. Are there any other types of queries you run that may cause a lock? Row locks (SELECT FOR UPDATE/SHARE) are a possible problem, particularly if this is a pre-8.1 Postgres

[GENERAL] Query performance inconsistant.

2006-08-31 Thread Matthew Schumacher
I have been having performance problems with my DB so this morning I added some config to log queries that take more than 250ms. The result is surprising because some queries will take as long as 10 seconds, but then you do a explain analyze on them they show that indexes are being used and they

Re: [GENERAL] Query performance inconsistant.

2006-08-31 Thread Matthew Schumacher
Tom Lane wrote: Matthew Schumacher [EMAIL PROTECTED] writes: I have been having performance problems with my DB so this morning I added some config to log queries that take more than 250ms. The result is surprising because some queries will take as long as 10 seconds, but then you do

Re: [GENERAL] Query performance inconsistant.

2006-08-31 Thread Matthew Schumacher
Jeff Davis wrote: http://www.postgresql.org/docs/8.1/static/mvcc.html In the Explicit Locking section it details the locks acquired by UPDATE, etc. From what you described, I would not expect many locking problems. Are there any other types of queries you run that may cause a lock? Do you

Re: [GENERAL] pgsql vs mysql

2006-06-30 Thread Matthew Schumacher
Merlin Moncure wrote: * mysql performance advantage is greatly overstated, although postgresql requires you to use certain conventions (example: prepared statements) to get comparable performance * both databases (IMO) are very stable. in 6 years of workikng with both databases, I've never

[GENERAL] Backslash problems with 8.1.4

2006-06-07 Thread Matthew Schumacher
Hello list, I upgraded to postgres-8.1.4 and saw all of the backslash escape changes and understand why, but I can't figure out how to put a literal \' in the database. If \ is no longer escaping shouldn't I be able to use \” and have postgres ignore the \ and use standard sql syntax to escape

Re: [GENERAL] Backslash problems with 8.1.4

2006-06-07 Thread Matthew Schumacher
Tom Lane wrote: Matthew Schumacher [EMAIL PROTECTED] writes: I upgraded to postgres-8.1.4 and saw all of the backslash escape changes and understand why, but I can't figure out how to put a literal \' in the database. You use the SQL-standard way, which is to repeat the quote mark

[GENERAL] Rule system and unsucessful updates.

2006-01-16 Thread Matthew Schumacher
I'm having trouble getting the rule system to work on updates that do not match the where clause. Perhaps I'm doing this wrong, but I can't find any docs that explain this very clearly. Here what I would like to do: CREATE OR REPLACE RULE insertAcctUpdate AS ON UPDATE TO accounting_tab

Re: [GENERAL] Rule system and unsucessful updates.

2006-01-16 Thread Matthew Schumacher
Tom Lane wrote: Matthew Schumacher [EMAIL PROTECTED] writes: I'm having trouble getting the rule system to work on updates that do not match the where clause. You did not say what you mean by doesn't work, but what I suspect you are getting bit by is that ON UPDATE rules fire before

Re: [GENERAL] Rule system and unsucessful updates.

2006-01-16 Thread Matthew Schumacher
Tom Lane wrote: The above is a pretty bad idea in any case --- think about what happens when you have some data in the table. It'll set *every row* to id = 1 and data = 'test'. Your right, DUH, I forgot my where clause in my example. It is in the real query though, perhaps I didn't get

[GENERAL] Running queries or functions stored in a table.

2005-03-04 Thread Matthew Schumacher
List, I have a requirement to write a query that lists a set of attribute/value pairs, but the values need to be dynamically created on the fly from another query or function. Is it possible to have a table like this: Attribute | Value - Attrib1 | select