Re: [GENERAL] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Nikola Milutinovic
Premsun Choltanwanich wrote: Dear All, I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody who get my application database will be have a full control permissio

Re: [GENERAL] [JDBC] pg_locks.transaction field type

2005-08-17 Thread Joseph Shraibman
So basically what needs to be changed is TypeInfoCache.java & Oid.java Alvaro Herrera wrote: On Thu, Aug 18, 2005 at 03:55:43PM +1200, Oliver Jowett wrote: Joseph Shraibman wrote: The column's type is 'xid' which the driver doesn't currently handle, so it gets put into the "wrap it in PGob

Re: [GENERAL] [JDBC] pg_locks.transaction field type

2005-08-17 Thread Oliver Jowett
Joseph Shraibman wrote: The column's type is 'xid' which the driver doesn't currently handle, so it gets put into the "wrap it in PGobject" bucket. Is xid a type of number? It's an internal backend type; I'm not familiar with the details. Perhaps your server should convert instances of PGob

Re: [GENERAL] [JDBC] pg_locks.transaction field type

2005-08-17 Thread Joseph Shraibman
Oliver Jowett wrote: Joseph Shraibman wrote: Is it a jdbc bug that is returning the answer as org.postgresql.util.PGobject instead of some kind of Number? The column's type is 'xid' which the driver doesn't currently handle, so it gets put into the "wrap it in PGobject" bucket. Is xid a

Re: [GENERAL] [JDBC] pg_locks.transaction field type

2005-08-17 Thread Oliver Jowett
Joseph Shraibman wrote: Is it a jdbc bug that is returning the answer as org.postgresql.util.PGobject instead of some kind of Number? The column's type is 'xid' which the driver doesn't currently handle, so it gets put into the "wrap it in PGobject" bucket. I'm not sure what's changed betwe

[GENERAL] pg_locks.transaction field type

2005-08-17 Thread Joseph Shraibman
I have a method in my rmi server that takes a query and returns an Object[][]. I had this query: SELECT (select relname from pg_catalog.pg_class where relfilenode = relation) as relname, * FROM pg_locks; After upgrading from 7.4 to 8.0 I was getting this problem: WARNING: Servlet.service() f

[GENERAL] How to secure PostgreSQL Data for distribute?

2005-08-17 Thread Premsun Choltanwanich
Dear All,   I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody  who get my application database will be have a full control permission on my database in case that Pos

Re: [GENERAL] trigger question

2005-08-17 Thread Michael Fuhr
[Please copy the mailing list on replies so others can contribute to and learn from the discussion.] On Wed, Aug 17, 2005 at 08:17:43PM -0500, Apu Islam wrote: > However, I still get the error.. here is a sample very trim down version. > I think the "hour" is the problem child. Anyone can give me

Re: [GENERAL] speeding up a query on a large table

2005-08-17 Thread Kevin Murphy
Mike Rylander wrote: On 8/17/05, Manfred Koizar <[EMAIL PROTECTED]> wrote: On Mon, 25 Jul 2005 17:50:55 -0400, Kevin Murphy <[EMAIL PROTECTED]> wrote: and because the number of possible search terms is so large, it would be nice if the entire index could somehow be preloaded into memor

Re: [GENERAL] Field order

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 17:40:34 -0500, "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > Ugh, and here I'd been doing it the other way around. I assume > variable-length stuff should always go last, right? I think it depends on the alignment of the type. Certain text, char and varchar should go at

Re: [GENERAL] Field order

2005-08-17 Thread Michael Schmidt
Thanks for the comments and help!  I'll set column order accordingly.  

[GENERAL] test

2005-08-17 Thread Dr NoName
wtf? my messages are not getting posted Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs ---(end of broadcast)--- TIP 9: In versions below 8.0, t

Re: [GENERAL] Field order

2005-08-17 Thread Jim C. Nasby
On Wed, Aug 17, 2005 at 03:24:58PM -0500, Bruno Wolff III wrote: > On Wed, Aug 17, 2005 at 12:09:12 -0600, > Michael Schmidt <[EMAIL PROTECTED]> wrote: > > I've searched the archives and found this question was asked in 2001 but > > never answered. Does the order of fields in a table make a dif

