Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
On Tue, 14 Sep 2004, Peter Eisentraut wrote: > It's the same in SQL 99. I think you missed that most of the "direct > SQL" is specified in part 5 instead of part 2. In SQL 2003 they have > merged these parts. The relevant section for you in SQL 99 is 4.6.3 in > part 5. Good, that explains i

Re: [HACKERS] PL/PgSQL "bare" function calls

2004-09-14 Thread Neil Conway
On Thu, 2004-09-16 at 00:06, Neil Conway wrote: > Attached is a proof of concept patch that implements this. Woops, the patch is really attached this time. -Neil Index: src/pl/plpgsql/src/gram.y === RCS file: /home/neilc/private-cvs

Re: [HACKERS] libpq and prepared statements progress for 8.0

2004-09-14 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > A bit of context here. The perl DBD::Pg developers are trying to figure out > how to implement prepared queries sanely. As it stands now they're basically > writing off both binary prepared queries and SQL based prepared queries as > basically useless. Real

[HACKERS] PL/PgSQL "bare" function calls

2004-09-14 Thread Neil Conway
I'd like to make it possible to perform function calls in PL/PgSQL without needing to use PERFORM. I think this would be useful because (a) it is closer to how PL/SQL works (b) PERFORM is (IMHO) a kludge, and making it unnecessary would make programming in PL/PgSQL more natural. Attached is a proo

Re: [HACKERS] beta1 & beta2 & Windows & heavy load

2004-09-14 Thread Sailesh Krishnamurthy
> "Tom" == Tom Lane <[EMAIL PROTECTED]> writes: Tom> instead of increasing it. And I don't want to create a Tom> full-fledged alloc/free package for shared memory --- the Tom> bang-for-buck ratio for that is way too low. So I'm inclined I think I've said it before, but we actual

[HACKERS] assertion failure w/ valgrind

2004-09-14 Thread Neil Conway
I ran the postmaster under valgrind, and ran the regression tests ("make installcheck") against it. Curiously, this resulted in an assertion failure: TRAP: FailedAssertion("!(lock->shared > 0)", File: "/home/neilc/pgsql/src/backend/storage/lmgr/lwlock.c", Line: 443) The error is pretty reproducib

Re: [HACKERS] NEW used in a query that is not in a rule

2004-09-14 Thread Gaetano Mendola
Oliver Elphick wrote: My guess is that you are having this problem because you are executing a query referring to NEW rather than using it directly. This for sure, I'm able to use NEW directly but I don't know at definition time wich field of NEW I have to use. I don't think you can refer to NEW

Re: [HACKERS] APR 1.0 released

