Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Flemming Frandsen
Tom Lane wrote: However, I'm unconvinced that the OP's complaint is valid. I'm unconvinced that I've stated the problem clearly enough. I would still expect any reimplementation of notify messaging to honor the principle that a LISTEN doesn't take effect till you commit. Naturally, the lis

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Flemming Frandsen
Martijn van Oosterhout wrote: A: BEGIN A: SELECT * FROM foo and cache the result. A: LISTEN foochange B: BEGIN B: update foo B: NOTIFY foochange B: COMMIT A: COMMIT > Eh? At the point the LISTEN is run, the NOTIFY hasn't committed, so a row is inserted. At the time the NOTIFY is committed

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Tom Lane
Martijn van Oosterhout writes: > It's slightly surprising though. I havn't seen anyone else complain > about this before though. The only way to fix this is to make the > LISTEN completely atransactional, so NOTIFY can see uncomitted LISTENs > also. There isn't anything very desirable about the t

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Flemming Frandsen
Ian Harding wrote: NOTIFY interacts with SQL transactions in some important ways. Firstly, if a NOTIFY is executed inside a transaction, the notify events are not delivered until and unless the transaction is committed. This is appropriate, since if the transaction is aborted, all the commands wi

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Martijn van Oosterhout
On Tue, Aug 01, 2006 at 07:50:19PM -0400, Gregory Stark wrote: > > > However that just doesn't work, because listen is broken, allow me to > > > illustrate, here A and B are two clients: > > > > > > A: BEGIN > > > A: SELECT * FROM foo and cache the result. > > > A: LISTEN foochange > > > B: BEGIN >

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Joshua D. Drake
Carlo Stonebanks wrote: Well, the surprise for me is: this is exactly what I thought! I actually do have a lot of string manipulation to do, but I am the only one on the team with Tcl experience. For the sake of other developers I thought that the plPHP project would be interesting, but I don't

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Alvaro Herrera
Merlin Moncure wrote: > On 8/1/06, Ian Harding <[EMAIL PROTECTED]> wrote: > >On 8/1/06, Christopher Browne <[EMAIL PROTECTED]> wrote: > >> Martha Stewart called it a Good Thing when "Carlo Stonebanks" > ><[EMAIL PROTECTED]> wrote: > >> > I am interested in finding out a "non-religious" answer to w

Re: [GENERAL] plTcl - how to create proc/function libraries

2006-08-01 Thread Tom Lane
"Carlo Stonebanks" <[EMAIL PROTECTED]> writes: > To enable this behavior, the PL/Tcl call handler must be compiled > with -DPLTCL_UNKNOWN_SUPPORT set. Where are you reading that? There's no such sentence in the current docs, and no sign of any such conditional in the source code either. I'm not

[GENERAL] plTcl - how to create proc/function libraries

2006-08-01 Thread Carlo Stonebanks
>From the plTcl docs it appears the way for me to create function/procedure libraries for plTcl is by implementing the "unknown" command. However, my 8.1.4 Windows-based installation doesn't seem to jibe with what the docs say I should expect:: << PL/Tcl has a special support for things often

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Joe Conway
Joshua D. Drake wrote: - Doing a lot of DB manipulation in pl/Perl or pl/Tcl or such requires having an extra level of function manipulations that won't be as natural as straight pl/pgsql. Another important distinguishing characteristic is whether it supports set returning functions.

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Joshua D. Drake
- Doing a lot of DB manipulation in pl/Perl or pl/Tcl or such requires having an extra level of function manipulations that won't be as natural as straight pl/pgsql. Another important distinguishing characteristic is whether it supports set returning functions. I think only plpgsql doe

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Carlo Stonebanks
Well, the surprise for me is: this is exactly what I thought! I actually do have a lot of string manipulation to do, but I am the only one on the team with Tcl experience. For the sake of other developers I thought that the plPHP project would be interesting, but I don't get the impression that

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Merlin Moncure
On 8/1/06, Christopher Browne <[EMAIL PROTECTED]> wrote: Martha Stewart called it a Good Thing when "Carlo Stonebanks" <[EMAIL PROTECTED]> wrote: > I am interested in finding out a "non-religious" answer to which > procedural language has the richest and most robust implementation > for Postgres

Re: [GENERAL] Can you run out of oids?

