[BUGS] BUG #5277: plperl can't get args properly

2010-01-14 Thread louis

The following bug has been logged online:

Bug reference:  5277
Logged by:  louis
Email address:  louis01010...@gmail.com
PostgreSQL version: 8.4.2
Operating system:   PostgreSQL 8.4.2 on x86_64-pc-linux-gnu, compiled by GCC
gcc-4.4.real (Ubuntu 4.4.1-4ubuntu8) 4.4.1, 64-bit
Description:plperl can't get args properly
Details: 

Arguments can't be passed to a plperl function

function definition:

create or replace function foo(text) returns text as $$
   return $_[0];
$$ language plperl;


test:
=
select foo('a');

result:
===
INFO:  
 foo 
- 
(1 row)

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #7623: Inconsistency on transaction isolation documentation

2012-10-29 Thread louis-claude . canon
The following bug has been logged on the website:

Bug reference:  7623
Logged by:  Louis-Claude Canon
Email address:  louis-claude.ca...@univ-fcomte.fr
PostgreSQL version: 9.2.1
Operating system:   All
Description:

In the first paragraph of Section 13.2.1, it is first stated that "[with]
this isolation level, a SELECT query [...] never sees [...] changes
committed during query execution by concurrent transactions." It is my
understanding that this is untrue (as the rest of the paragraph seems to
imply).

Then, in the same subsection, an example is given in which a DELETE
statement is affected by an uncommitted UPDATE. It is unclear to me if this
still corresponds to the standard "Committed Read" isolation level. It could
be clearer with more precision: when is committed the DELETE statement? What
is the snapshot that it sees (when does the transaction start)? Or maybe
this standard isolation level only specified that SELECT statements must not
be affected by uncommitted changes?

As I am not an expert, I cannot guarantee that there is indeed any issue.
However, I believe it could be useful that an expert proof-reads or reviews
this subsection. For example, I am unsure whether any query will see a
consistent snapshot with only committed transactions (as it is stated at
first) or if uncommitted transactions may have an impact (as the last
example suggests).

I would also suggest to following change for clarity (or the contrary
change):
"The point at issue above is whether or not a single command sees an
absolutely consistent view of the database." -> "The point at issue above is
that any single command sees an absolutely consistent view of the database."



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #7623: Inconsistency on transaction isolation documentation

2012-10-30 Thread Louis-Claude Canon
Thanks for your helpful explanations. Reading subsection 13.2.1 makes 
sense now. I am not sure if and how the documentation could be improved, 
but I propose below some suggestions that you may find relevant. My 
confusion may have stem from my lack of knowledge in PostgreSQL locking 
mechanism.


Le 29/10/2012 22:42, Kevin Grittner a écrit :

louis-claude.ca...@univ-fcomte.fr wrote:


In the first paragraph of Section 13.2.1, it is first stated that
"[with] this isolation level, a SELECT query [...] never sees [...]
changes committed during query execution by concurrent
transactions." It is my understanding that this is untrue (as the
rest of the paragraph seems to imply).

What are you seeing which you feels contradicts that? (I don't see
anything which appears to contradict it, but maybe there's more than
one way for someone to read it, and I'm missing something.)


My mistake, I interpreted "during query execution" as "during the 
current transaction execution". It could be more precise to replace "it 
never sees either uncommitted data or changes committed during query 
execution by concurrent transactions" by one of the following :
- "it never sees either uncommitted data or changes committed during 
_this_ query execution by concurrent transactions"
- "_this query_ never sees either uncommitted data or changes committed 
during _its_ execution by concurrent transactions"



Then, in the same subsection, an example is given in which a DELETE
statement is affected by an uncommitted UPDATE.

No, the DELETE statement is blocked by the UPDATE to see whether it
commits or rolls back. If the transaction with the UPDATE rolls back,
the results of the DELETE will not be affected by the UPDATE. If the
UPDATE commits, the committed transaction will affect the DELETE.


It is unclear to me if this still corresponds to the standard
"Committed Read" isolation level.

Yes, it's still in section 13.2.1, which is all about READ COMMITTED
transactions. And I believe that it still complies with the
requirements of the standard for that level.


It could be clearer with more precision: when is committed the
DELETE statement?

I guess it could be more clear that the DELETE will block pending the
completion of the transaction containing the previously run UPDATE.
The commit of the DELETE will be some time after the commit of the
transaction containing the UPDATE.


What is the snapshot that it sees (when does the transaction
start)? Or maybe this standard isolation level only specified that
SELECT statements must not be affected by uncommitted changes?

No transaction is affected (other than blocking or possibly rolling
back with a serialization failure), by an *uncommitted* transaction.
In this example the DELETE is affected by a *committed* transaction.
The snapshot for the DELETE is taken after the query is parsed and
before it starts scanning for rows to delete. When there is a write
conflict in READ COMMITTED it follows the update chain from the
visible row to find the latest committed version of the row, blocking
for a change in progress; so technically an UPDATE or DELETE at the
READ COMMITTED transaction isolation level sometimes strays from a
single snapshot for the statement. The alternative would be to
restart the statement after a write conflict where the other
transaction commits, which could perform much worse when a statement
affects a large number of rows.


A writing query may therefore find rows by reading some committed 
values, wait for a writing lock and then retest if the write should be 
performed based on values from a subsequent commit. This is not 
intuitive that data accessed from a single query may correspond to 
several commits. The second paragraph could be started by something like 
"Although, any single query will see only committed values, a writing 
query may see an inconsistent state of the database" for a better 
introducing this inconsistent idea. Also, as locking is described later 
(section 13.3), the UPDATE/DELETE example explanation (the sentence 
"This occurs because [...] the criteria.") may be too synthetic. I 
propose to extend it by stating which snapshot are considered and how 
operations are sequentially performed. For example: "The DELETE query 
selects from the committed database the row in which hits=10. As this 
row is locked by the UPDATE (see ROW EXCLUSIVE lock in Section 13.3), 
the DELETE is blocked and wait for the COMMIT to occurs, which will free 
the lock. At this point, the DELETE proceeds by retesting if its 
selected row must be deleted. This is no longer the case as the DELETE 
snapshot of the row results from the last COMMIT that incremented hits 
to 11."



As I am not an expert, I cannot guarantee that there is indeed any
issue.

Well, based on what you said there appears to be at lest some room to
clarify or elaborate, so people 

[BUGS] "Password" issues -- bug??

2013-03-03 Thread Louis-Arnaud Iscla
Hi there,

First off, let me tell you that I've tried successfully the "trust" option in 
pg_hba.conf
I've also searched as much litterature as possible on my issue but it always 
comes down to the pg_hba.conf trick.

It just happens that I cannot connect to the server without the "trust" option 
set. In other words, when I restore md5, I cannot manage to authenticate 
anymore.

Of course, I've done an ALTER USER, triple checked that the password is the 
same, etc. I cannot make it seem to work.

I've tried with both psql and pgAdmin3.

My config:
PostgreSQL 9.0.2
Mac OS 10.7.5

(can locale have something to do with it? Is so, you want to know that I've 
tried with a full C locale for the environment that starts the server + psql, 
as well as with "fr_FR.UTF-8")

Any clue on what this could be?

thanks
Arnaud




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs