Re: [GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-30 Thread Najib Abi Fadel
ALL rules get executed. Conditions get combined (actually, parse trees get merged). === BEGIN rule_test.sql === CREATE TABLE foo (a int4 PRIMARY KEY, b text); COPY foo FROM stdin; 1 aaa 2 bbb 3 ccc 4 aaa 5 bbb 6 ccc \. CREATE VIEW foo_v AS SELECT * FROM foo WHERE b='bbb'; CREATE

[GENERAL] psql slow disconnect via ssl

2004-09-30 Thread Mike Morris
I'm a newbie, and couldn't find this in the archives... although I see that disabling SSL is new to 7.4. I'm using psql to attach to 7.4.2 across a DSL connection. This always results in a long delay (just over 60 seconds) either when connecting (nossl) or disconnecting (ssl). If my

Re: [GENERAL] Multiple Rules :: Postgres Is confused !!

2004-09-30 Thread Richard Huxton
Najib Abi Fadel wrote: ALL rules get executed. Conditions get combined (actually, parse trees get merged). If i am getting this right the update command: UPDATE foo_v SET b='xxx'; will first get the a values (2 and 5) from the view and then execute the update on this rows. ? So im my case, when

[GENERAL] Multiple Rules - an example

2004-09-30 Thread Richard Huxton
The interaction of rules with views can be complicated, so here's a short sample file which illustrates the main points. -- Richard Huxton Archonet Ltd === BEGIN rule_test.sql === DROP TABLE foo CASCADE; CREATE TABLE foo (a int4 PRIMARY KEY, b text, c text); COPY foo FROM stdin; 1 aaa AAA

Re: [GENERAL] string is sometimes null ?

2004-09-30 Thread Graeme Hinchliffe
If monthcurr or username are null, the above will be null. Anything || NULL = NULL. AH! thanks sorted it now. That is not the behaviour I would have expected :) Is there a concatination operator that will not do this? IE if var1 || var2 || var3 and var2 is null would result in just

Re: [GENERAL] string is sometimes null ?

2004-09-30 Thread Richard Huxton
Graeme Hinchliffe wrote: If monthcurr or username are null, the above will be null. Anything || NULL = NULL. AH! thanks sorted it now. That is not the behaviour I would have expected :) Is there a concatination operator that will not do this? IE if var1 || var2 || var3 and var2 is null would

Re: [GENERAL] string is sometimes null ?

2004-09-30 Thread Holger Klawitter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Is there a concatination operator that will not do this? IE var1 || var2 || var3 and var2 is null would result in just var1var3 ? You have to coalesce your vars before concatenating, as in coalesce(var1,'') || coalesce(var2,'') ||

[GENERAL] Java application and SPI...(?)

2004-09-30 Thread Katsaros Kwn/nos
Hi everybody, Is there any way to connect a Java application to user defined functions (which use SPI)? I have an already implemented Java app that I want to usein order to pass arguments to my functions and receive results (e.g. tuples). I'm thinking of JNI and/orJDBCbut I haven'treached

[GENERAL] WinXP + PgSQL 8 beta3 = impossible?

2004-09-30 Thread BARTKO, Zoltn
Hello folks, I am trying to install pgsql 8 beta 2 via pginstaller. dev 2 and dev 3 do the same - none of these complete the installation process. I tried to compile beta 3 via mingw, the installation failed - initdb says my time zone supports leap seconds (sk_SK, GMT+01). I set the time zone

Re: [GENERAL] Java application and SPI...(?)

2004-09-30 Thread Richard Huxton
Katsaros Kwn/nos wrote: Hi everybody, Is there any way to connect a Java application to user defined functions (which use SPI)? I have an already implemented Java app that I want to use in order to pass arguments to my functions and receive results (e.g. tuples). I'm thinking of JNI and/or JDBC

Re: [GENERAL] WinXP + PgSQL 8 beta3 = impossible?