Re: [GENERAL] COMMIT in ps output

2005-08-17 Thread Dr NoName
yep. looks like it was the library. thanks, Eugene --- Bruce Momjian wrote: > Tom Lane wrote: > > Dr NoName <[EMAIL PROTECTED]> writes: > > > ... My question is, would > > > postgresql ps string show COMMIT at the end of > > > INSERT/UPDATE even if explicit transactions are > not > > > used?

[GENERAL] Are these normal?

2005-08-17 Thread Oluwatope Akinniyi
Hi, I am sorry if I have to post this the third term having not recieved any response on the earlier two posts. I had also checked the archive for a possible answer but could get any. I installed a working SSL Certificate on Windows XPSP2 and Fedora Core 4. The PostgreSQL 8.0.3 Documentation s

Re: [despammed] [GENERAL] Generating random values.

2005-08-17 Thread Fernando Lujan
On 8/17/05, A. Kretschmer <[EMAIL PROTECTED]> wrote: > select substring(md5(random()) from 5 for 15); Thanks everybody, this solution will fullfill my needs... ;) Sincerely, Fernando Lujan ---(end of broadcast)--- TIP 9: In versions below 8.0, t

Re: [GENERAL] Schema design question

2005-08-17 Thread Matt Miller
On Wed, 2005-08-17 at 13:40 -0700, Bill Moseley wrote: > a course > and class share so many columns. ...and > I worry about changing a column type on one table and forgetting to > change it on the other table. Postgres types might help here. You could probably create a type that contains the com

Re: [GENERAL] speeding up a query on a large table

2005-08-17 Thread Mike Rylander
On 8/17/05, Manfred Koizar <[EMAIL PROTECTED]> wrote: > On Mon, 25 Jul 2005 17:50:55 -0400, Kevin Murphy > <[EMAIL PROTECTED]> wrote: > > and because the number of possible search terms is so large, it > >would be nice if the entire index could somehow be preloaded into memory > >and encouraged to

Re: [GENERAL] Field order

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 12:09:12 -0600, Michael Schmidt <[EMAIL PROTECTED]> wrote: > I've searched the archives and found this question was asked in 2001 but > never answered. Does the order of fields in a table make a difference? In > Paradox (from whence I come), there was some belief that

Re: [GENERAL] COMMIT in ps output

2005-08-17 Thread Bruce Momjian
Tom Lane wrote: > Dr NoName <[EMAIL PROTECTED]> writes: > > ... My question is, would > > postgresql ps string show COMMIT at the end of > > INSERT/UPDATE even if explicit transactions are not > > used? > > No. My guess is that his interface library is doing it. -- Bruce Momjian

Re: [GENERAL] How to "ping" the database

2005-08-17 Thread Tom Lane
Bill Moseley <[EMAIL PROTECTED]> writes: > I'm about to post a bug report on DBD::Pg, but I'm wondering if anyone > here could suggest a better way to implement ping() that doesn't fail > just because Postgresql is not allowing SELECTS. I think you could just send an empty query string and see if

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 11:57:52 -0700, Ron Mayer <[EMAIL PROTECTED]> wrote: > Richard Huxton wrote: > > > >While the other answers all do their job, and in one go too, I'd be > >surprised if you found anything faster than: > > > >SELECT myval FROM mytable WHERE myval > 1234 ORDER BY myval LIMIT

Re: [GENERAL] Adding contrib modules

2005-08-17 Thread Mario Guenterberg
Jonathan Villa schrieb: > Thanks... at least know I'm doing to correctly... but I still get the > errors. I've done everything as it states on the tsearch-V2-intro.html > page... and then I run > > psql ftstest < tsearch2.sql &> fts.out > > for testing of course > > the fts.out file has thing

Re: [GENERAL] speeding up a query on a large table

