Re: [HACKERS] Oracle Style packages on postgres

2005-05-08 Thread Thomas Hallgren
Satoshi Nagayasu wrote: (B (B>>An oracle package is created when first referenced. Its initialization (B>>code is run once (ie costly queries to populate session wide package (B>>params) and the package dies at the end of the session (B>>An analogy with OOP is that it's like ha

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Hm. If you incorrectly mark your function as IMMUTABLE even though it > > has side effects then the planner may indeed collapse this. Does the > > planner know it can't collapse views if the underlying tables aren't

Re: [HACKERS] Oracle Style packages on postgres

2005-05-08 Thread Satoshi Nagayasu
Bob wrote: (B> One simple benefit to packages is just organization of related code. (B (BAnd the package-scoped variables or constant values, similar to (Bthe global variables. (B (BIt will be very useful for application programmers (Bif one variable can be shared from several functions. (B

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Hm. If you incorrectly mark your function as IMMUTABLE even though it > has side effects then the planner may indeed collapse this. Does the > planner know it can't collapse views if the underlying tables aren't > accessible to the user? There are no cases

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> [ shrug ] It's still broken, and the reason is that there's no >> equivalent of fsync for directory operations. Consider > Traditionally that's because directory operations were always > synchronous, and hence didn'

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Greg Stark
Mike Mascari writes: > 2. Issue a query like: > > SELECT * > FROM view_of_salaries_based_on_current_user > WHERE my_side_effect_function_that_inserts_into_a_temp_table(salary, > employee); That's just exactly equivalent to SELECT * FROM (select * from all_salaries whe

Re: [HACKERS] Oracle Style packages on postgres

2005-05-08 Thread Bob
One simple benefit to packages is just organization of related code.On 5/7/05, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:Oracle Style packages on postgresOVERVIEW: To emulate oracle server side development in postgres I required serverside packages.  The following text demonstrates how to do thi

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Heikki Linnakangas <[EMAIL PROTECTED]> writes: > > Consider the variant with extra marker files. In that case, backend B > > doesn't have to know about the .notcommitted status to flush the buffers. > > [ shrug ] It's still broken, and the reason is that t

Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem

2005-05-08 Thread Oliver Jowett
Madison Kelly wrote: Is there a way to store the name in raw binary? Yes: bytea. -O ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[HACKERS]

2005-05-08 Thread sac
unsubscribe ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [HACKERS] test bed

2005-05-08 Thread Neil Conway
Oleg Bartunov wrote: I just talked with AMD Russia and they could provide almost any hw for testing, so I'm looking for test-suite for PostgreSQL. Do we have sort of "official" tests ? I guess the regression tests would be the closest to an official set of tests, but they obviously aren't perfect.

Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem

2005-05-08 Thread Madison Kelly
Thank you, I would! (B (B What versions have you tested the patch against? I am sorry but I am (Bnot too familiar with applying patches against the main program, is (Bthere documentation on how to apply the patch? Is there a way to roll (Bthe patch back/remove it? Would I be able to script th

Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem

2005-05-08 Thread Madison Kelly
John Hansen wrote: Tatsuo Ishii wrote: We have developed patches which relaxes the character validation so that PostgreSQL accepts invalid characters. It works like this: That is just plain 100% wrong!! Under no circumstances should there be invalid data in a database. And if you're trying to ma

Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem

2005-05-08 Thread Tino Wildenhain
Am Sonntag, den 08.05.2005, 14:30 +0900 schrieb Tatsuo Ishii: ... > Actually I myself thought as you are before. Later I found that it was > not so good idea. People already have invalid encoded data in their > precious database and have very hard time to migrate to newer version > of PostgreSQL be

[HACKERS] Oracle Style packages on postgres

2005-05-08 Thread rmm
Oracle Style packages on postgres OVERVIEW: To emulate oracle server side development in postgres I required server side packages. The following text demonstrates how to do this using plpython on postgres 8 and suggests a language extension. WHAT ARE ORACLE PACKAGES? Looking back over the pos

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
> -Original Message- > From: Tatsuo Ishii [mailto:[EMAIL PROTECTED] > Sent: Sunday, May 08, 2005 11:08 PM > To: John Hansen > Cc: pgman@candle.pha.pa.us; [EMAIL PROTECTED]; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Patch for collation using ICU > > > > I don't buy it. If

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
Tatsuo Ishii wrote: > Sent: Sunday, May 08, 2005 11:08 PM > To: John Hansen > Cc: pgman@candle.pha.pa.us; [EMAIL PROTECTED]; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Patch for collation using ICU > > > > I don't buy it. If current conversion tables does the > right thing, > > > w

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
Tom Lane wrote: > Sent: Monday, May 09, 2005 2:47 AM > To: Palle Girgensohn > Cc: Tatsuo Ishii; John Hansen; [EMAIL PROTECTED]; > pgman@candle.pha.pa.us; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Patch for collation using ICU > > Palle Girgensohn <[EMAIL PROTECTED]> writes: > >> I'm

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
Tatsuo Ishii wrote: > Sent: Sunday, May 08, 2005 11:19 PM > To: John Hansen > Cc: [EMAIL PROTECTED]; pgman@candle.pha.pa.us; > [EMAIL PROTECTED]; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Patch for collation using ICU > > > > > > On Sun, May 08, 2005 at 02:07:29PM +1000, John Hansen w

Re: [HACKERS] Views, views, views! (long)

2005-05-08 Thread Andrew - Supernews
On 2005-05-05, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > I would suggest that you align your terminology with the information > schema as much as possible, so it would be "type_schema" and not > "type_schema_name", and "ordinal_position" instead of > "column_position". Otherwise we'll have

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Palle Girgensohn
> Palle Girgensohn <[EMAIL PROTECTED]> writes: >>> I'm confused. I thought the ICU patches is intended for using on >>> broken locale platforms? > >> It will sort correctly in *one* locale, using ICU. You still cannot mix >> different locales in the same database cluster, the collation locale is >>

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Andrew Dunstan
Josh Berkus wrote: Mike, I think most people coming from any other enterprise-class RDBMS environment will be surprised that they cannot use VIEWs to provide user-specific views on data. I could be wrong, but I'd put money on it... Well, I'd say that giving regular users the "create" permi

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Andrew Dunstan
Magnus Hagander wrote: The source for ICU 3.2 is 9.8Mb in .tar.gz. PostgreSQL 8.0.2 is 13.2. That means the size of the distribution would almost *double* if we bundled ICU. It's probably fine bundling it in the binary distributions (at least we'd probably do it on win32, since not many ppl will h

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Josh Berkus
Mike, > I think most people coming from any other enterprise-class RDBMS > environment will be surprised that they cannot use VIEWs to provide > user-specific views on data. I could be wrong, but I'd put money on it... Well, I'd say that giving regular users the "create" permission on your datab

Re: [HACKERS] Can we get patents?

2005-05-08 Thread Josh Berkus
Alvaro, > I'm wondering, could the PostgreSQL Foundation (or some other entity) > get patents on some parts of Postgres? Maybe ResourceOwners for > example; or the newer parts of the optimizer. That depends; is the SFLC offering to pay for the patent applications? Last I checked, it was somewh

Re: [HACKERS] Views, views, views! (long)

2005-05-08 Thread Andrew - Supernews
On 2005-05-08, "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > I suggest taking a gander at the '_compat' files at > http://lnk.nu/cvs.pgfoundry.org/251/. Basically, features that are new > in 8.0 (ie: tablespaces) have an abstraction layer. The code under that > layer is version specific, but the code

Re: [HACKERS] Race conditions, race conditions!

2005-05-08 Thread Jim C. Nasby
On Sat, May 07, 2005 at 07:20:48PM -0400, Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > I wonder if there's an argument for building assertion-enabled builds with > > code that randomly yields the processor some percentage of time before and > > after taking a lock. It wouldn't catch

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Tom Lane
Palle Girgensohn <[EMAIL PROTECTED]> writes: >> I'm confused. I thought the ICU patches is intended for using on >> broken locale platforms? > It will sort correctly in *one* locale, using ICU. You still cannot mix > different locales in the same database cluster, the collation locale is > still

Re: [HACKERS] Will new release require an initdb?

2005-05-08 Thread Tom Lane
Devrim GUNDUZ <[EMAIL PROTECTED]> writes: > The question is in the subject line: Will the new dot releases require an > initdb, since they will play with system catalogs? No. See the release notes --- it's the DBA who has to do the playing. http://developer.postgresql.org/docs/postgres/release.h

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Consider the variant with extra marker files. In that case, backend B > doesn't have to know about the .notcommitted status to flush the buffers. [ shrug ] It's still broken, and the reason is that there's no equivalent of fsync for directory oper

Re: [HACKERS] Views, views, views! (long)

2005-05-08 Thread Jim C. Nasby
On Fri, May 06, 2005 at 05:44:43PM -0400, Robert Treat wrote: > Sorry, but I'm still in the "admin tools wont use these" camp since I don't > believe these views can solve an admin tools need to support multiple > versioning within its code. I also don't think it is any harder to learn to > qu

Re: [HACKERS] why two WRITE_NODE_FIELD(whereCluase)?

2005-05-08 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > I see WRITE_NODE_FIELD(whereClause) twice in _outSelectStmt(). Maybe a > bug? Yeah, it is, though a pretty minor one since we never read SelectStmt nodes back in again (they are not used in stored rules, which are already Querys). Feel free to fix it in

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Tatsuo Ishii
> > > > On Sun, May 08, 2005 at 02:07:29PM +1000, John Hansen wrote: > > > > > Tatsuo Ishii wrote: > > > > > > > > > > So Japanese(including ASCII)/UNICODE behavior is > > > > perfectly correct > > > > > > at this moment. > > > > > > > > > > Right, so you _never_ use accented ascii characters in

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Palle Girgensohn
--On söndag, maj 08, 2005 22.19.25 +0900 Tatsuo Ishii <[EMAIL PROTECTED]> wrote: > > > On Sun, May 08, 2005 at 02:07:29PM +1000, John Hansen wrote: > > > > Tatsuo Ishii wrote: > > > > > > > > So Japanese(including ASCII)/UNICODE behavior is > > > perfectly correct > > > > > at this moment. > > >

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Tatsuo Ishii
> > I don't buy it. If current conversion tables does the right > > thing, why we need to replace. Or if conversion tables are > > not correct, why don't you fix it? I think the rule of > > character conversion will not change frequently, especially > > for LATIN languages. Thus maintaining cos

Re: [HACKERS] [PATCHES] Cleaning up unreferenced table files

2005-05-08 Thread Heikki Linnakangas
On Sat, 7 May 2005, Tom Lane wrote: Heikki Linnakangas <[EMAIL PROTECTED]> writes: Maybe we should take a different approach to the problem: 1. Create new file with an extension to mark that it's not yet committed (eg. 1234.notcommitted) This is pushing the problem into the wrong place, viz the

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
> The source for ICU 3.2 is 9.8Mb in .tar.gz. PostgreSQL 8.0.2 is 13.2. > That means the size of the distribution would almost *double* > if we bundled ICU. Ermm,. Don't forget to remove the current charset conversions and locale support before making your size estimation. > > It's probably fin

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Magnus Hagander
>> The 3.2 vs 2.8 business is disturbing also; specifically, I >> don't think we get to require 3.2 on a platform where 2.8 is >> installed. > >There seems to be nothing in the ICU licence that would prevent us from >bundling it. >This would solve both the 3.2 vs 2.8 problems, and would remove th

[HACKERS] why two WRITE_NODE_FIELD(whereCluase)?

2005-05-08 Thread Tatsuo Ishii
I see WRITE_NODE_FIELD(whereClause) twice in _outSelectStmt(). Maybe a bug? -- Tatsuo Ishii ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread Magnus Hagander
>> Is this patch ready for application? >> >> >http://people.freebsd.org/~girgen/postgresql-icu/pg-802-icu-200 >5-05-06.d >> iff.gz >> >> The web site is: >> >> http://people.freebsd.org/~girgen/postgresql-icu/readme.html > >I don't think so, not quite. I have not had any positive >repo

Re: [HACKERS] pl/pgsql enabled by default

2005-05-08 Thread Rod Taylor
> 2. Issue a query like: > > SELECT * > FROM view_of_salaries_based_on_current_user > WHERE my_side_effect_function_that_inserts_into_a_temp_table(salary, > employee); An SRF will guarantee an execution order and work for security purposes, but getting your function with side effects to run earl

[HACKERS] Will new release require an initdb?

2005-05-08 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, The question is in the subject line: Will the new dot releases require an initdb, since they will play with system catalogs? Regards, - -- Devrim GUNDUZ devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.tdmsoft.com.t

Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem

2005-05-08 Thread John Hansen
Tatsuo Ishii wrote: > Sent: Sunday, May 08, 2005 3:31 PM > To: John Hansen > Cc: [EMAIL PROTECTED]; pgsql-general@postgresql.org; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] [GENERAL] Invalid unicode in COPY problem > > > Tatsuo Ishii wrote: > > > Sent: Sunday, May 08, 2005 12:01 PM >

Re: [HACKERS] Patch for collation using ICU

2005-05-08 Thread John Hansen
Tatsuo Ishii > Sent: Sunday, May 08, 2005 3:41 PM > To: John Hansen > Cc: [EMAIL PROTECTED]; pgman@candle.pha.pa.us; > [EMAIL PROTECTED]; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Patch for collation using ICU > > > Alvaro Herrera wrote: > > > Sent: Sunday, May 08, 2005 2:49 PM > > >