2004-09-30 Thread Campano, Troy
I was able to install PostgreSQL 8 Beta 2 with pgInstaller on Windows XP Professional without any problems. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of BARTKO, Zoltán Sent: Thursday, September 30, 2004 5:54 AM To: [EMAIL PROTECTED] Subject:

Re: [GENERAL] dangling permission on tables after drop user.

2004-09-30 Thread Vivek Khera
On Sep 29, 2004, at 5:35 PM, Alvaro Herrera wrote: Am I missing something Vivek, or should the gross hack be creating a user with id=102 ? And how exactly does one accomplish this? pg_users is a view so you can't insert into it. CREATE USER ... WITH SYSID 102; Ok. I did that. So now how do I get

Re: [GENERAL] 7.3.4 vacuum/analyze error

2004-09-30 Thread Alvaro Herrera
On Wed, Sep 29, 2004 at 11:23:52PM -0600, Ed L. wrote: On Wednesday September 29 2004 5:17, Tom Lane wrote: 2004-09-29 18:14:53.621 [520]ERROR: Memory exhausted in AllocSetAlloc(1189) Analyze: 132263832 total in 27 blocks; 2984 free (35 chunks); 132260848 used Either

Re: [GENERAL] dangling permission on tables after drop user.

2004-09-30 Thread Alvaro Herrera
On Thu, Sep 30, 2004 at 09:32:30AM -0400, Vivek Khera wrote: On Sep 29, 2004, at 5:35 PM, Alvaro Herrera wrote: Am I missing something Vivek, or should the gross hack be creating a user with id=102 ? And how exactly does one accomplish this? pg_users is a view so you can't insert into

Re: [GENERAL] How to get user's role?

2004-09-30 Thread Michael Fuhr
On Thu, Sep 30, 2004 at 10:26:41AM +0700, Armen Rizal wrote: I want to get what roles/groups that the current user is member of. I tried to use the following commands but they both returned no rows. SELECT * FROM information_schema.enabled_roles SELECT * FROM

Re: [GENERAL] Out of memory errors on OS X

2004-09-30 Thread Kevin Barnard
Maybe this is a server vs normal OS X issue. I am postgres on a normal iMac 10.3.5 with no problems, but this is just a developent box so I don't need the server version. All of the servers that I run are Linux/FreeBSD. I don't have access to a Mac server, if I did I would test this myself.

[GENERAL] problems with lower() and unicode-databases

2004-09-30 Thread peter pilsl
postgres 7.4 on linux, glibc 2.2.4-6 I've a table containing unicode-data and the lower()-function does not work proper. While it lowers standard letters like A-a,B-b ... it fails on special letters like german umlauts (Ä , Ö ...) that are simply keeped untouched. Everything else (sorting

Re: [GENERAL] string is sometimes null ?

2004-09-30 Thread Stephan Szabo
On Thu, 30 Sep 2004, Graeme Hinchliffe wrote: If monthcurr or username are null, the above will be null. Anything || NULL = NULL. AH! thanks sorted it now. That is not the behaviour I would have expected :) Is there a concatination operator that will not do this? IE if var1 || var2

Re: [GENERAL] 7.3.4 vacuum/analyze error

2004-09-30 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: On Wed, Sep 29, 2004 at 11:23:52PM -0600, Ed L. wrote: On Wednesday September 29 2004 5:17, Tom Lane wrote: 2004-09-29 18:14:53.621 [520]ERROR: Memory exhausted in AllocSetAlloc(1189) Analyze: 132263832 total in 27 blocks; 2984 free (35 chunks);

Re: [GENERAL] problems with lower() and unicode-databases

2004-09-30 Thread Tom Lane
peter pilsl [EMAIL PROTECTED] writes: postgres 7.4 on linux, glibc 2.2.4-6 I've a table containing unicode-data and the lower()-function does not work proper. While it lowers standard letters like A-a,B-b ... it fails on special letters like german umlauts (Ä , Ö ...) that are simply