2005-08-17 Thread Manfred Koizar
On Mon, 25 Jul 2005 17:50:55 -0400, Kevin Murphy <[EMAIL PROTECTED]> wrote: > and because the number of possible search terms is so large, it >would be nice if the entire index could somehow be preloaded into memory >and encouraged to stay there. Postgres does not have such a feature and I wouldn

Re: [GENERAL] postgres 8.x on debian

2005-08-17 Thread Martijn van Oosterhout
On Wed, Aug 17, 2005 at 09:48:35PM +0200, Mario Guenterberg wrote: > marcelo Cortez schrieb: > > Hello all, > > > > does anyone know, whether there is a > > Debian Package for postgresql 8.x for stable version? > > Thanks in advance. > > There is no original package for postgresql v 8.x for debia

Re: [GENERAL] How to "ping" the database

2005-08-17 Thread Bill Moseley
On Wed, Aug 17, 2005 at 04:25:48PM -0400, Tom Lane wrote: > Of course, this begs the question of what ping is really supposed to > test and when it's supposed to be allowable. The above will not work > if in the middle of retrieving a query result, for example. Well, there's that. I'm not really

Re: [GENERAL] PostgreSQL 8.0.3 limiting max_connections to 64 ?

2005-08-17 Thread Tom Lane
eu <[EMAIL PROTECTED]> writes: > max_connections, shared_buffers, shmmax were tweaked, but the server > does not seems to respect the 500 max_connections... Er ... did you restart the postmaster after increasing those parameters? regards, tom lane ---

Re: [GENERAL] postgres 8.x on debian

2005-08-17 Thread Mario Guenterberg
Mario Guenterberg schrieb: > marcelo Cortez schrieb: > >>Hello all, >> >>does anyone know, whether there is a >>Debian Package for postgresql 8.x for stable version? >>Thanks in advance. > > > There is no original package for postgresql v 8.x for debian sarge/stable. > The only original package

Re: [GENERAL] Schema design question

2005-08-17 Thread Bill Moseley
On Wed, Aug 17, 2005 at 07:41:20PM +, Matt Miller wrote: Thanks for responding, Matt: > create table course (id serial primary key, > description varchar); > create table teacher (id serial primary key, > name varchar); > create table course_teacher

Re: [GENERAL] COMMIT in ps output

2005-08-17 Thread Tom Lane
Dr NoName <[EMAIL PROTECTED]> writes: > ... My question is, would > postgresql ps string show COMMIT at the end of > INSERT/UPDATE even if explicit transactions are not > used? No. regards, tom lane ---(end of broadcast)---

Re: [GENERAL] Schema design question

2005-08-17 Thread Sebastian Hennebrueder
Bill Moseley schrieb: >On Wed, Aug 17, 2005 at 10:05:39PM +0200, Sebastian Hennebrueder wrote: > > >>> Con: Column duplication in the two tables -- two tables look a lot alike >>> Need to have duplicate link tables (one pointing to each table) >>> >>> >>> >>> >>They are not duplicate

Re: [GENERAL] Schema design question

2005-08-17 Thread Matt Miller
On Wed, 2005-08-17 at 10:49 -0700, Bill Moseley wrote: > The parent object is a general course description, and the > child object is a specific instance of a course > ... > tables that represent classes taught at a > school. The parent object is a general course ... the > child object is ... a "c

Re: [GENERAL] PostgreSQL 8.0.3 limiting max_connections to 64 ?

2005-08-17 Thread Joshua D. Drake
max_connections, shared_buffers, shmmax were tweaked, but the server does not seems to respect the 500 max_connections... i *know* i'm missing something obvious, but, what could be wrong ?... i'm lost... any help would be most appreciated... please. A completely stupid response but don't take

Re: [GENERAL] postgres 8.x on debian

2005-08-17 Thread Mario Guenterberg
marcelo Cortez schrieb: > Hello all, > > does anyone know, whether there is a > Debian Package for postgresql 8.x for stable version? > Thanks in advance. There is no original package for postgresql v 8.x for debian sarge/stable. The only original package for this postgresql version is in unstabl

[GENERAL] COMMIT in ps output