2004-09-14 Thread Jim C. Nasby
Any chance of having query parallelization added to TODO? I'm guessing it will be a huge job, but it's also one of the places where the 'big 3' have a huge advantage in scalability. On Mon, Sep 13, 2004 at 10:24:05AM -0700, Sailesh Krishnamurthy wrote: > > "CB" == Christopher Browne <[EMAIL PR

[HACKERS] VACUUM FULL taking accessivly long.

2004-09-14 Thread Darcy Buskermolen
While doing some testing for someone, I have run across what appears to be a bug that is only readily reproduceable in FreeBSD 4.x (dual Xeon 2.4 GHz, 2GB RAM, PG 7.4). The same test run on a pair of linux boxen, work as expected. This process has now been running 25 hours, is still running,

Re: [HACKERS] NEW used in a query that is not in a rule

2004-09-14 Thread Oliver Elphick
On Tue, 2004-09-14 at 19:34, Gaetano Mendola wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi all, > I'm bouncing on the following problem, I don't know if is a bug or if exist a > different > way to do it. > The following code is not meaningfull but it's an extract of what I'm try

Re: [HACKERS] NEW used in a query that is not in a rule

2004-09-14 Thread Passynkov, Vadim
I am also don't know how use NEW,OLD in plpgsql but in pltcl possible to use $NEW($my_field), $OLD($my_field) -- Vadim Passynkov -Original Message- From: Gaetano Mendola [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 2:35 PM To: [EMAIL PROTECTED] Subject: [HACKERS] NEW used

Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Peter Eisentraut
Dennis Bjorklund wrote: > In sql99 there is only which is > SELECT .. INTO .. But maybe some of the other includes queries after > 4-5 jumps or so. Or maybe they simply forgot that one. Just my luck > to be reading sql99. It's the same in SQL 99. I think you missed that most of the "direct SQL"

[HACKERS] Postgresql 8.0.0beta2 unicode problem

2004-09-14 Thread Alexander Serkov
CREATE TABLE test(word text); INSERT INTO test VALUES('\342\204\226'); SELECT * FROM test WHERE word='\342\200\242'; or SELECT * FROM test WHERE word='\342\200\224'; returns word previously inserted instead of zero rows. ___ http://www.bi

Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
On Tue, 14 Sep 2004, Alvaro Herrera wrote: > -- The following SQL-data statements: >[...] >. >[...] > > > The is in time defined as > , which in turn is a , which is > our SELECT statement. A lot of jumps in the grammar, but it's there. Nice. In sql99 there is only which is SEL

[HACKERS] NEW used in a query that is not in a rule

2004-09-14 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm bouncing on the following problem, I don't know if is a bug or if exist a different way to do it. The following code is not meaningfull but it's an extract of what I'm trying to do: CREATE TABLE foo ( field1 INTEGER ); CREATE OR REPLACE FUNC

Re: [HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Alvaro Herrera
On Tue, Sep 14, 2004 at 07:35:29PM +0200, Dennis Bjorklund wrote: > Is select a transaction starting statement according to the the sql > specification? Yes, at least in my copy of sql2003. > In the specification (sql99) there is a list of things that are and a list > of things that are not, but

Re: [HACKERS] libpq and prepared statements progress for 8.0

2004-09-14 Thread Greg Stark
> > PREPARE st(unknown) AS INSERT INTO foobar(a) VALUES ($1); > > Using PQExecParams is completely out of the question? How are you > executing your statements...PQExec? A bit of context here. The perl DBD::Pg developers are trying to figure out how to implement prepared queries sanely. As it s

[HACKERS] Is select a transaction starting statement?

2004-09-14 Thread Dennis Bjorklund
Is select a transaction starting statement according to the the sql specification? In the specification (sql99) there is a list of things that are and a list of things that are not, but I can't figure out which list a select query belongs to. Isn't that great :-) In postgresql it is implemented a

Re: [HACKERS] SELECT FOR UPDATE NOWAIT and PostgreSQL 8.0

2004-09-14 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 13 Sep 2004, Simon Riggs wrote: Now we have LOCK TABLE ... NOWAIT; but I wonder whether we'll have the SELECT ... NOWAIT one. Today I got a request for this; and it was reported that this feature will be used in a huge project. Well, it sho

Re: [HACKERS] pg_locks view and user locks

2004-09-14 Thread Merlin Moncure
> "Merlin Moncure" <[EMAIL PROTECTED]> writes: > > ... is there any merit to promoting the user lock wrappers out of > contrib > > Dunno. Yours is the first message I can recall in quite a long time > indicating that anyone was using userlocks. I thought the code was kind > of dying on the vine.

Re: [HACKERS] pg_restore segfault with pg-CVS

2004-09-14 Thread strk
On Tue, Sep 14, 2004 at 10:55:46AM -0400, Tom Lane wrote: > strk <[EMAIL PROTECTED]> writes: > > Trying to make minimal example I found out it's pg_dump too. > > Example: > > $ pg_dump template1 > > ... > > Segmentation Fault > > You've got a broken build then, or a platform-specific p

Re: [HACKERS] pg_restore segfault with pg-CVS

2004-09-14 Thread Tom Lane
strk <[EMAIL PROTECTED]> writes: > Trying to make minimal example I found out it's pg_dump too. > Example: > $ pg_dump template1 > ... > Segmentation Fault You've got a broken build then, or a platform-specific problem. Check shared library linkage, maybe?

Re: [HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Darko Prenosil
Yes, IMHO this looks like a god idea. I planed to do something like that, but to return some kind of description language (XML for example),so restore could decide at runtime what exactly to do with that metadata ( depending on what user wants - create database or not, create users or not, reset se

Re: [HACKERS] pg_restore segfault with pg-CVS

2004-09-14 Thread strk
On Tue, Sep 14, 2004 at 10:45:16PM +1000, Philip Warner wrote: > At 06:55 PM 14/09/2004, strk wrote: > >Current pg_restore segfaults. > > You might need to give a little more information; does it only segfault for > a specific DB? Does it segfault for a trivial empty DB? Can you construct a > mi

Re: [HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Tom Lane
Mark Gibson <[EMAIL PROTECTED]> writes: > I have an idea, to break pg_dump into functions within PostgreSQL. This strikes me as largely useless, because the problems that are actually hard for pg_dump are not at the level of individual objects; they have to do with problems like determining a saf

Re: [HACKERS] libpq and prepared statements progress for 8.0

2004-09-14 Thread Merlin Moncure
> Anyone working on the libpq interface to prepared statements? > We could really use that for DBD::Pg. Alternatively, if someone > knows a trick to prepare an INSERT statement without knowing > the data types, that would be neat too. For example: > > CREATE TABLE foobar(a INTEGER); > > These don

Re: [HACKERS] Why are there client-only encodings?

2004-09-14 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Now I wonder why there are client-only encodings at all. Backend encodings must follow the rule that non-first bytes of multibyte sequences must have the high bit set, so that they cannot be mistaken for ASCII characters. We allow client encodings

Re: [HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Philip Warner
At 06:00 PM 14/09/2004, Mark Gibson wrote: I have an idea, to break pg_dump into functions within PostgreSQL. This has been suggested before, and I think been generally accepted as the right broad approach (the basic idea that the pg backend should know how to describe itself). Recent versions o

Re: [HACKERS] pg_restore segfault with pg-CVS

2004-09-14 Thread Philip Warner
At 06:55 PM 14/09/2004, strk wrote: Current pg_restore segfaults. You might need to give a little more information; does it only segfault for a specific DB? Does it segfault for a trivial empty DB? Can you construct a minimal example? -

Re: [HACKERS] Why are there client-only encodings?

2004-09-14 Thread Tatsuo Ishii
> I wanted to allow WIN1250 as a server-side encoding, in light of the > Windows port. Now I wonder why there are client-only encodings at all. > Without knowing details, it seems the client-only encodings are all > "Windows world" encodings. So was the original reason not to allow > these a

[HACKERS] gist cost estimator failing

2004-09-14 Thread strk
This might be gist-related or not. The cost estimator is wrongly estimating an higher cost on Index Scan then it estimates on Seq Scan (while reality shows the difference). I've found out that the gistcostestimate function is just a stub calling the genericcostestimate, can this be the problem ?

[HACKERS] pg_restore segfault with pg-CVS

2004-09-14 Thread strk
Current pg_restore segfaults. Manually fault seems to happen at (*AH->ClosePtr) (AH) in pg_backup_archiver.c/CloseArchive(Archive *) --strk; ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.or

Re: [HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Christopher Kings-Lynne
Would this be practical, would it be possible to break the pg_dump code out into PostgreSQL functions? Anyone have any ideas/thoughts/suggestions on this? It's been my plan for sometime, I'm time-starved at the moment however. Chris ---(end of broadcast)-

[HACKERS] pg_dump as a bunch of PostgreSQL functions

2004-09-14 Thread Mark Gibson
Hello folks, I have an idea, to break pg_dump into functions within PostgreSQL. We currently have some functions like pg_get_viewdef, but it would be great to have a function or functions to dump the SQL definition of any object. This would allow easy dumping of any object from admin interfaces, an

[HACKERS] Why are there client-only encodings?

2004-09-14 Thread Peter Eisentraut
I wanted to allow WIN1250 as a server-side encoding, in light of the Windows port. Now I wonder why there are client-only encodings at all. Without knowing details, it seems the client-only encodings are all "Windows world" encodings. So was the original reason not to allow these as server e