2006-08-01 Thread Tom Lane
"Chris Hoover" <[EMAIL PROTECTED]> writes: > Since we upgraded to 8.1.3, I noticed that I can create tables without an > oid column. I am wondering if I should consider trying to rebuild the > existing tables to be built without OID. As things are currently set up, a table that's uselessly using

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Merlin Moncure
On 8/1/06, Ian Harding <[EMAIL PROTECTED]> wrote: On 8/1/06, Christopher Browne <[EMAIL PROTECTED]> wrote: > Martha Stewart called it a Good Thing when "Carlo Stonebanks" <[EMAIL PROTECTED]> wrote: > > I am interested in finding out a "non-religious" answer to which > > procedural language has t

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Ian Harding
On 8/1/06, Christopher Browne <[EMAIL PROTECTED]> wrote: Martha Stewart called it a Good Thing when "Carlo Stonebanks" <[EMAIL PROTECTED]> wrote: > I am interested in finding out a "non-religious" answer to which > procedural language has the richest and most robust implementation > for Postgres

Re: [GENERAL] Best Procedural Language?

2006-08-01 Thread Christopher Browne
Martha Stewart called it a Good Thing when "Carlo Stonebanks" <[EMAIL PROTECTED]> wrote: > I am interested in finding out a "non-religious" answer to which > procedural language has the richest and most robust implementation > for Postgres. C is at the bottom of my list because of how much > damag

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Gregory Stark
"Ian Harding" <[EMAIL PROTECTED]> writes: > > However that just doesn't work, because listen is broken, allow me to > > illustrate, here A and B are two clients: > > > > A: BEGIN > > A: SELECT * FROM foo and cache the result. > > A: LISTEN foochange > > B: BEGIN > > B: update foo > > B: NOTIFY foo

Re: [GENERAL] proper use of array datatype

2006-08-01 Thread Reece Hart
Eric Andrews wrote: > I am not much of a schema designer and have a general questoin about > the proper use of the array datatype. In my example, I have > destinations, and destinations can have multiple boxes, and inside > those boxes are a set of contents. what I want to do is search and > ba

Re: [GENERAL] proper use of array datatype

2006-08-01 Thread Erik Jones
Eric Andrews wrote: hello all, I am not much of a schema designer and have a general questoin about the proper use of the array datatype. In my example, I have destinations, and destinations can have multiple boxes, and inside those boxes are a set of contents. what I want to do is search and ba

Re: [GENERAL] proper use of array datatype

2006-08-01 Thread Eric Andrews
On 8/1/06, Nikolay Samokhvalov <[EMAIL PROTECTED]> wrote: On 8/1/06, Eric Andrews <[EMAIL PROTECTED]> wrote: > ... and inside > those boxes are a set of contents. what I want to do is search and > basically "mine" data from the content sets. do I use an array > datatype for the content column, or

Re: [GENERAL] money type depreciated?

2006-08-01 Thread Martijn van Oosterhout
On Tue, Aug 01, 2006 at 10:37:35PM +, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2006-08-01 10:18:45 -0700: > > I read in the documentation that the money type is depreciated. It > > says to use the to_char function and NUMERIC/decimal instead. Why was > > the money type depreciated when

Re: [GENERAL] money type depreciated?

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-01 10:18:45 -0700: > I read in the documentation that the money type is depreciated. It > says to use the to_char function and NUMERIC/decimal instead. Why was > the money type depreciated when it was so useful? How would be the > best way to use to_char and numeri

Re: [GENERAL] Autovacuum help..

2006-08-01 Thread Martijn van Oosterhout
On Tue, Aug 01, 2006 at 11:48:04AM -0700, Sundar Narayanaswamy wrote: > Now, in this situation, if some databases stay in "Idle in transaction", > would the dead rows be unremovable from other databases (that are in "idle" > state) as well ? In other words, should ALL of the databases/connections >

Re: [GENERAL] proper use of array datatype

2006-08-01 Thread Nikolay Samokhvalov
On 8/1/06, Eric Andrews <[EMAIL PROTECTED]> wrote: ... and inside those boxes are a set of contents. what I want to do is search and basically "mine" data from the content sets. do I use an array datatype for the content column, or is there a better more efficient way to go about this? What kin

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Ian Harding
On 8/1/06, Flemming Frandsen <[EMAIL PROTECTED]> wrote: I have an application that does aggresive caching of data pulled from the database, it even keeps the objects cached between transactions. Normally this works very well and when the cache is warmed up about 90% of the database time is saved