2005-08-17 Thread Dr NoName
Hi all, While investigating the causes of the deadlock I described previously, we noticed that ps output would often show some postgresql processes doing COMMIT. The developer in charge of the application(*) assures me that they are not using transactions (or at least not in any of the code he che

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Peter Fein
Richard Huxton wrote: > Poul Møller Hansen wrote: > >> Does anyone know how to find the row with the nearest numeric value, >> not necessarily an exact match ? > > > While the other answers all do their job, and in one go too, I'd be > surprised if you found anything faster than: > > SELECT myv

Re: [GENERAL] PostgreSQL 8.0.3 limiting max_connections to 64 ?

2005-08-17 Thread Sven Willenberger
On Wed, 2005-08-17 at 13:05 -0300, eu wrote: > Hello, i need help... > > i have a postgresql 8.0.3 database running on the backend of a postfix > setup ( i didn't trust Mysql for the job ) on Linux kernel 2.6.8.1, > serving email to a dozen different virtual domains ( including this one > i'm u

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Ron Mayer
Richard Huxton wrote: While the other answers all do their job, and in one go too, I'd be surprised if you found anything faster than: SELECT myval FROM mytable WHERE myval > 1234 ORDER BY myval LIMIT 1 Really? Aren't most things with ORDER BY O(n*log(n))? Or is the optimizer smart enou

Re: [GENERAL] postgres 8.x on debian

2005-08-17 Thread A. Kretschmer
am 17.08.2005, um 15:12:55 -0300 mailte marcelo Cortez folgendes: > Hello all, > > does anyone know, whether there is a > Debian Package for postgresql 8.x for stable version? > Thanks in advance. I'm useing 8.0.3 from testing in Debian/Stable without problems. Regards, Andreas -- Andreas Kre

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Poul Møller Hansen
To find the nearest value in number_column to some CONSTANT (where you replace constant with a number), try: select *,(number_column - CONSTANT)^2 as d from tablename order by d limit 1; Does that do it for you? Sean It does ideed, not that I understood how, but I will find out. Thank you v

Re: [GENERAL] table clustering brings joy

2005-08-17 Thread Ron Mayer
Greg Stark wrote: clustering... That will only help if you're often retrieving moderately large result sets by one particular index. If you normally only retrieve one record at a time or from lots of different indexes then it probably won't really make much difference. It'll also help for colu

[GENERAL] Schema design question

2005-08-17 Thread Bill Moseley
I originally was planning on asking about Postgresql inheritance, but after reading the docs again I do not think that it applies to my design. So, now I'm asking a rather basic schema design question. I have two related objects where one inherits column values from another. No, that's incorrect

Re: [despammed] [GENERAL] Generating random values.

2005-08-17 Thread A. Kretschmer
am 17.08.2005, um 13:48:38 -0300 mailte Fernando Lujan folgendes: > Hi folks, > > I have a table wich contains my users... I want to insert to each user > a random password, so I need a random function. Is there such function > in Postgres? I just found the RANDOM which generates values between >

Re: [GENERAL] Adding contrib modules

2005-08-17 Thread Jonathan Villa
> Jonathan Villa schrieb: > >> thanks, that seemed to work ok... now.. how do I use tsearch2? meaning, >> how do I run the script? is it against the database I was to use it >> with? >> example >> >> psql -d mytestdb < tsearch2.sql >> >> Granted, this is a new database that has not worked with t

[GENERAL] postgres 8.x on debian

2005-08-17 Thread marcelo Cortez
Hello all, does anyone know, whether there is a Debian Package for postgresql 8.x for stable version? Thanks in advance. MDC __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! ¡Abrí tu cuenta ya! - http://correo.yaho

Re: [GENERAL] Generating random values.

2005-08-17 Thread Chris Travers
Hi Fernando; I think that PL/Perl would be the easiest language to use in this case. However, you could use PL/PGSQL and do something like: 1) Generate a random number (RANDOM()) and multiply it by a base value, and add something to it to bring it within a certain range. 2) Look up the ASCII

[GENERAL] Field order

