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 4.1232234
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 val1,
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
WHERE
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 sus
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 e
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 the
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
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 n
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 r
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
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
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
12 matches
Mail list logo