Re: [GENERAL] Can you run out of oids?

2006-08-01 Thread Joshua D. Drake
Martijn van Oosterhout wrote: On Tue, Aug 01, 2006 at 02:02:18PM -0400, Chris Hoover wrote: Somewhat silly question, but is it possible to run out of OID's? Nope. When you reach 4 billion, they just start again at zero. O.k. but there is a catch.. if you are using them, they can and will wr

[GENERAL] proper use of array datatype

2006-08-01 Thread Eric Andrews
hello all, I am not much of a schema designer and have a general questoin about the proper use of the array datatype. In my example, I have destinations, and destinations can have multiple boxes, and inside those boxes are a set of contents. what I want to do is search and basically "mine" data f

Re: [GENERAL] Autovacuum help..

2006-08-01 Thread Sundar Narayanaswamy
> Well, you need to work out why they are unremovable. For example, do > you have any really long lived open transactions. These are generally a > bad idea, for all sorts of reasons. If you don't commit occasionally, > none of your changes will be visible to anyone else. I have multiple databases

Re: [GENERAL] prepare, execute & oids

2006-08-01 Thread Michael Fuhr
On Tue, Aug 01, 2006 at 06:19:29PM +0200, phazon wrote: > I juste want to get the OID of the line inserted. Does anyone know how to do > it ? It depends on the client interface. What interface are you using? OIDs are deprecated as row identifiers; the preferred method is to use a sequence (seria

Re: [GENERAL] Can you run out of oids?

2006-08-01 Thread Michael Fuhr
On Tue, Aug 01, 2006 at 02:02:18PM -0400, Chris Hoover wrote: > Somewhat silly question, but is it possible to run out of OID's? It depends on what you mean by "run out." As the FAQ and documentation mention, OIDs wrap around and aren't guaranteed to be unique. http://www.postgresql.org/docs/faq

[GENERAL] Where do Tcl questions go?

2006-08-01 Thread Carlo Stonebanks
I have been trying to figure out where to put my plTcl questions, and where the people most knowledgable about that topic may be – either on these mail lists or elsewhere.   Postgres docs makes reference to scripts called: pltcl_loadmod, pltcl_listmod, pltcl_delmod – but I can’t find them

Re: [GENERAL] Can you run out of oids?

2006-08-01 Thread Martijn van Oosterhout
On Tue, Aug 01, 2006 at 02:02:18PM -0400, Chris Hoover wrote: > Somewhat silly question, but is it possible to run out of OID's? Nope. When you reach 4 billion, they just start again at zero. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his a

[GENERAL] Can you run out of oids?

2006-08-01 Thread Chris Hoover
Somewhat silly question, but is it possible to run out of OID's?Since we upgraded to 8.1.3, I noticed that I can create tables without an oid column.  I am wondering if I should consider trying to rebuild the existing tables to be built without OID.  If it is possible to run out of OID's, how can

Re: [GENERAL] LISTEN considered dangerous

2006-08-01 Thread Karsten Hilbert
On Tue, Aug 01, 2006 at 07:16:39PM +0200, Flemming Frandsen wrote: > This way we could even have wildcard listens, imagine doing a listen % > and getting all the generated events:) That'd be awesome. Along with a data field in the listen structure, please :-) Karsten -- GPG key ID E4071346 @ ww

[GENERAL] money type depreciated?

2006-08-01 Thread Karen Hill
I read in the documentation that the money type is depreciated. It says to use the to_char function and NUMERIC/decimal instead. Why was the money type depreciated when it was so useful? How would be the best way to use to_char and numeric to replace that type since I don't want to be using a d

[GENERAL] LISTEN considered dangerous

2006-08-01 Thread Flemming Frandsen
I have an application that does aggresive caching of data pulled from the database, it even keeps the objects cached between transactions. Normally this works very well and when the cache is warmed up about 90% of the database time is saved. However that leaves the problem of how to notice th

Re: [GENERAL] Performance/Issues with CMP and JBoss

2006-08-01 Thread Douglas McNaught
"Andy Dale" <[EMAIL PROTECTED]> writes: > The current problem we seem to have is that the data is persisted ok > (or at least it seems to be in there with pgadmin), but cannot be > read back out of the database all the time (in fact for about 90% of > the time), the current behaviour of the applic