2005-08-17 Thread Michael Schmidt
I've searched the archives and found this question was asked in 2001 but never answered.  Does the order of fields in a table make a difference?  In Paradox (from whence I come), there was some belief that reliability was increased if memo (text) fields were placed at the end of the table. 

Re: [GENERAL] PostgreSQL 8.0.3 limiting max_connections to 64 ?

2005-08-17 Thread Sebastian Hennebrueder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 eu schrieb: > Hello, i need help... > > i have a postgresql 8.0.3 database running on the backend of a postfix > setup ( i didn't trust Mysql for the job ) on Linux kernel 2.6.8.1, > serving email to a dozen different virtual domains ( including this

Re: [GENERAL] Checking for old transaction snapshots

2005-08-17 Thread Alvaro Herrera
On Sun, Aug 14, 2005 at 11:26:33AM -0400, Greg Stark wrote: > > I have a job that does a big batch delete/insert. I want it to vacuum (or > probably cluster) when it's finished. But I figure I should sleep for a while > before doing the vacuum to be sure there are no old transactions still > runni

Re: [GENERAL] Technical FAQ collecting of infos from the mailing list

2005-08-17 Thread Alvaro Herrera
On Wed, Aug 17, 2005 at 06:47:33PM +0200, Sebastian Hennebrueder wrote: > Before doing this, I am having a question. Do you see in this > collecting, rewriting and structuring of mailing list information a > misuse or a copyright infringement or just would you prefer that > something like this doe

Re: [GENERAL] Technical FAQ collecting of infos from the mailing list

2005-08-17 Thread Bruce Momjian
Sebastian Hennebrueder wrote: > Hello, > > I just read another nice solution for a select problem and an idea came up. > I would like to note and may be rewrite some solutions given here to > development question, tuning etc and put them on my website in a > structured way, so that looking through

Re: [GENERAL] Generating random values.

2005-08-17 Thread Sebastian Hennebrueder
Fernando Lujan schrieb: >Hi folks, > >I have a table wich contains my users... I want to insert to each user >a random password, so I need a random function. Is there such function >in Postgres? I just found the RANDOM which generates values between >0.0 and 1.0. > >Any help or suggestion will be

Re: [GENERAL] Generating random values.

2005-08-17 Thread Joshua D. Drake
Fernando Lujan wrote: Hi folks, I have a table wich contains my users... I want to insert to each user a random password, so I need a random function. Is there such function in Postgres? I just found the RANDOM which generates values between 0.0 and 1.0. Any help or suggestion will be appreciat

Re: [GENERAL] Generating random values.

2005-08-17 Thread Mike Nolan
> I have a table wich contains my users... I want to insert to each user > a random password, so I need a random function. Is there such function > in Postgres? I just found the RANDOM which generates values between > 0.0 and 1.0. If you multiply that random number by a large integer and then trun

Re: [GENERAL] table clustering brings joy

2005-08-17 Thread Greg Stark
Junaili Lie <[EMAIL PROTECTED]> writes: > Quick questions: > For big tables with frequent insert, no update, and frequent read > (using indexes), will clustering help? > what should be done on such table other than regular analyze? > comments are appreciated. If you never have any deletes or upda

[GENERAL] PostgreSQL 8.0.3 limiting max_connections to 64 ?

2005-08-17 Thread eu
Hello, i need help... i have a postgresql 8.0.3 database running on the backend of a postfix setup ( i didn't trust Mysql for the job ) on Linux kernel 2.6.8.1, serving email to a dozen different virtual domains ( including this one i'm using right now )... however, this setup takes a whole

[GENERAL] How to "ping" the database

2005-08-17 Thread Bill Moseley
The Perl DBI interface to Postgresql, module DBD::Pg, has a ping() method that is suppose to determine if a database connection is alive. It can be seen here (see: dbd_db_ping): http://search.cpan.org/src/DBDPG/DBD-Pg-1.43/dbdimp.c It pings by calling: status = _result(imp_dbh, "SELEC

[GENERAL] Technical FAQ collecting of infos from the mailing list

2005-08-17 Thread Sebastian Hennebrueder
Hello, I just read another nice solution for a select problem and an idea came up. I would like to note and may be rewrite some solutions given here to development question, tuning etc and put them on my website in a structured way, so that looking through this is a little easier. Before doing th

[GENERAL] Generating random values.

2005-08-17 Thread Fernando Lujan
Hi folks, I have a table wich contains my users... I want to insert to each user a random password, so I need a random function. Is there such function in Postgres? I just found the RANDOM which generates values between 0.0 and 1.0. Any help or suggestion will be appreciated. :) Fernando Lujan