[GENERAL] how to encode/encrypt a string

2004-09-30 Thread Miles Keaton
still doing my switch from MySQL to PgSQL, and can't figure out what the comparable function would be for this: In MySQL, to store a big secret (like a credit card number) in the database that I didn't want anyone to be able to see without knowing the salt/password value, I would do this into a

Re: [GENERAL] how to encode/encrypt a string

2004-09-30 Thread Tom Lane
Miles Keaton [EMAIL PROTECTED] writes: In MySQL, to store a big secret (like a credit card number) in the database that I didn't want anyone to be able to see without knowing the salt/password value, I would do this into a blob-type field: INSERT INTO clients(ccnum) VALUES

Re: [GENERAL] how to encode/encrypt a string

2004-09-30 Thread Chris Browne
[EMAIL PROTECTED] (Miles Keaton) writes: still doing my switch from MySQL to PgSQL, and can't figure out what the comparable function would be for this: In MySQL, to store a big secret (like a credit card number) in the database that I didn't want anyone to be able to see without knowing the

[GENERAL] postgres start problems with memory

2004-09-30 Thread Josh Close
I keep getting this error. DETAIL: Failed system call was shmget(key=5432001, size=34037760, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel

Re: [GENERAL] postgres start problems with memory

2004-09-30 Thread Josh Close
On Thu, 30 Sep 2004 13:39:57 -0500, Josh Close [EMAIL PROTECTED] wrote: I keep getting this error. DETAIL: Failed system call was shmget(key=5432001, size=34037760, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX

[GENERAL] Undefined symbols: _poll

2004-09-30 Thread Joe Lester
I'm just moved my Postgres client project from Mac 10.2.8 to 10.3.5. It's an Objective-C program that links to libpq.a (the header file is libpq-fe.h). However, when I try to compile now I get the following linking error: ld: Undefined symbols: _poll Does this sound familiar to anyone? My

Re: [GENERAL] postgres start problems with memory

2004-09-30 Thread Greg Stark
Josh Close [EMAIL PROTECTED] writes: To reduce the request size (currently 34037760 bytes), ... root # sysctl -a | grep shm kernel.shmmni = 4096 kernel.shmall = 31584400 kernel.shmmax = 31584400 So it's currently looking for 34M and you're setting the maximum to 31M. -- greg

Re: [GENERAL] COPY FROM STDIN not in local file

2004-09-30 Thread Josh Close
On Wed, 29 Sep 2004 14:40:34 -0500, Josh Close [EMAIL PROTECTED] wrote: Is there a way to do COPY FROM STDIN from sql? So, remotely I could run the copy command and somehow push the info over instead of having it on the server. For those who are curious, I found a php implementation of this.

Re: [GENERAL] postgres start problems with memory

2004-09-30 Thread Josh Close
On 30 Sep 2004 16:40:58 -0400, Greg Stark [EMAIL PROTECTED] wrote: Josh Close [EMAIL PROTECTED] writes: To reduce the request size (currently 34037760 bytes), ... root # sysctl -a | grep shm kernel.shmmni = 4096 kernel.shmall = 31584400 kernel.shmmax = 31584400 So it's

Re: [GENERAL] Undefined symbols: _poll

2004-09-30 Thread Tom Lane
Joe Lester [EMAIL PROTECTED] writes: I'm just moved my Postgres client project from Mac 10.2.8 to 10.3.5. It's an Objective-C program that links to libpq.a (the header file is libpq-fe.h). However, when I try to compile now I get the following linking error: ld: Undefined symbols: _poll

[GENERAL] about pg_dump without pompt password

2004-09-30 Thread Ying Lu
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly ---(end of

[GENERAL] about pg_dump without pompt password

2004-09-30 Thread Ying Lu
Hello all, Is it possible that we setup the password in the pg_dump command line instead of let users input it through prompt command. E.g., pg_dump test -c -d --host=localhost -U testUser1 --file='a.dmp' --no-privileges Thanks a lot! Ly ---(end of

[GENERAL] RFC: HPUX IA64 Pgsql 8.0.0beta3 benchmark data

2004-09-30 Thread Ed L.
Attached is a set of performance measurements attempting to compare 32-bit executables against 64-bit executables using PostgreSQL 8.0.0beta3 on an Itanium box running HPUX B.11.23 with 16GB of RAM, dbc_max_pct = 20% (meaning a 3.2GB kernel buffer cache), and shmmax = 8gb. I haven't analyzed

Re: [GENERAL] about pg_dump without pompt password

2004-09-30 Thread Tom Lane
Ying Lu [EMAIL PROTECTED] writes: Is it possible that we setup the password in the pg_dump command line You might as well put it on a billboard --- anything in the command line can be seen by anyone who runs ps. If you don't want to supply it manually, put it in ~/.pgpass.

[GENERAL] Accessing an array element from a function

2004-09-30 Thread Mike Nolan
This may be mostly a documention issue: I have a function with two parameters that returns an array: text[]. I want to access just the first element of that array within my SQL statement. This doesn't work: select myfunc(1,2)[1]; This does work: select (myfunc(1,2)[1]; If that's

[GENERAL] readline install questions

2004-09-30 Thread Scott Frankel
I am attempting to install postgresql7.4.5 on OSX 10.3.5 and have questions about readline. For use with Python, I have readline.so installed in /Library/Python/2.3/. - Is this manifestation of readline sufficient/appropriate for postgres? - If not, what do I need and where do I get it from?

Re: [GENERAL] Accessing an array element from a function

2004-09-30 Thread Tom Lane
Mike Nolan [EMAIL PROTECTED] writes: This doesn't work: select myfunc(1,2)[1]; This does work: select (myfunc(1,2)[1]; I suppose you meant select (myfunc(1,2))[1]; If that's how it's supposed to work, is that documented somewhere?

[GENERAL] help me in PostgreSQL 7.4

2004-09-30 Thread
. Send please examples of the use lo_export, lo_import, lo_open, lo_read, lo_write for Delphi. It is necessary to save the files in the base and afterwards read them from the base. _ [EMAIL PROTECTED] ICQ 257127750

[GENERAL] POSTGRES

2004-09-30 Thread Claudia Restrepo Pajon - Practicante Sistemas
suscribe hola! Yo soy Claudia Mª Restrepo P. Me encuentro realizando mi practica empresarial (estudiante de ingenieria de sistemas)y ya monte en un servidor proliant, procesador pentium 3 DIM 128M, disco duro IDE 20GB. En el cual instale Linux Suse 9.1, estoy trabjando en la base de datos

Re: [GENERAL] POSTGRES

2004-09-30 Thread Alvaro Herrera
On Thu, Sep 30, 2004 at 11:13:54AM -0500, Claudia Restrepo Pajon - Practicante Sistemas wrote: Claudia, Yo soy Claudia Mª Restrepo P. Me encuentro realizando mi practica empresarial (estudiante de ingenieria de sistemas)y ya monte en un servidor proliant, procesador pentium 3 DIM 128M,

[GENERAL] postgres

2004-09-30 Thread Claudia Restrepo Pajon - Practicante Sistemas
suscribe hola! Yo soy Claudia Mª Restrepo P. Me encuentro realizando mi practica empresarial (estudiante de ingenieria de sistemas)y ya monte en un servidor proliant, procesador pentium 3 DIM 128M, disco duro IDE 20GB. En el cual instale Linux Suse 9.1, estoy trabjando en la base de datos

[GENERAL] archives / search improvements

2004-09-30 Thread Marc G. Fournier
Over the past 24 hours, we have been hard at work cleaning up, and fixing, several issues with both the mailing list archives, and the search engine behind it. Several of the more apparent changes are: - removed the top right banner - add the Google AdSense banner to the right