Re: [GENERAL] Postgres on 64bit Windows Server with WOW64

2006-08-01 Thread Mont Rothstein
Thanks for the info.  Good to hear from someone that has actually used WOW64 successfully.Thanks,-MontOn 8/1/06, DANTE Alexandra < [EMAIL PROTECTED]> wrote:Hello Mont, hello List,I am the person who wrote these threads and since, I haven't found the solution to compile PostgreSQL on Windows 64 bits

[GENERAL] prepare, execute & oids

2006-08-01 Thread phazon
Hello, i've this kind of query:PREPARE preparedInsert (varchar) AS  INSERT INTO my_table (my_field)  VALUES ($1);  ');and i use it with: EXECUTE preparedInsert ('test'); I juste want to get the OID of the line inserted. Does anyone know how to do it ?Thanks,Phazon

Re: [GENERAL] pg_restore performance on solaris 10/6

2006-08-01 Thread Vivek Khera
On Jul 31, 2006, at 3:45 PM, Thomas Burns wrote: our database literally takes 8 times longer on the x4200 as it does on OS X (the x4200 hardware should be considerably faster -- it has better for a restore like this, bump up the value of checkpoint_segments to some large value (I use 256

Re: [GENERAL] Autovacuum help..

2006-08-01 Thread John Purser
On Tue, 1 Aug 2006 08:02:59 -0700 (PDT) Sundar Narayanaswamy <[EMAIL PROTECTED]> wrote: > Hi, > > I need your help/suggestions with a problem I am facing related to > autovacuum. > > I am using PostgreSQL 8.1.2 through a JDBC connection. The connection > is long lived (established when the appli

[GENERAL] Performance/Issues with CMP and JBoss

2006-08-01 Thread Andy Dale
Hi,We currently have an JBoss web application that persists a byte array it recieves (Using the EJB persistence API), and then tries to read it from the Database again from further parsing.  The application works really well with the default Hypersonic datasource, but it will not work correctly whe

Re: [GENERAL] Autovacuum help..

2006-08-01 Thread Martijn van Oosterhout
On Tue, Aug 01, 2006 at 08:02:59AM -0700, Sundar Narayanaswamy wrote: > I need your help/suggestions with a problem I am facing related to autovacuum. > > I am using PostgreSQL 8.1.2 through a JDBC connection. The connection is > long lived (established when the application starts up and is close

[GENERAL] Autovacuum help..

2006-08-01 Thread Sundar Narayanaswamy
Hi, I need your help/suggestions with a problem I am facing related to autovacuum. I am using PostgreSQL 8.1.2 through a JDBC connection. The connection is long lived (established when the application starts up and is closed only when the application is shutdown). I have enabled the autovacuu

Re: [GENERAL] Where did the compat-postgresql-libs rpm get to?

2006-08-01 Thread Devrim GUNDUZ
Hello, On Tue, 2006-08-01 at 14:51 +, Karl O. Pinc wrote: > Whatever happened to the rpm packaging of the 7.x libpq? > (Which enabled programs linked against the old libraries > to be used with a 8.x. postgresql.) http://developer.postgresql.org/~devrim/rpms/compat/ Regards, -- The Postgr

[GENERAL] Where did the compat-postgresql-libs rpm get to?

2006-08-01 Thread Karl O. Pinc
Hi, Whatever happened to the rpm packaging of the 7.x libpq? (Which enabled programs linked against the old libraries to be used with a 8.x. postgresql.) Last time I went looking for it I couldn't find it. Thanks. Karl <[EMAIL PROTECTED]> Free Software: "You don't pay back, you pay forward."

Re: [GENERAL] Dynamic pgplsql triggers

2006-08-01 Thread Worky Workerson
I don't think it's possible. however, what is possible and achieves roughly the same affect is to query the system catalogs (or information schema) and via dynamic sql cut trigger funtions/procedures by looping the results of your query. non-dynamic sql will usually be a bit faster than dynamic

Re: [GENERAL] Dynamic pgplsql triggers

2006-08-01 Thread Worky Workerson
I have scanned the archives and found the following message from 2004 dealing with v7.4, however it doesn't solve all my problems: http://archives.postgresql.org/pgsql-sql/2004-07/msg00208.php Here is a brief example. I have a table db with a merge trigger given below, shamelessly stolen from E

Re: [GENERAL] Dynamic pgplsql triggers

2006-08-01 Thread Merlin Moncure
On 7/31/06, Worky Workerson <[EMAIL PROTECTED]> wrote: I'm trying to trigger a whole bunch of partitions at once (initial DB setup) using the same plpgsql trigger. The trigger is basically the merge trigger in the docs (i.e. UPDATE IF NOT FOUND RETURN NEW ...). I need to use the TG_RELNAME vari

Re: [GENERAL] Unicode sorting problem

2006-08-01 Thread Martijn van Oosterhout
On Mon, Jul 31, 2006 at 09:34:08PM +0400, David Jorjoliani wrote: > ka_GE.UTF-8 is Georgian locale. > When run sql query with "order" of "text" or "varchar" field with > Georgian unicode data inside, result is totally wrong. > Can somebody help me? Please define "wrong". What OS? What version of

[GENERAL] pg_restore performance on solaris 10/6

2006-08-01 Thread Thomas Burns
Hi, We recently started using a Sun x4200 with Solaris 10/6 (the release from jun of 2006) and postgresql 8.1.3. I think I may need to do some tuning, but have no idea what to change. Using pg_restore to restore our database literally takes 8 times longer on the x4200 as it does on OS X (the x4

[GENERAL] Unicode sorting problem

2006-08-01 Thread David Jorjoliani
Hi, I have problem with UTF-8 database sorting. Postgres initialized with: --locale=ka_GE.UTF-8 --lc-collate=ka_GE.UTF-8 "show all;" command shows: ... lc_collate | ka_GE.UTF-8 | Shows the collation order locale. lc_ctype| ka_GE.UTF-8

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Tom Lane
Chris Mair <[EMAIL PROTECTED]> writes: >> http://www.postgresql.org/docs/8.1/interactive/triggers.html >> " It is not currently possible to write a trigger function in the >> plain SQL function language. " > The whole paragraph says. > "It is also possible to write a trigger function in C, althou

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Chris Mair
> http://www.postgresql.org/docs/8.1/interactive/triggers.html > > it says something like this: > > " It is not currently possible to write a trigger function in the > plain SQL function language. " The whole paragraph says. "It is also possible to write a trigger function in C, although mos

Re: [GENERAL] Error in PostgreSQL query with psycopg

2006-08-01 Thread Martijn van Oosterhout
On Mon, Jul 31, 2006 at 09:47:40PM -0400, John D. Burger wrote: > >never, never, never try quoting on your own! You can only fail. The > >only choice is to fail now or later. > > Nonetheless, in case it's useful, here's a barebones wrapper I call on > everything: It'll work fine on single byte

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-01 02:35:48 -0400: > On 8/1/06, Roman Neuhauser <[EMAIL PROTECTED]> wrote: > > > ># [EMAIL PROTECTED] / 2006-07-31 11:58:49 -0400: > >> Actually Postgres manual of triggers says that in postgres, you can't > >write > >> a trigger in conventional sql. You have to write

Re: [GENERAL] Corrupted DB? could not open file pg_clog/####

2006-08-01 Thread Martijn van Oosterhout
On Mon, Jul 31, 2006 at 06:09:33PM -0400, Francisco Reyes wrote: > Martijn van Oosterhout writes: > > >That's when you've reached the end of the table. The point is that > >before then you'll have found the value of N that produces the error. > > Will be a while.. my little python script is doing

Re: [GENERAL] Postgres on 64bit Windows Server with WOW64

2006-08-01 Thread DANTE Alexandra
Hello Mont, hello List, I am the person who wrote these threads and since, I haven't found the solution to compile PostgreSQL on Windows 64 bits...Instead, I used a 32 bit release of PostgreSQL on Windows 64 bits. I worked with "Microsoft Windows Server 2003, Enterprise Edition with SP1 for It

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Jasbinder Bali
http://www.postgresql.org/docs/8.1/interactive/triggers.html   it says something like this:   " It is not currently possible to write a trigger function in the plain SQL function language. "   though lately I saw triggers written in pure sql in postgres   ~jas  On 8/1/06, Roman Neuhauser <[EMAIL PR

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-31 11:58:49 -0400: > Actually Postgres manual of triggers says that in postgres, you can't write > a trigger in conventional sql. You have to write it in a procedural language > like C. So wanted some more insight on it. > ~Jas Where does it say so? Do you have a