Re: [GENERAL] Adding contrib modules

2005-08-17 Thread Mario Guenterberg
Jonathan Villa schrieb: > thanks, that seemed to work ok... now.. how do I use tsearch2? meaning, > how do I run the script? is it against the database I was to use it with? > example > > psql -d mytestdb < tsearch2.sql > > Granted, this is a new database that has not worked with tsearch2 bef

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: > The only problem is that you can't use the order by/limit syntax inside > the union queries I guess, cause the query you proposed is giving a > syntax error. Parentheses are your friend ;-) regards, tom lane ---

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 17:35:37 +0200, Csaba Nagy <[EMAIL PROTECTED]> wrote: > The only problem is that you can't use the order by/limit syntax inside > the union queries I guess, cause the query you proposed is giving a > syntax error. I also thought first to do it like this, but it won't > wor

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Csaba Nagy
Yep, you're right. The following works and uses the index on pk_col: prepare test_01 (bigint) as select * from ( (SELECT * FROM big_table WHERE pk_col > $1 ORDER BY pk_col LIMIT 1) UNION ALL (SELECT * FROM big_table WHERE pk_col < $1 ORDER BY pk_col DESC LIMIT 1) ) as nearest order

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Csaba Nagy
The only problem is that you can't use the order by/limit syntax inside the union queries I guess, cause the query you proposed is giving a syntax error. I also thought first to do it like this, but it won't work. If it would, then you could wrap the thing in another query which orders by the diffe

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Sean Davis
On 8/17/05 10:01 AM, "Poul Møller Hansen" <[EMAIL PROTECTED]> wrote: > >> To find the nearest value in number_column to some CONSTANT (where you >> replace constant with a number), try: >> >> select *,(number_column - CONSTANT)^2 as d from tablename order by d limit >> 1; >> >> Does that do it

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Richard Huxton
Poul Møller Hansen wrote: Does anyone know how to find the row with the nearest numeric value, not necessarily an exact match ? While the other answers all do their job, and in one go too, I'd be surprised if you found anything faster than: SELECT myval FROM mytable WHERE myval > 1234 ORDER

Re: [GENERAL] Adding contrib modules

2005-08-17 Thread Jonathan Villa
> Jonathan Villa schrieb: >> I'm having some trouble getting one of the contrib modules to load >> correctly... >> >> it's for tsearch2.sql >> >> I've tried >> >> ./configure --prefix=/usr/local/pgsql >> gmake all >> gmake install >> >> and I've also tried, from the contrib/tsearch2/ dir, >> >> gma

Re: [GENERAL] Postgresql server "crash" after some day

2005-08-17 Thread Tom Lane
"Stefano B." <[EMAIL PROTECTED]> writes: > I can make a connection from local host but I can't from remote host. If = > I try to make a connection from remote host the server returns me the = > classic remote error: > could not connect to server ... is the server running on host ... = > and ac

Re: [GENERAL] How to implement table caching

2005-08-17 Thread Jim C. Nasby
There is also http://people.freebsd.org/~seanc/pgmemcache/ On Mon, Aug 15, 2005 at 04:54:31PM -0500, Thomas F. O'Connell wrote: > Andrus, > > You might consider something like materialized views: > > http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html > > Whether table cachin

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Peter Fein
Sean Davis wrote: > On 8/17/05 8:50 AM, "Poul Møller Hansen" <[EMAIL PROTECTED]> wrote: > > >>Does anyone know how to find the row with the nearest numeric value, not >>necessarily an exact match ? > > > To find the nearest value in number_column to some CONSTANT (where you > replace constant w

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Csaba Nagy
[snip] > To find the nearest value in number_column to some CONSTANT (where you > replace constant with a number), try: > > select *,(number_column - CONSTANT)^2 as d from tablename order by d limit > 1; > This will scan the whole table and sort the results... and then pick just one of it. Watch

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Poul Møller Hansen
To find the nearest value in number_column to some CONSTANT (where you replace constant with a number), try: select *,(number_column - CONSTANT)^2 as d from tablename order by d limit 1; Does that do it for you? Sean It does ideed, not that I understood how, but I will find out. Thank you

Re: [GENERAL] cobol storedprocedures

2005-08-17 Thread Christopher Browne
> I've been scanning the postgres website and yours to find out any > information on cobol stored procedures. Is there any plans on > incorporating this in future releases? Not really. The 'preferred' sorts of languages to include for stored procedures tend to be interpreted languages. There is

Re: [GENERAL] Finding nearest numeric value

2005-08-17 Thread Sean Davis
On 8/17/05 8:50 AM, "Poul Møller Hansen" <[EMAIL PROTECTED]> wrote: > Does anyone know how to find the row with the nearest numeric value, not > necessarily an exact match ? To find the nearest value in number_column to some CONSTANT (where you replace constant with a number), try: select *,(num

Re: [GENERAL] Postgresql server "crash" after some day

2005-08-17 Thread Tino Wildenhain
Stefano B. schrieb: Hi all, I have some strange problems with postgres. After some days it works in local but it doesn't listen on port 5432 for remote request. I can make a connection from local host but I can't from remote host. If I try to make a connection from remote host the server re

Re: [GENERAL] Postgresql server "crash" after some day

2005-08-17 Thread Csaba Nagy
Is it possible that you're application is not closing connections, and the server has a limit on connection count, and that is reached in a few days ? Actually I'm not sure if the "max_connections" parameter is applicable to local connections too, cause in that case you shouldn't be able to connect

Re: [GENERAL] BUG #1830: Non-super-user must be able to copy from a file

2005-08-17 Thread Bruno Wolff III
On Wed, Aug 17, 2005 at 09:22:16 +0100, Bernard <[EMAIL PROTECTED]> wrote: > > The following bug has been logged online: This isn't a bug and you really should have asked this question on another list. I am moving the discussion over to the general list. > > Bug reference: 1830 > Logged

Re: [GENERAL] Set autocommit to off

2005-08-17 Thread Tino Wildenhain
Andreas Kretschmer schrieb: Aliomar Mariano Rego <[EMAIL PROTECTED]> schrieb: Does somebody knows why the Postgresql 7.4.8 or later doesn't supports the option "SET AUTOCOMMIT TO OFF"? \set AUTOCOMMIT off works fine in 8.0.3 yes, buts psql, not the backend :-) --

Re: [GENERAL] Set autocommit to off

2005-08-17 Thread Michael Fuhr
On Wed, Aug 17, 2005 at 08:24:00AM +, Aliomar Mariano Rego wrote: > Does somebody knows why the Postgresql 7.4.8 or later doesn't supports > the option "SET AUTOCOMMIT TO OFF"? Because server-side autocommit was a bad idea. See the 7.4 Release Notes. http://www.postgresql.org/docs/7.4/static

[GENERAL] Postgresql server "crash" after some day

2005-08-17 Thread Stefano B.
Hi all,   I have some strange problems with postgres. After some days it works in local but it doesn't listen on port 5432 for remote request.   I can make a connection from local host but I can't from remote host. If I try to make a connection from remote host the server returns me the clas

[GENERAL] Finding nearest numeric value

2005-08-17 Thread Poul Møller Hansen
Does anyone know how to find the row with the nearest numeric value, not necessarily an exact match ? Thanks, Poul ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EM

Re: [GENERAL] Set autocommit to off

2005-08-17 Thread Andreas Kretschmer
Aliomar Mariano Rego <[EMAIL PROTECTED]> schrieb: > Does somebody knows why the Postgresql 7.4.8 or later doesn't supports > the option "SET AUTOCOMMIT TO OFF"? \set AUTOCOMMIT off works fine in 8.0.3 Regards, Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freila

Re: [GENERAL] cobol storedprocedures

2005-08-17 Thread Martijn van Oosterhout
On Wed, Aug 17, 2005 at 01:05:07PM +0200, Dawid Kuroczko wrote: > On 8/15/05, MICHAEL BATTANI <[EMAIL PROTECTED]> wrote: > > I've been scanning the postgres website and yours to find out any > > information on cobol stored procedures. Is there any plans on incorporating > > this > > in future rele

Re: [GENERAL] Set autocommit to off

2005-08-17 Thread Sean Davis
On 8/17/05 4:24 AM, "Aliomar Mariano Rego" <[EMAIL PROTECTED]> wrote: > Does somebody knows why the Postgresql 7.4.8 or later doesn't supports > the option "SET AUTOCOMMIT TO OFF"? See this message: http://archives.postgresql.org/pgsql-general/2005-07/msg00064.php In short, server-side autocomm

[GENERAL] Set autocommit to off

2005-08-17 Thread Aliomar Mariano Rego
Does somebody knows why the Postgresql 7.4.8 or later doesn't supports the option "SET AUTOCOMMIT TO OFF"? Thanks. ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] cobol storedprocedures

2005-08-17 Thread Dawid Kuroczko
On 8/15/05, MICHAEL BATTANI <[EMAIL PROTECTED]> wrote: > I've been scanning the postgres website and yours to find out any > information on cobol stored procedures. Is there any plans on incorporating > this > in future releases? I don't think anyone is working on such a thing right now. The pro

Re: [GENERAL] winxp with 8.0.3 postgresql

2005-08-17 Thread go
Hi, I got the similar problem - as i understood, the latest odbc driver do not understand some text fields/ i have solved the problem after installing older drivers, such as :psqlodbc-07_02_0004.zip DBC> I use in my application the BDE 5.01 with psqlodbc DBC> After instalation the postgresql 8.0

[GENERAL] winxp with 8.0.3 postgresql

2005-08-17 Thread Dario Basso Cardoso
Hi,   I use in my application the BDE 5.01 with psqlodbc   After instalation the postgresql 8.0.3 in my winxp with sp2 or sp1 in two cases the simple SQL comand with BDE result Error: Bad field type.   I go select * from usuarios and i go normally   I go select nome, codigo from usuarios i g

[GENERAL] pgsql-bugs

2005-08-17 Thread Lee Hyun soon
From: "Lee Hyun soon" <[EMAIL PROTECTED]> To: pgsql-bugs@postgresql.org Date: Wed, 17 Aug 2005 05:36:23 +0100 (BST) Subject: BUG #1826: pgsql odbc & ADO.NET The following bug has been logged online: Bug reference: 1826 Logged by: Lee Hyun soon Email address: [EMAIL PROTECTED] P

Re: [GENERAL] libpy and ENABLE_THREAD_SAFETY=1

2005-08-17 Thread Pit Müller
Magnus Hagander wrote: Is the standard libpq.dll distributed by PostgreSQL8.0 for windows thread safe by default ? No. It is safe as long as you use each PGconn on a separate thread but you cannot share the same PGconn between threads. //Magnus But what if I compile the DLL using E

Re: [GENERAL] libpy and ENABLE_THREAD_SAFETY=1

2005-08-17 Thread Pit Müller
Magnus Hagander wrote: Is the standard libpq.dll distributed by PostgreSQL8.0 for windows thread safe by default ? No. It is safe as long as you use each PGconn on a separate thread but you cannot share the same PGconn between threads. //Magnus But what

[GENERAL] cobol storedprocedures

2005-08-17 Thread MICHAEL BATTANI
I've been scanning the postgres website and yours to find out any information on cobol stored procedures. Is there any plans on incorporating this in future releases? Michael Battani Companion Technologies 8901 Farrow Road Columbia, SC 29203 803.264.3569 [EMAIL PROTECTED] ---