[GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Hi,I'm trying to use SPI for database connectivity at the server side.My database is intialized at /usr/local/pgsql/hpsspi.h is at the follwoing location/usr/include/pgsql/server/executor.
I have a C file that has the SPI code and is located at /usr/local/pgsql/hpsI thin file i do #include executor/spi.hThis throws hell lot of errors (hundreds of them), even if i don't have any SPI code in my C file as of now.
Can anyone please tell me whats going wrong and what header files should be kept where?Thanks in advance,~Harpreet


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 02:16:36AM -0400, Harpreet Dhaliwal wrote:
 Hi,
 I'm trying to use SPI for database connectivity at the server side.

snip

 This throws hell lot of errors (hundreds of them), even if i don't have any
 SPI code in my C file as of now.
 
 Can anyone please tell me whats going wrong and what header files should be
 kept where?

Well, you're doing something wrong then:

$ cat a.c
#include executor/spi.h
$ gcc -I /usr/include/postgresql/server -c a.c 
$

No errors or warnings. Please show the exact command you're using.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Now i did something like this$ cat a.c#include executor/spi.h$ gcc -I /usr/include/pgsql/server -c a.c$still getting the same errors.The only difference between your and my code being /usr/include/postgresql/server and /usr/include/pgsql/server
On 8/30/06, Martijn van Oosterhout kleptog@svana.org wrote:
On Wed, Aug 30, 2006 at 02:16:36AM -0400, Harpreet Dhaliwal wrote: Hi, I'm trying to use SPI for database connectivity at the server side.snip This throws hell lot of errors (hundreds of them), even if i don't have any
 SPI code in my C file as of now. Can anyone please tell me whats going wrong and what header files should be kept where?Well, you're doing something wrong then:$ cat a.c
#include executor/spi.h$ gcc -I /usr/include/postgresql/server -c a.c$No errors or warnings. Please show the exact command you're using.Have a nice day,--Martijn van Oosterhout 
kleptog@svana.org http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFE9S/1IB7bNG8LQkwRAolRAJ9Kx0cFrzFiox0Bva5dD/nps+9EKQCdGsyn+46ZT9EMGLoYC55WGuhaRvQ==eDn0-END PGP SIGNATURE-



Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Can you please email me your spi.h. Need to see the path of other header files that spi.h includes and compare it with what i have.~HarpreetOn 8/30/06, 
Harpreet Dhaliwal [EMAIL PROTECTED] wrote:
Now i did something like this$ cat a.c#include executor/spi.h$ gcc -I /usr/include/pgsql/server -c a.c$still getting the same errors.
The only difference between your and my code being /usr/include/postgresql/server and /usr/include/pgsql/server
On 8/30/06, Martijn van Oosterhout 
kleptog@svana.org wrote:

On Wed, Aug 30, 2006 at 02:16:36AM -0400, Harpreet Dhaliwal wrote: Hi, I'm trying to use SPI for database connectivity at the server side.snip This throws hell lot of errors (hundreds of them), even if i don't have any
 SPI code in my C file as of now. Can anyone please tell me whats going wrong and what header files should be kept where?Well, you're doing something wrong then:$ cat a.c

#include executor/spi.h$ gcc -I /usr/include/postgresql/server -c a.c$No errors or warnings. Please show the exact command you're using.Have a nice day,--Martijn van Oosterhout 
kleptog@svana.org 
http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFE9S/1IB7bNG8LQkwRAolRAJ9Kx0cFrzFiox0Bva5dD/nps+9EKQCdGsyn+46ZT9EMGLoYC55WGuhaRvQ==eDn0-END PGP SIGNATURE-






Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 02:59:45AM -0400, Harpreet Dhaliwal wrote:
 Can you please email me your spi.h.
 Need to see the path of other header files that spi.h includes and compare
 it with what i have.

Perhaps you should post some of the actual errors you're getting?

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?rev=1.53;content-type=text%2Fplain

That's that standard 8.1 version.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Also, Where should the directoriresexecutor, nodes, utils, access, catalog be? Over here, its searching it in /usr/includeHowever, these files are located at /usr/include/pgsql/server/When i copy these directories to /usr/include, it throws the error that I posted in the form 
of a file a minute ago.If i don't copy these files to /usr/include and let them be where they are i.e /usr/include/pgsql/serverthen it says, file /executor/spi.h not found.don't know what is this mess all about.
Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal [EMAIL PROTECTED] wrote:
Hi,Please find attached the error file.Thanks~Harpreet
On 8/30/06, Martijn van Oosterhout 
kleptog@svana.org
 wrote:
On Wed, Aug 30, 2006 at 02:59:45AM -0400, Harpreet Dhaliwal wrote:
 Can you please email me your spi.h. Need to see the path of other header files that spi.h includes and compare it with what i have.Perhaps you should post some of the actual errors you're getting?
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?rev=1.53;content-type=text%2Fplain
That's that standard 8.1 version.Have a nice day,--Martijn van Oosterhout kleptog@svana.org
 http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFE9Tg+IB7bNG8LQkwRAkJZAJ41NKMEqk/UI/axBkRohYGXQzHrngCfYggr
sK5+2Z5Frf91Z9rFf6Gfm0U==Fyvk-END PGP SIGNATURE-




Re: [GENERAL] XPath and XML support

2006-08-30 Thread Dave Page
 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of John Gray
 Sent: 29 August 2006 22:49
 To: pgsql-general@postgresql.org
 Subject: Re: [GENERAL] XPath and XML support
 
 On Thu, 24 Aug 2006 13:56:12 -0700, Frank Cohen wrote:
 
  Thanks Nikolay: Seeing as xml2 hasn't been ported to Windows yet  
  makes me wonder if this is going to be the best way to use XML in  
  PostgreSQL in the long-term? Is there anything else on the 
 boards? - 
  Frank
  
 
 There's a lot of scope to do better than the current support, 
 certainly.
 
 However, the not ported to Windows is slightly misleading - the code
 (like a lot of contrib code) compiles fine under Windows. 
 Because of the
 dependency on libxml2, it might not often be distributed as a 
 binary, but
 people are definitely using on Win32 (I'm not really a Win32 
 user but I
 have tried it and it did work).

It was only ported relatively recently (I know, I did it). It will ship
with the Windows PostgreSQL 8.2 binary installer.

Regards, Dave.

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Fredrik Israelsson
Hi!
I am about to install PostgreSQL on a minimal Linux system, where root
is the only user that is allowed to exist. I would prefer to use a
binary installer. Is it possible to install PostgreSQL without the
postgres user?

/Fredrik

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Harpreet Dhaliwal
No, you can't.You need postgres user for sure.Postgresql database doesn't run on root account.~HarpreetOn 8/30/06, Fredrik Israelsson 
[EMAIL PROTECTED] wrote:
Hi!I am about to install PostgreSQL on a minimal Linux system, where rootis the only user that is allowed to exist. I would prefer to use abinary installer. Is it possible to install PostgreSQL without the
postgres user?/Fredrik---(end of broadcast)---TIP 6: explain analyze is your friend


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Also,a.c is at/usr/local/pgsql/hpsand sp.h is at/usr/include/pgsql/server/executorDoes that make a difference?Regards,~harpreetOn 8/30/06, 
Harpreet Dhaliwal [EMAIL PROTECTED] wrote:
Also, Where should the directoriresexecutor, nodes, utils, access, catalog be? Over here, its searching it in /usr/includeHowever, these files are located at /usr/include/pgsql/server/When i copy these directories to /usr/include, it throws the error that I posted in the form 
of a file a minute ago.If i don't copy these files to /usr/include and let them be where they are i.e /usr/include/pgsql/serverthen it says, file /executor/spi.h not found.don't know what is this mess all about.
Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal 
[EMAIL PROTECTED] wrote:
Hi,Please find attached the error file.
Thanks~Harpreet
On 8/30/06, Martijn van Oosterhout 
kleptog@svana.org
 wrote:
On Wed, Aug 30, 2006 at 02:59:45AM -0400, Harpreet Dhaliwal wrote:
 Can you please email me your spi.h. Need to see the path of other header files that spi.h includes and compare it with what i have.Perhaps you should post some of the actual errors you're getting?
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?rev=1.53;content-type=text%2Fplain
That's that standard 8.1 version.Have a nice day,--Martijn van Oosterhout kleptog@svana.org
 http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFE9Tg+IB7bNG8LQkwRAkJZAJ41NKMEqk/UI/axBkRohYGXQzHrngCfYggr
sK5+2Z5Frf91Z9rFf6Gfm0U==Fyvk-END PGP SIGNATURE-






Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Also, Can you please email me ur directory structure, as in, absolute path of a.c and absolute path of spi.h.Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal
 [EMAIL PROTECTED] wrote:
Also,a.c is at/usr/local/pgsql/hpsand sp.h is at/usr/include/pgsql/server/executorDoes that make a difference?Regards,~harpreet
On 8/30/06, 
Harpreet Dhaliwal [EMAIL PROTECTED] wrote:

Also, Where should the directoriresexecutor, nodes, utils, access, catalog be? Over here, its searching it in /usr/includeHowever, these files are located at /usr/include/pgsql/server/When i copy these directories to /usr/include, it throws the error that I posted in the form 
of a file a minute ago.If i don't copy these files to /usr/include and let them be where they are i.e /usr/include/pgsql/serverthen it says, file /executor/spi.h not found.don't know what is this mess all about.
Thanks,~HarpreetOn 8/30/06, Harpreet Dhaliwal 

[EMAIL PROTECTED] wrote:
Hi,Please find attached the error file.
Thanks~Harpreet
On 8/30/06, Martijn van Oosterhout 
kleptog@svana.org
 wrote:
On Wed, Aug 30, 2006 at 02:59:45AM -0400, Harpreet Dhaliwal wrote:
 Can you please email me your spi.h. Need to see the path of other header files that spi.h includes and compare it with what i have.Perhaps you should post some of the actual errors you're getting?
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/spi.h?rev=1.53;content-type=text%2Fplain
That's that standard 8.1 version.Have a nice day,--Martijn van Oosterhout kleptog@svana.org
 http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFE9Tg+IB7bNG8LQkwRAkJZAJ41NKMEqk/UI/axBkRohYGXQzHrngCfYggr
sK5+2Z5Frf91Z9rFf6Gfm0U==Fyvk-END PGP SIGNATURE-








Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 03:53:13AM -0400, Harpreet Dhaliwal wrote:
 Also,
 Can you please email me ur directory structure, as in, absolute path
 of a.cand absolute path of
 spi.h.

The absolute path of a.c is the irrelevent, it's in the current
directory. executor/spi.h is in /usr/include/postgresql/server.

BTW, in your sample output you have -l (lowercase L), why? If it were -I
(capital I) I could understand.

The directory structure is simply the normal one.

gcc -I `pg_config --includedir-server` a.c

will aso work.
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Did not understand about capital L and small L. What should i be using, capital or small.I also tried gcc -I `pg_config --includedir-server` a.cand it still says executor/spi.h doesn't exist.
On 8/30/06, Martijn van Oosterhout kleptog@svana.org wrote:
On Wed, Aug 30, 2006 at 03:53:13AM -0400, Harpreet Dhaliwal wrote: Also, Can you please email me ur directory structure, as in, absolute path of a.cand absolute path of spi.h.The absolute path of 
a.c is the irrelevent, it's in the currentdirectory. executor/spi.h is in /usr/include/postgresql/server.BTW, in your sample output you have -l (lowercase L), why? If it were -I(capital I) I could understand.
The directory structure is simply the normal one.gcc -I `pg_config --includedir-server` a.cwill aso work.--Martijn van Oosterhout kleptog@svana.org
 http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG 
v1.4.1 (GNU/Linux)iD8DBQFE9UXOIB7bNG8LQkwRAvCmAKCHbkjgjiQWKOGTRhpNAvPWNiDaCACgkJzJZn1eVoDmB4AwDf0gzjlMENQ==31fE-END PGP SIGNATURE-


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 04:14:20AM -0400, Harpreet Dhaliwal wrote:
 Did not understand about capital L and small L.
 What should i be using, capital or small.

Please use a font that distinguishes between I and l. It's capital I
like in INDIGO. Not an L at all...

 I also tried
 gcc -I `pg_config --includedir-server` a.c
 
 and it still says executor/spi.h doesn't exist.

Then your setup is badly broken. pg_config --includedir-server should
point to the include directory of your postgres installation.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] #include executor/spi.h throwing errors

2006-08-30 Thread Harpreet Dhaliwal
Problem was that i was using -L as in LEAMON, not I as in Indigo.Its working now. Martijn, thanks alot for your patience. I realy don't know why was I doing -L, actually i was thinkin of linking something. HUH.
Had to include. Thanks alot once again~HarpreetOn 8/30/06, Martijn van Oosterhout kleptog@svana.org
 wrote:On Wed, Aug 30, 2006 at 04:14:20AM -0400, Harpreet Dhaliwal wrote:
 Did not understand about capital L and small L. What should i be using, capital or small.Please use a font that distinguishes between I and l. It's capital Ilike in INDIGO. Not an L at all...
 I also tried gcc -I `pg_config --includedir-server` a.c and it still says executor/spi.h doesn't exist.Then your setup is badly broken. pg_config --includedir-server should
point to the include directory of your postgres installation.Have a nice day,--Martijn van Oosterhout kleptog@svana.org 
http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFE9UrRIB7bNG8LQkwRAskiAKCB8L4FUs5JfmaNalY/g4FetZjzqQCfWCwg
50juNfNEXM/nkIqH0EbmgOo==wbAT-END PGP SIGNATURE-


Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Jasbinder Bali
How does the SPI manager know which database to connect using SPI_CONNECT()As there can be more than one datbase in the postgres server, how does it make out which database to connect as we don't specify the datbase name we intend to connect.
~JasOn 8/30/06, Jasbinder Bali [EMAIL PROTECTED] wrote:
OK..i got it..spi.h was in /usr/include/pgsql/server/executorJasOn 8/30/06, Jasbinder Bali 
[EMAIL PROTECTED]
 wrote:Isn't there any rpm to download the SPI ??

On 8/30/06, Martijn van Oosterhout 
kleptog@svana.org wrote:
On Wed, Aug 30, 2006 at 01:01:32AM -0400, Jasbinder Bali wrote:
 Do i need to download 
spi.h from somewhere or what? I can't see it anywhereYou need the backend header files. In Debian they're in thepostgresql-dev package. You'll need to add-I/usr/include/postgresql/server to your compile command to see them.
Hope this helps,--Martijn van Oosterhout kleptog@svana.org 

http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFE9R/4IB7bNG8LQkwRAiekAJ9VV+aC+bshCm8H6Lifa5rwTtBl8wCcCyli9BMLtVsMsLzJM1FwLvhqMbs==Xbxl-END PGP SIGNATURE-








Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 04:34:17AM -0400, Jasbinder Bali wrote:
 How does the SPI manager know which database to connect using SPI_CONNECT()
 As there can be more than one datbase in the postgres server, how does it
 make out which database to connect as we don't specify the datbase name we
 intend to connect.

SPI only talks to the current database in the current transaction.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


[GENERAL] Status on Fedora Core Extras packaging

2006-08-30 Thread Devrim GUNDUZ
Hello,

Yesterday night, I was approved (sponsored) for Fedora Core packaging
(please note that this is not something financial).

For the beginning, I officially submitted python-psycopg2 to FC6. More
are on the way; like pgpool, Slony-I, pgadmin3-adminpacks, phpPgAdmin,
postgresql_autodoc, pgfouine. Also they are in the queue for FC5. I'm
waiting for approval for them.

More will be in FC Extras. Please let me know that if you want to see
any PostgreSQL related software in the repository. I do have time to
package all related stuff.

Regards,
-- 
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/



signature.asc
Description: This is a digitally signed message part


Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Jasbinder Bali
PG_FUNCTION_INFO_V1 (test);Datumtest (PG_FUNCTION_ARGS){ int id = PG_GETARG_INT(0);
 char *raw_rawemail1 = PG_GETARG_CHAR_P(1); //line 6 (warning thrown for this line) char *rawemail1 = (char *) palloc (VARSIZE(rawemail1)); VARATT_SIZEP ( rawemail1 ) = VARSIZE (raw_rawemail1); //LINE 140 (thats where i get syntax error)
 memcpy( (void *) (VARDATA) (rawemail1), (void *) (VARDATA) (raw_rawemail1) , (VARSIZE) (raw_rawemail1) - VARHDRSZ );}Was trying to test the code given in the postgres manual.The only diff being that i changed the data type from text* to char* and it gives me a warning like:
initialization makes pointer from integer without a cast at line 6 as commented above.Can any1 point why?~JasCompiling this code gives me the follwoing error:Compiling this code throws the follwoing error 
On 8/30/06, Jasbinder Bali [EMAIL PROTECTED] wrote:
I have a .pgc file and i have the following code snippet in it:PG_FUNCTION_INFO_V1 (test);Datumtest (PG_FUNCTION_ARGS){ EXEC SQL BEGIN DECLARE SECTION; int id = PG_GETARG_INT(0);

 char *raw_rawemail1 = PG_GETARG_CHAR_P(1); char *rawemail1 = (char *) palloc (VARSIZE(rawemail1)); VARATT_SIZEP ( rawemail1 ) = VARSIZE (raw_rawemail1); //LINE 140 (thats where i get syntax error)
 memcpy( (void *) (VARDATA) (rawemail1), (void *) (VARDATA) (raw_rawemail1) , (VARSIZE) (raw_rawemail1) - VARHDRSZ ); EXEC SQL END DECLARE SECTION; EXEC SQL CONNECT TO dbxyz;}When I compile this using
ECPG parser.pgcI get the follwing errorSyntax error at or near 'rawemail1' (LINE 140 marked above)Don't know what this error is all about.Don't know if my declaration in BEGIN END block is correct in the pgc file for version 1 calling convention
Thanks~Jas




[GENERAL] Query for order of tables

2006-08-30 Thread Post Gres
Hello;How can I query the pg catalogue to produce a list of tables in order of dependency?Cheers.


Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 05:38:34AM -0400, Jasbinder Bali wrote:
 PG_FUNCTION_INFO_V1 (test);
 
snip

   char *raw_rawemail1 = PG_GETARG_CHAR_P(1); //line 6 (warning
 thrown for this line)

snip

 Was trying to test the code given in the postgres manual.
 The only diff being that i changed the data type from text* to char* and it
 gives me a warning like:
 
 initialization makes pointer from integer without a cast at line 6 as
 commented above.
 
 Can any1 point why?

Sure, there's no such function PG_GETARG_CHAR_P(). You should set your
compiler to warn about stuff like this.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Jasbinder Bali
Does that mean if I am passing a char value to the version 1 function from a function in the database then in the version 1 function it needs to be treated as text*??On 8/30/06, 
Martijn van Oosterhout kleptog@svana.org wrote:
On Wed, Aug 30, 2006 at 05:38:34AM -0400, Jasbinder Bali wrote: PG_FUNCTION_INFO_V1 (test);snip char *raw_rawemail1 = PG_GETARG_CHAR_P(1); //line 6 (warning thrown for this line)
snip Was trying to test the code given in the postgres manual. The only diff being that i changed the data type from text* to char* and it gives me a warning like: initialization makes pointer from integer without a cast at line 6 as
 commented above. Can any1 point why?Sure, there's no such function PG_GETARG_CHAR_P(). You should set yourcompiler to warn about stuff like this.Have a nice day,--Martijn van Oosterhout 
kleptog@svana.org http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.1 (GNU/Linux)iD8DBQFE9WGjIB7bNG8LQkwRAkp8AKCRGJemB/SCqk9R6Spd1Jf6k0rodwCePN4JHuRH44T7Nx8MDIyLEMFoVvQ==8jHd-END PGP SIGNATURE-



Re: [GENERAL] Version 1 Calling convention

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 06:05:18AM -0400, Jasbinder Bali wrote:
 Does that mean if I am passing a char value to the version 1 function from a
 function in the database then in the version 1 function it needs to be
 treated as text*??

It depends on what type you're passing:

char- PG_GETARG_CHAR = char
cstring - PG_GETARG_CSTRING  = char*
text- PG_GETARG_TEXT_P   = text*

What type is it in SQL terms? That tells you what type you use at the C
level.

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


[GENERAL] Encoding problem

2006-08-30 Thread Pantelis Natsiavas
Hello, I am really new to PostgreSQL and I seem to have an  encoding problem. I come from Greece and I would like to make queries  using greek characters too. I chose to write my database using encoding  UTF8 and everything worked just fine creating it, until I tried to make  a query using greek characters. I created the whole database using pgadmin, and I entered greek characters simply through it. I tried to make the query through JDBC but this was impossible, receiving a message saying :relation "??" does not existwhere the relation's name is in greek characters. Despite fact that the  relation is normally created, named and filled using greek characters,  I could not make the query.In addition trying to make the same query
  through the query tool of pgadmin, I receive the same answer and of  course null results. I don't know if it matters, but I am using  Windows XP and PostgreSQL 8.1 with JDBC 3. I have checked everything  that has to do with the java part of encoding and I cannot find  anything wrong. The fact that I could not make the query through the  pgadmin query tool, shows that the problem lays at the PostgreSQL part. What could I do? Can anyone help me?Thank you in advance,Natsiavas Pantelis 
	

	
		Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Chris Mair

 I am about to install PostgreSQL on a minimal Linux system, where root
 is the only user that is allowed to exist. I would prefer to use a
 binary installer. Is it possible to install PostgreSQL without the
 postgres user?

PostgreSQL refuses to start up as root user for security
reasons (this is a feature).

If you know what you're doing and you want to disable that
feature you need to recompile from source and disable the
uid checks in src/backend/main/main.c.

Unless you're working in the embedded space or some such thing,
I don't think it's a good idea, anyway.

Bye :)
Chris.
 

-- 

Chris Mair
http://www.1006.org


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Tom Lane
Fredrik Israelsson [EMAIL PROTECTED] writes:
 I am about to install PostgreSQL on a minimal Linux system, where root
 is the only user that is allowed to exist.

You've *got* to be kidding.  That's possibly the stupidest system design
decision I've ever heard ... what is the point of disallowing non-root
userids?  It certainly can't improve system security to run everything
as root.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Fredrik Israelsson
Well, no actual design decision is made yet. Just testing...

...actually, in embedded, minimalistic environments, I don't think it's
unusual to have one and only one user.

/Fredrik 

-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED] 
Sent: den 30 augusti 2006 15:17
To: Fredrik Israelsson
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] PostgreSQL on system with root as only user 

Fredrik Israelsson [EMAIL PROTECTED] writes:
 I am about to install PostgreSQL on a minimal Linux system, where root

 is the only user that is allowed to exist.

You've *got* to be kidding.  That's possibly the stupidest system design
decision I've ever heard ... what is the point of disallowing non-root
userids?  It certainly can't improve system security to run everything
as root.

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Andrew Kelly
On Wed, 2006-08-30 at 09:17 -0400, Tom Lane wrote:
 Fredrik Israelsson [EMAIL PROTECTED] writes:
  I am about to install PostgreSQL on a minimal Linux system, where root
  is the only user that is allowed to exist.
 
 You've *got* to be kidding.  That's possibly the stupidest system design
 decision I've ever heard ... what is the point of disallowing non-root
 userids?  It certainly can't improve system security to run everything
 as root.


Remember the glory of heaven and earth before man was created?

;-)


   regards, tom lane
 
 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Confused about locales

2006-08-30 Thread Tomi NA

On 8/19/06, John Gunther [EMAIL PROTECTED] wrote:

I've been reading about locales, encodings, sort orders, the to_ascii
function and, embarrasingly, I'm more confused than enlightened.:

What I want is very simple:
1) I want the database to correctly accept, store, and display
alphabetic characters, including European accented characters, in HTML
forms.
2) I want sorting to ignore the diacritical marks so that, for example,
u, u-accent, and u-umlaut are all sorted as if they were plain u.
3) I want sorting to ignore non-alphanumerics, letter case, and white space.

To illustrate, the following data is in sorted order:

St-Émile
stendahl
st ènders
St. Epson

Can someone tell me what combination of PostgreSQL and Linux settings I
need for this? It seems like a very basic question, but I'm just dense,
I guess. I've tried a half dozen time-consuming configs without success.


Well, you'll obviously have to use UTF if you plan on supporting more
then one language with different accented characters. The sorting
issue is a bit of a problem, though. Pgsql uses the same collation in
all databases in a database cluster (carved into stone at cluster
init) so I don't know of a good way you could collate your datayou
could concievably keep a copy of accented strings replacing the
accented characters with their non-accented counterparts as you see
fit and collate on that column, but that's not a very elegant way of
handling the problem, is it?
You might have more luck with another database like mysql 4.1+ (where
accent-insensitive UTF collation is directly supported), MS SQL (where
you can define encoding and collation settings at the database level,
and so concievably have a database for each language, if you know
exactly which languages you'll have) or Firebird (where you define an
encoding at the column level and can collate any way you wish in each
column).

Hope I've helped,
t.n.a.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 03:34:22PM +0200, Fredrik Israelsson wrote:
 Well, no actual design decision is made yet. Just testing...
 
 ...actually, in embedded, minimalistic environments, I don't think it's
 unusual to have one and only one user.

Yeah, but in embedded minimalisatic POSIX-compatable environment, I
imagine multiple users are somewhat of a requirement. It's not like a
UID costs anything, it's just a number...

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


[GENERAL] PLPERL Function very Slow

2006-08-30 Thread Alex

Hi,
i am having a problem with a plperl function i am trying to write.
(using 8.1.4)

the function does a select (ca 30,000 rows) using

  spi_query($query); while (my $row = spi_fetchrow($handle))

and within the while loop inserts the record into a table using
spi_exec_query($query);

The initial select is pretty fast and first inserts very fast, but after
a few thousand inserts the inserts start to slow down until it crawls.
Writing the same in a normal perl script takes less than 90 seconds
while the function is taking 10 minutes.

My guess is that it is all memory related and was wondering if there is
a memory leak (as I read in some mails) or if there is a better way to
do what I want.

Also is there a way to commit transactions within a stored procedure /
function? I noticed that if I do a delete and insert within the same
function that the deletes are not committed until the function returns.

Thanks for any advice.

Alex





---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread AgentM


On Aug 30, 2006, at 9:01 , Chris Mair wrote:



If you know what you're doing and you want to disable that
feature you need to recompile from source and disable the
uid checks in src/backend/main/main.c.

Unless you're working in the embedded space or some such thing,
I don't think it's a good idea, anyway.


Has anyone actually used PostgreSQL on an embedded system? I am  
genuinely curious. How about db performance from a flash drive?


-M

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] plz unsubscribe me

2006-08-30 Thread rama krishna
 please unsubscribe from this  thank u


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Bill Moran
In response to rama krishna [EMAIL PROTECTED]:

please unsubscribe from this
   thank u
 

Instructions are in the mail headers of each message:

List-Archive: http://archives.postgresql.org/pgsql-general
List-Help: mailto:[EMAIL PROTECTED]
List-ID: pgsql-general.postgresql.org
List-Owner: mailto:[EMAIL PROTECTED]
List-Post: mailto:pgsql-general@postgresql.org
List-Subscribe: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]

-- 
Bill Moran
Collaborative Fusion Inc.

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[GENERAL] Postgres

2006-08-30 Thread garcez

Prezado Suporte,

Gostaria de saber se existe upgradedo
BD Postgres 7.2.1 para BD Postgres 8.1? onde consigo obter?

Desde já agradeço atenção dispensada

Respeitosamente,   
  
  

  
   Bruno Lima Garcez
  
   Primeiro-Tenente (RM2-T)
 DCoM - Diretoria
de Contas da Marinha
  
 DC 07 - Divisão de Informática
  
  tel: (21) 2104-5385
Nós nos transformamos naquilo que praticamos com frequência. A perfeição,
portanto, não é um ato isolado. É um hábito. (Aristóteles)


Re: [GENERAL] Deathly slow performance on SMP red-hat system

2006-08-30 Thread Patrick TJ McPhee
In article [EMAIL PROTECTED],
Joshua D. Drake [EMAIL PROTECTED] wrote:
% Patrick TJ McPhee wrote:
[...]
[the query is select 1]
%  But if I turn on duration logging, I get timings like
%   LOG:  duration: 91.480 ms

[...]

% Vacuum? Analyze?

I had autovacuum on initially, but turned it off. The slowness was in
evidence from the point the data was loaded, when presumably vacuum would
be superfluous. The data is analyzed. Right now, I'm not so
worried about my real data as select 1 being two orders of magnitude
slower than I'd expect it to be.

Steve Poe asked if I've modified postgresql.conf, and if the database and
logs are on separate volumes.

The .conf file has the memory parameters (shared buffers, work mem,
effective cache size, etc) bumped up quite a bit. We have the block size
set to 16k and the statistics target has been increased from the
default. I had some of the planner costs adjusted as well, but they
don't seem to be material to the problem. It's basically a copy of the
.conf file that's working well in production on similar hardware under
NetBSD.

The logs and data are all one file system, which seems to be on a logical
volume with a single disk sitting under it.

Florian Pflug reports that he had a similar problem due to a slow RAID
controller driver, to which I have no comment.

Thanks for your comments.

-- 

Patrick TJ McPhee
North York  Canada
[EMAIL PROTECTED]

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[GENERAL] SQL Tuning

2006-08-30 Thread Enrique Alejandro Barrios
Hola, soy nuevo por acá, quisiera saber si me pueden ayudar para ver que 
modificaciones puedo hacerle a esta consulta para que funciones mas rápido ya 
que como esta ahora consume mucha cpu y memoria.
desde ya muchas gracias.
saludos

query

SELECT DISTINCT 
t.id,  
emp.descripcion as contratista, 
fecha_etapa_cod(eh.idetapa , '12') as asignado , 
t.id AS calden, 
trabajosistemao.reclamo, 
tt.descripcion, 
oc.calle, 
oc.numero, 
s.descripcion || ' - ' || s.medida  || ' - ' || s.tipo  AS solado, 
oc.cantidad,  
oc.largo, 
oc.ancho, 
oc.profundidad, 
oc.piezas, 
entrecalle_siade_cod(trabajosistemao.reclamo) as entrecalle

FROM obracivil AS oc INNER JOIN etapahead AS eh ON oc.idetapa = eh.idetapa) 
 
INNER JOIN trabajo AS t ON eh.idtrabajo = t.id)
INNER JOIN aprobacion AS ap ON ap.idetapa = eh.idetapa)
INNER JOIN solado AS s ON oc.idsolado = s.idsolado)  
LEFT JOIN trabajosistemao ON t.id = trabajosistemao.id, empresa emp, 
tipotrabajo tt

WHERE fecha_etapa_cod(eh.idetapa , '3') is null AND
(oc.discrim)='D' AND

emp.idcontratista = empresa_etapa_cod(eh.idetapa) AND

tt.idtipotrabajo = idtipotrabajo_etapa_cod(eh.idetapa) AND

empresa_etapa_cod(eh.idetapa) in (500189) AND

fecha_etapa_cod(eh.idetapa , '12') between '2006-05-30' and '2006-06-30'

--select max(fecha) from aprobacion  where idetapa = $1 and idestado = $2 
--INNER JOIN aprobacion AS ap ON ap.idetapa = eh.idetapa)

UNION

SELECT 
eh.idtrabajo as id, 
emp.descripcion as contratista, 
aprobacion.fecha as asignado , 
eh.idtrabajo as calden,
trabajosistemao.reclamo, 
tt.descripcion, 
oc.calle, 
oc.numero, 
'' as solado, 
oc.cantidad,  
oc.largo, 
oc.ancho, 
oc.profundidad, 
oc.piezas, 
entrecalle_siade_cod(trabajosistemao.reclamo) as entrecalle
FROM (((
  trabajosistemao INNER JOIN etapahead AS eh ON trabajosistemao.id = 
eh.idtrabajo) 
  LEFT JOIN obracivil AS oc ON eh.idetapa = oc.idetapa) 
  INNER JOIN aprobacion ON eh.idetapa = aprobacion.idetapa) 
  INNER JOIN trabajo AS t ON trabajosistemao.id = t.id, empresa emp, 
tipotrabajo tt
WHERE (((trabajosistemao.reclamo) Is Not Null) AND ((oc.idetapa) Is Null) AND 
((eh.idetapa) Not In (SELECT DISTINCT etapamecanica.idetapa FROM etapamecanica 
INNER JOIN aprobacion ON etapamecanica.idetapa = aprobacion.idetapa WHERE 
(((aprobacion.idestado)='3' AND ((aprobacion.idestado)='12'))
AND emp.idcontratista = empresa_etapa_cod(eh.idetapa) 
AND tt.idtipotrabajo = idtipotrabajo_etapa_cod(eh.idetapa)
AND empresa_etapa_cod(eh.idetapa) in (500189) 
AND aprobacion.fecha between '2006-05-30' and '2006-06-30';



Explain output
*---


Unique  (cost=193218032.67..193218032.75 rows=1 width=278)
  -  Sort  (cost=193218032.67..193218032.67 rows=2 width=278)
Sort Key: id, contratista, asignado, calden, reclamo, descripcion, 
calle, numero, solado, cantidad, largo, ancho, profundidad, piezas, entrecalle
-  Append  (cost=1707.38..193218032.66 rows=2 width=278)
  -  Subquery Scan *SELECT* 1  (cost=1707.38..1707.43 rows=1 
width=278)
-  Unique  (cost=1707.38..1707.43 rows=1 width=278)
  -  Sort  (cost=1707.38..1707.39 rows=1 width=278)
Sort Key: t.id, emp.descripcion, 
fecha_etapa_cod(eh.idetapa, 12::numeric), t.id, trabajosistemao.reclamo, 
tt.descripcion, oc.calle, oc.numero, s.descripcion || ' - '::character 
varying) || s.medida) || ' - '::character varying) || s.tipo), oc.cantidad, 
oc.largo, oc.ancho, oc.profundidad, oc.piezas, 
entrecalle_siade_cod(trabajosistemao.reclamo)
-  Nested Loop  (cost=1624.89..1707.37 rows=1 
width=278)
  Join Filter: (inner.idtipotrabajo = 
idtipotrabajo_etapa_cod(outer.idetapa))
  -  Nested Loop  (cost=1624.89..1705.57 
rows=1 width=246)
Join Filter: (inner.idcontratista 
= empresa_etapa_cod(outer.idetapa))
-  Nested Loop  
(cost=1624.89..1691.56 rows=10 width=220)
  -  Hash Join  
(cost=1624.89..1630.10 rows=10 width=192)
Hash Cond: 
(outer.idsolado = inner.idsolado)
-  Seq Scan on solado 
s  (cost=0.00..3.37 rows=137 width=47)
-  Hash  
(cost=1624.86..1624.86 rows=10 width=145)
  -  Nested Loop  
(cost=0.00..1624.86 rows=10 width=145)
-  Nested 
Loop  (cost=0.00..1609.53 rows=1 width=133)
  -  
Nested Loop  (cost=0.00..1603.66 rows=1 width=120)

-  Seq Scan 

Re: [GENERAL] PLPERL Function very Slow

2006-08-30 Thread Tom Lane
Alex [EMAIL PROTECTED] writes:
 The initial select is pretty fast and first inserts very fast, but after
 a few thousand inserts the inserts start to slow down until it crawls.
 Writing the same in a normal perl script takes less than 90 seconds
 while the function is taking 10 minutes.

Can you provide a self-contained test case that shows this behavior?

regards, tom lane

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Postgres

2006-08-30 Thread Clodoaldo Pinto

Em 29/08/06, [EMAIL PROTECTED][EMAIL PROTECTED] escreveu:


Prezado Suporte,

Gostaria de saber se existe upgradedo BD Postgres 7.2.1 para BD Postgres
8.1? onde consigo obter?


Bruno,

Esta lista é apenas em inglês. Para suporte em português procure:

http://wiki.postgresql.org.br/

http://pgfoundry.org/mailman/listinfo/brasil-usuarios

Saudações, Clodoaldo Pinto

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Brandon Aiken
Unless it's a read-only database, I would never recommend using flash
media for an RDBMS.

Unless it's a small database, I would never recommend using USB as a
storage interface for an RDBMS.

--
Brandon Aiken
CS/IT Systems Engineer
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of AgentM
Sent: Wednesday, August 30, 2006 10:42 AM
To: PostgreSQL General ML
Subject: Re: [GENERAL] PostgreSQL on system with root as only user


On Aug 30, 2006, at 9:01 , Chris Mair wrote:


 If you know what you're doing and you want to disable that
 feature you need to recompile from source and disable the
 uid checks in src/backend/main/main.c.

 Unless you're working in the embedded space or some such thing,
 I don't think it's a good idea, anyway.

Has anyone actually used PostgreSQL on an embedded system? I am  
genuinely curious. How about db performance from a flash drive?

-M

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] Fwd: How to convert a string to bytea?

2006-08-30 Thread Chris Hoover
-- Forwarded message --From: Chris Hoover [EMAIL PROTECTED]Date: Aug 30, 2006 12:22 PM
Subject: How to convert a string to bytea?To: pgsql-admin@postgresql.org pgsql-admin@postgresql.org
I am in need of some help. I need to use the encode function against a text string in one of my pg/plsql functions. However, the encode function expects a bytea field to be passed to it. How do I convert my text string into a bytea?
Thanks,Chris




Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Joshua D. Drake

Bill Moran wrote:

In response to rama krishna [EMAIL PROTECTED]:


   please unsubscribe from this
  thank u



Instructions are in the mail headers of each message:

List-Archive: http://archives.postgresql.org/pgsql-general
List-Help: mailto:[EMAIL PROTECTED]
List-ID: pgsql-general.postgresql.org
List-Owner: mailto:[EMAIL PROTECTED]
List-Post: mailto:pgsql-general@postgresql.org
List-Subscribe: mailto:[EMAIL PROTECTED]
List-Unsubscribe: mailto:[EMAIL PROTECTED]



Actually it is quite ridiculous that we expect someone to read the mail 
headers.


Joshua D. Drake


--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes:
 Bill Moran wrote:
 Instructions are in the mail headers of each message:

 Actually it is quite ridiculous that we expect someone to read the mail 
 headers.

Those headers are really there for mail programs to read.  On my MUA
(a several-years-old version of exmh), messages containing these headers
causes an additional menu entry to appear, with List/Unsubscribe and
some other options.  I suppose there are still people using mailers that
don't know about RFC2369, but considering that that standard was
published in 1998, there's not a whole lot of excuse for that.

In any case, we also expend bandwidth on a couple of footer TIPs that
remind people how to unsubscribe.  Maybe one of them should explicitly
say that mailing to the list is not the way.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Encoding problem

2006-08-30 Thread John DeSoi


On Aug 30, 2006, at 6:29 AM, Pantelis Natsiavas wrote:

 In addition trying to make the same query through the query tool  
of pgadmin, I receive the same answer and of course null results. I  
don't know if it matters, but I am using Windows XP and PostgreSQL  
8.1 with JDBC 3. I have checked everything that has to do with the  
java part of encoding and I cannot find anything wrong. The fact  
that I could not make the query through the pgadmin query tool,  
shows that the problem lays at the PostgreSQL part.

What could I do? Can anyone help me?


A few issues to check:

1. pgadmin will double quote table names that have special  
characters, mixed case, or reserved words. So double check the exact  
table name and perhaps try double quoting it in your query.


2. Be sure your table's schema is on the search_path.

3. Double check the value of client_encoding.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Joshua D. Drake

Tom Lane wrote:

Joshua D. Drake [EMAIL PROTECTED] writes:

Bill Moran wrote:

Instructions are in the mail headers of each message:


Actually it is quite ridiculous that we expect someone to read the mail 
headers.


Those headers are really there for mail programs to read.  On my MUA
(a several-years-old version of exmh), messages containing these headers
causes an additional menu entry to appear, with List/Unsubscribe and
some other options.  I suppose there are still people using mailers that
don't know about RFC2369, but considering that that standard was
published in 1998, there's not a whole lot of excuse for that.


Thunderbird, which I expect MANY of our community users are using does 
nothing with those headers (as far as I can tell).


Outlook and Outlook express, which many of our community users will be 
using in the future (by nature of our win32 port) to my knowledge does 
nothing with those headers.


I know that Evolution has some functionality based on those headers, but 
no one in their right might would use it (yes that it a blatant smack).


I also seriously doubt that Apple Mail or Mac Mail (whatever it is 
called) does anything with the headers either.




In any case, we also expend bandwidth on a couple of footer TIPs that
remind people how to unsubscribe.  Maybe one of them should explicitly
say that mailing to the list is not the way.


Our lists (the @postgresql.org ones) are the only lists to which I 
subscribe that do not put the unsubscribe info at the bottom of every 
email sent to the list.


Sincerely,

Joshua D. Drake




regards, tom lane




--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread AgentM


On Aug 30, 2006, at 12:03 , Brandon Aiken wrote:


Unless it's a read-only database, I would never recommend using flash
media for an RDBMS.


Well, it's an embedded device, so you can pretty much be certain that  
it's not storing sales information. If the flash goes belly up, then  
the device has failed anyway, so the lost info is the least of the  
problems.




Unless it's a small database, I would never recommend using USB as a
storage interface for an RDBMS.


Why? Could you provide more details?

I would be interested in any performance numbers anyone has collected.

-M

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Bill Moran
In response to Joshua D. Drake [EMAIL PROTECTED]:

 Tom Lane wrote:
  Joshua D. Drake [EMAIL PROTECTED] writes:
  Bill Moran wrote:
  Instructions are in the mail headers of each message:
  
  Actually it is quite ridiculous that we expect someone to read the mail 
  headers.

I don't find it so.  That's like saying it's ridiculous to expect the
average auto owner to change the oil every 3000 miles.  Reading headers
isn't a terribly esoteric thing to do.  I taught an intro to email class
back in 2000 and spent about 5 minutes explaining headers and what they
meant.  The students didn't have any difficulty grasping the concept, and
I got the impression that they found the information enlightening.

  Those headers are really there for mail programs to read.  On my MUA
  (a several-years-old version of exmh), messages containing these headers
  causes an additional menu entry to appear, with List/Unsubscribe and
  some other options.  I suppose there are still people using mailers that
  don't know about RFC2369, but considering that that standard was
  published in 1998, there's not a whole lot of excuse for that.
 
 Thunderbird, which I expect MANY of our community users are using does 
 nothing with those headers (as far as I can tell).

I've never been a big fan of Thunderbird.

 Outlook and Outlook express, which many of our community users will be 
 using in the future (by nature of our win32 port) to my knowledge does 
 nothing with those headers.

It's a shame that nobody at Microsoft is smart enough to figure it out.

The thing that really gets me is that Sylpheed doesn't use them ...

 Our lists (the @postgresql.org ones) are the only lists to which I 
 subscribe that do not put the unsubscribe info at the bottom of every 
 email sent to the list.

I guess that makes RFC2369 another great idea that nobody's paying attention
to ...

shame ...

-- 
Bill Moran
Collaborative Fusion Inc.

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Erik Jones
There are good reasons why that is not a feature found in many popular 
email clients.  The biggest of which is that if it was people would use 
it all the time and spammers would abuse it as a way to cull current 
email addresses.  As a matter of fact, most large esp's encourage their 
clients to not use any unsubscribe links in unsolicited email (spam) due 
the this type of practice.  Microsoft's moving towards a system using it 
(it's currently in their Hotmail Live Beta) that only gives the 
unsubscribe option if the sender is in the recipient's address book or 
the recipient has previously ok'd the sender as being legit.


Joshua D. Drake wrote:

Tom Lane wrote:

Joshua D. Drake [EMAIL PROTECTED] writes:

Bill Moran wrote:

Instructions are in the mail headers of each message:


Actually it is quite ridiculous that we expect someone to read the 
mail headers.


Those headers are really there for mail programs to read.  On my MUA
(a several-years-old version of exmh), messages containing these headers
causes an additional menu entry to appear, with List/Unsubscribe and
some other options.  I suppose there are still people using mailers that
don't know about RFC2369, but considering that that standard was
published in 1998, there's not a whole lot of excuse for that.


Thunderbird, which I expect MANY of our community users are using does 
nothing with those headers (as far as I can tell).


Outlook and Outlook express, which many of our community users will be 
using in the future (by nature of our win32 port) to my knowledge does 
nothing with those headers.


I know that Evolution has some functionality based on those headers, 
but no one in their right might would use it (yes that it a blatant 
smack).


I also seriously doubt that Apple Mail or Mac Mail (whatever it is 
called) does anything with the headers either.




In any case, we also expend bandwidth on a couple of footer TIPs that
remind people how to unsubscribe.  Maybe one of them should explicitly
say that mailing to the list is not the way.


Our lists (the @postgresql.org ones) are the only lists to which I 
subscribe that do not put the unsubscribe info at the bottom of every 
email sent to the list.


Sincerely,

Joshua D. Drake




regards, tom lane







--
erik jones [EMAIL PROTECTED]
software development
emma(r)


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Joshua D. Drake

Bill Moran wrote:

In response to Joshua D. Drake [EMAIL PROTECTED]:


Tom Lane wrote:

Joshua D. Drake [EMAIL PROTECTED] writes:

Bill Moran wrote:

Instructions are in the mail headers of each message:
Actually it is quite ridiculous that we expect someone to read the mail 
headers.


I don't find it so.  That's like saying it's ridiculous to expect the
average auto owner to change the oil every 3000 miles.  Reading headers


Uhh... no. A better analogy would be:

expecting an average postgresql user to vacuum

Which is completely different then expecting the average user to have a 
clue or care what an email header is. Email headers are part of the 
source code of email, not part of the usage to users (man that sounds 
weird).



isn't a terribly esoteric thing to do.  I taught an intro to email class
back in 2000 and spent about 5 minutes explaining headers and what they
meant.  The students didn't have any difficulty grasping the concept, and
I got the impression that they found the information enlightening.


All due respect, but you are the 2% of the 98%. Not a common user, 
frankly no common DBA should ever have to read email headers, ever. That 
is what an systems administrator is for (sometimes, yes they are one and 
the same).


Our lists (the @postgresql.org ones) are the only lists to which I 
subscribe that do not put the unsubscribe info at the bottom of every 
email sent to the list.


I guess that makes RFC2369 another great idea that nobody's paying attention
to ...

shame ...


Now that I won't disagree with but then again, when was the last time 
you say a compliant web browser?  ;)


Sincerely,

Joshua D. Drake




--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread Robert Treat
On Monday 28 August 2006 17:04, Peter Eisentraut wrote:
 Tony Caduto wrote:
  http://newsvac.newsforge.com/newsvac/06/08/28/1738259.shtml
 
  Don't know the validity of this dvd order test they did, but the
  article claims Postgresql only did 120 OPM.

 The contest evaluated the solutions sent in by whoever wanted to
 participate.  This doesn't prove anything, except that the MySQL
 marketing department is exceptionally slow.  These contest results were
 published months ago.

Seems they are fast where it counts... namely getting a team of developers on 
top of the contest so they come out shining.  Too bad people in this 
community don't see the value of paying people to do advocacy related 
development. 

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread Brandon Aiken
I haven't got any numbers (or a USB stick I can test with at the moment)
but USB is going to be a bottleneck for read and write performance.
Unless you're accessing very small amounts of data or running small
queries, I would expect performance to be pretty poor.
 
If your data set is so small, why do you need a full RDBMS instead of
flat data/text files or SQLite?  If you're not concerned about disk
media failure, why do you need a transactional DB?  It seems like
putting a deadbolt on a screen door.

It might work just great for your device, of course, but I would not
expect it to scale well at all.

--
Brandon Aiken
CS/IT Systems Engineer

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of AgentM
Sent: Wednesday, August 30, 2006 1:21 PM
To: PostgreSQL General ML
Subject: Re: [GENERAL] PostgreSQL on system with root as only user


On Aug 30, 2006, at 12:03 , Brandon Aiken wrote:

 Unless it's a read-only database, I would never recommend using flash
 media for an RDBMS.

Well, it's an embedded device, so you can pretty much be certain that  
it's not storing sales information. If the flash goes belly up, then  
the device has failed anyway, so the lost info is the least of the  
problems.


 Unless it's a small database, I would never recommend using USB as a
 storage interface for an RDBMS.

Why? Could you provide more details?

I would be interested in any performance numbers anyone has collected.

-M

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Alvaro Herrera
Tom Lane wrote:

 In any case, we also expend bandwidth on a couple of footer TIPs that
 remind people how to unsubscribe.  Maybe one of them should explicitly
 say that mailing to the list is not the way.

One of them talks about unregister, because of which you'd think we're
already covered.  Getting much more verbose than that is a waste,
because you're then entering the territory of people who's not smart
enough to read the tips at the bottom.

On the other hand, the people soliciting unsubscription on the list
itself is not that many.  I did a simple-minded research a couple of
months ago, based on the unsubscription requests to the pgsql-es-ayuda
list (which was, I'd say, ten times more frequent than for all the
english lists I'm on, combined); versus people who unsubscribed
correctly using the Majordomo interface.  The latter were much more
numerous than I had expected.

So I don't think we should do anything about it.  It's not really a
serious problem.

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[GENERAL] Tsearch2 Hebrew

2006-08-30 Thread Yonatan Ben-Nes




Hello all,


I want to use Tsearch2
for a current project I have but I can't seem to find a way to
implement it on hebrew content.
I found that there is
an hebrew Ispell project and apparently I can use it as a dictionary
but I can't find any hebrew stemmer to work properly with it, or maybe
I'm wrong and I can work only with the dictionary?
Any information will be
helpful.



Thanks a lot in advance!
Yonatan Ben-Nes





Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes:
 So I don't think we should do anything about it.  It's not really a
 serious problem.

Actually, what I'd like to see done is to get majordomo to bounce list
messages containing unsubscribe in the subject, with an explanatory
message about the right way to unsubscribe.  There's no reason the rest
of us should be bothered.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] PLPERL Function very Slow

2006-08-30 Thread codeWarrior
1 -- Drop your indexes on the table to be inserted into.
2 -- Execute a BEGIN transaction
3 -- Execute your inserts.
4 -- Execute a commit or rollback and END transaction
5 -- Rebuild / recreate your indexes





Alex [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,
 i am having a problem with a plperl function i am trying to write.
 (using 8.1.4)

 the function does a select (ca 30,000 rows) using

   spi_query($query); while (my $row = spi_fetchrow($handle))

 and within the while loop inserts the record into a table using
 spi_exec_query($query);

 The initial select is pretty fast and first inserts very fast, but after
 a few thousand inserts the inserts start to slow down until it crawls.
 Writing the same in a normal perl script takes less than 90 seconds
 while the function is taking 10 minutes.

 My guess is that it is all memory related and was wondering if there is
 a memory leak (as I read in some mails) or if there is a better way to
 do what I want.

 Also is there a way to commit transactions within a stored procedure /
 function? I noticed that if I do a delete and insert within the same
 function that the deletes are not committed until the function returns.

 Thanks for any advice.

 Alex





 ---(end of broadcast)---
 TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match
 



---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Joshua D. Drake

Tom Lane wrote:

Alvaro Herrera [EMAIL PROTECTED] writes:

So I don't think we should do anything about it.  It's not really a
serious problem.


Actually, what I'd like to see done is to get majordomo to bounce list
messages containing unsubscribe in the subject, with an explanatory
message about the right way to unsubscribe.  There's no reason the rest
of us should be bothered.


I would agree with that.

Joshua D. Drake




regards, tom lane




--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


[GENERAL] Dblink and connections to MySQL?

2006-08-30 Thread Brian Maguire








Does anyone have any recommendations or
experiences on connecting a postgres db to a mysql db possibly through dblink
or another technology? Does dblink just do postgres to postgres? There is not
a lot documentation on that contrib.



Thanks,

Brian








Re: [GENERAL] PostgreSQL on system with root as only user

2006-08-30 Thread AgentM


On Aug 30, 2006, at 13:58 , Brandon Aiken wrote:

I haven't got any numbers (or a USB stick I can test with at the  
moment)

but USB is going to be a bottleneck for read and write performance.
Unless you're accessing very small amounts of data or running small
queries, I would expect performance to be pretty poor.


Indeed, that's pretty much our scenario- a rack-mounted Linux box  
storing mostly inconsequential data (auth creds) with a flash drive- 
quasi-embedded, I guess.




If your data set is so small, why do you need a full RDBMS instead of
flat data/text files or SQLite?  If you're not concerned about disk
media failure, why do you need a transactional DB?  It seems like
putting a deadbolt on a screen door.


MySQL and SQLite have terrible concurrent performance with  
transactions. We would also like to take advantage of database-level  
replication instead of our fragile home-grown thing for load-sharing  
and failover.




It might work just great for your device, of course, but I would not
expect it to scale well at all.


There are some things I can do- for example, fsync should probably  
just be off. I guess I should simply go ahead and try it. Thanks for  
the discussion!


-M

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] Listening on more than one port?

2006-08-30 Thread Michael Nolan
I need to be able to have postmaster (8.1.2) listen on more than one port, eg, 5432 and some other port, such as 5431.There does not appear to be a way to configure that. You can configure multiple IP addresses, but not multiple ports.
If I set up a TCP port redirector like rinetd, to forward packets from port 5431 to port 5432 it appears to be forwarding packets to the right port with a simple telnet session (based on errors in the log file) but psql still says there is no postmaster listening on port 5431.
Is there a simple way to do this that I'm overlooking?--Mike Nolan


Re: [GENERAL] Status on Fedora Core Extras packaging

2006-08-30 Thread Bruno Wolff III
On Wed, Aug 30, 2006 at 12:12:30 +0300,
  Devrim GUNDUZ [EMAIL PROTECTED] wrote:
 
 More will be in FC Extras. Please let me know that if you want to see
 any PostgreSQL related software in the repository. I do have time to
 package all related stuff.

Do you think you could have a way to store target coordinates and access times
in a Postgres database for people who want to use Fedora's Orbital Laser?

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Dblink and connections to MySQL?

2006-08-30 Thread Joe Conway

Brian Maguire wrote:
Does anyone have any recommendations or experiences on connecting a 
postgres db to a mysql db possibly through dblink or another 
technology?  Does dblink just do postgres to postgres?  There is not a 
lot documentation on that contrib.


What brings you to that conclusion? dblink has more documentation than 
most of the rest of the contrib modules. See README.dblink and 
contrib/dblink/doc/*. Feel free to contribute more in areas you feel are 
lacking...


But yes, dblink is only postgres-to-postgres. There are several spinoffs 
that do postgres-to-other-rdbms located on gborg or pgfoundry.


Joe


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] Fwd: How to convert a string to bytea?

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 12:22:47 -0400:
 -- Forwarded message --
 From: Chris Hoover [EMAIL PROTECTED]
 Date: Aug 30, 2006 12:22 PM
 Subject: How to convert a string to bytea?
 To: pgsql-admin@postgresql.org pgsql-admin@postgresql.org
 
 I am in need of some help.  I need to use the encode function against a text
 string in one of my pg/plsql functions.  However, the encode function
 expects a bytea field to be passed to it.  How do I convert my text string
 into a bytea?

See decode()/encode() in
http://www.postgresql.org/docs/8.1/static/functions-binarystring.html

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Dblink and connections to MySQL?

2006-08-30 Thread Tony Caduto

Hi Brian,
Dblink is for postgresql to postgresql, you have to use DBI-Link for 
connections to other databases.

http://pgfoundry.org/projects/dbi-link/

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration 



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 02:42:58PM -0500, Michael Nolan wrote:
 I need to be able to have postmaster (8.1.2) listen on more than one port,
 eg, 5432 and some other port, such as 5431.

Why?

 If I set up a TCP port redirector like rinetd, to forward packets from port
 5431 to port 5432 it appears to be forwarding packets to the right port with
 a simple telnet session (based on errors in the log file) but psql still
 says there is no postmaster listening on port 5431.

Are you sure psql was using TCP? If you're connecting to the localhost
maybe it used UNIX domain sockets. It still needs a matching port
number there too...

 Is there a simple way to do this that I'm overlooking?

Address translation in the firewall?

Hope this helps,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread Martijn van Oosterhout
On Wed, Aug 30, 2006 at 01:54:56PM -0400, Robert Treat wrote:
 Seems they are fast where it counts... namely getting a team of developers on 
 top of the contest so they come out shining.  Too bad people in this 
 community don't see the value of paying people to do advocacy related 
 development. 

I don't remember this ever being mentioned on the lists? I never heard
of it. Maybe if it had been mentioned here it would've got more
attention?

It's true there isn't a group here looking for competitions to enter...

Have a ncie day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 From each according to his ability. To each according to his ability to 
 litigate.


signature.asc
Description: Digital signature


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 14:11:11 -0400:
 Alvaro Herrera [EMAIL PROTECTED] writes:
  So I don't think we should do anything about it.  It's not really a
  serious problem.
 
 Actually, what I'd like to see done is to get majordomo to bounce list
 messages containing unsubscribe in the subject, with an explanatory
 message about the right way to unsubscribe.  There's no reason the rest
 of us should be bothered.

Please at least make it at least /^subject:\s*unsubscribe\s*$/i
so it doesn't bounce valid mail.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 12:32:21 -0500:
 There are good reasons why that is not a feature found in many popular 
 email clients.  The biggest of which is that if it was people would use 
 it all the time and spammers would abuse it as a way to cull current 
 email addresses.

IOW getting rid of the web subscription form would probably
cut a nice dent into the Subject: unsubscribe heap.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread AgentM


On Aug 30, 2006, at 16:11 , Martijn van Oosterhout wrote:


On Wed, Aug 30, 2006 at 01:54:56PM -0400, Robert Treat wrote:
Seems they are fast where it counts... namely getting a team of  
developers on

top of the contest so they come out shining.  Too bad people in this
community don't see the value of paying people to do advocacy related
development.


I don't remember this ever being mentioned on the lists? I never heard
of it. Maybe if it had been mentioned here it would've got more
attention?

It's true there isn't a group here looking for competitions to  
enter...


Perhaps because PostgreSQL is too busy competing with itself? Is  
anyone aware of any other open-source project that has added so many  
new features in the past year?


-M

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] Dblink and connections to MySQL?

2006-08-30 Thread Robert Treat
On Wednesday 30 August 2006 15:41, Tony Caduto wrote:
 Hi Brian,
 Dblink is for postgresql to postgresql, you have to use DBI-Link for
 connections to other databases.
 http://pgfoundry.org/projects/dbi-link/

Note that you can use some of the pl functions themselves to accomplish this 
as well, plphp for instance. 

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Alvaro Herrera
Roman Neuhauser wrote:
 # [EMAIL PROTECTED] / 2006-08-30 14:11:11 -0400:
  Alvaro Herrera [EMAIL PROTECTED] writes:
   So I don't think we should do anything about it.  It's not really a
   serious problem.
  
  Actually, what I'd like to see done is to get majordomo to bounce list
  messages containing unsubscribe in the subject, with an explanatory
  message about the right way to unsubscribe.  There's no reason the rest
  of us should be bothered.
 
 Please at least make it at least /^subject:\s*unsubscribe\s*$/i
 so it doesn't bounce valid mail.

Which is why this particular thread would have made it to the list
anyway (as it did).

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Greg Sabino Mullane

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Tom Lane opined:
 Actually, what I'd like to see done is to get majordomo to bounce list
 messages containing unsubscribe in the subject, with an explanatory
 message about the right way to unsubscribe.  There's no reason the rest
 of us should be bothered.

I've set it up to hold messages with subscribe in the subject line
for moderator approval. Which means any more replies to this thread
will be held as well, of course. :)

For the record, I unsubbed the original complainer after his first post,
so he didn't get a chance to see all the fun he stirred up.

- --
Greg Sabino Mullane [EMAIL PROTECTED]
End Point Corporation
PGP Key: 0x14964AC8 200608301626
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-

iD8DBQFE9fSmvJuQZxSWSsgRAv7/AKDiYIjZfj0zOVRyIgtjXl0JQsrECQCfTvK3
uj/ifkhRqevkX/RWov+BDX4=
=SoHl
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Robert Treat
On Wednesday 30 August 2006 14:14, Joshua D. Drake wrote:
 Tom Lane wrote:
  Alvaro Herrera [EMAIL PROTECTED] writes:
  So I don't think we should do anything about it.  It's not really a
  serious problem.
 
  Actually, what I'd like to see done is to get majordomo to bounce list
  messages containing unsubscribe in the subject, with an explanatory
  message about the right way to unsubscribe.  There's no reason the rest
  of us should be bothered.

 I would agree with that.


That could be fun on the slony lists... :-)

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Dblink and connections to MySQL?

2006-08-30 Thread Joshua D. Drake

Brian Maguire wrote:

Does anyone have any recommendations or experiences on connecting a
postgres db to a mysql db possibly through dblink or another technology?
Does dblink just do postgres to postgres?  There is not a lot
documentation on that contrib.


You could probably use DBIlink for that.. check pgfoundry.

SIncerely,

Joshua D. Drake




 


Thanks,

Brian





--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread Joshua D. Drake

Martijn van Oosterhout wrote:

On Wed, Aug 30, 2006 at 01:54:56PM -0400, Robert Treat wrote:
Seems they are fast where it counts... namely getting a team of developers on 
top of the contest so they come out shining.  Too bad people in this 
community don't see the value of paying people to do advocacy related 
development. 


I don't remember this ever being mentioned on the lists? I never heard
of it. Maybe if it had been mentioned here it would've got more
attention?

It's true there isn't a group here looking for competitions to enter...

Have a ncie day,


I *think* Robert's point is that a paid advocate may have actually been 
looking for this type of thing to come up and would help organize an effort.


Sincerely,

Joshua D. Drake

--

   === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
   Providing the most comprehensive  PostgreSQL solutions since 1997
 http://www.commandprompt.com/



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Michael Nolan
On 8/30/06, Martijn van Oosterhout kleptog@svana.org wrote:
On Wed, Aug 30, 2006 at 02:42:58PM -0500, Michael Nolan wrote: I need to be able to have postmaster (8.1.2) listen on more than one port, eg, 5432 and some other port, such as 5431.Why?
Situation in a nutshell:Production and test databases are on two separate systems inside the firewall. The web server is at an ISP, outside the firewall.The firewall sends all data coming from the ISP, port 5432 to a specific IP address inside the firewall: port 5432, which is the production serve. 
Test transactions need to go to the other server, which has to be the same IP address (the address of the firewall), so it needs to be a different port, but I'm not sure if the port translator in the firewall will do any better at getting a response that than a port translator on the test server does.
However, I also need the test database responding to requests on port 5432. Are you sure psql was using TCP? If you're connecting to the localhost
maybe it used UNIX domain sockets. It still needs a matching portnumber there too...Yes, I was using psql -h 10.x.x.x -p 5431 dbname username--Mike Nolan
 Is there a simple way to do this that I'm overlooking?Address translation in the firewall?Hope this helps,--Martijn van Oosterhout kleptog@svana.org
 http://svana.org/kleptog/ From each according to his ability. To each according to his ability to litigate.-BEGIN PGP SIGNATURE-Version: GnuPG 
v1.4.1 (GNU/Linux)iD8DBQFE9fByIB7bNG8LQkwRAtVTAJ9BzO0OAI7uUByKau+JzXPON4LckACdGg7xrZMpNhhmIVFWqiVtDVQYSaw==X/3S-END PGP SIGNATURE-


Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Wayne Conrad
If you need to run two separate databases on the same box, each with
its own port, then having two clusters would be one way to go.  Each
cluster has its own postgresql.conf and so each cluster can be (must
be, if I'm not mistaken) configured to listen on a separate port.

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread Robert Treat
On Wednesday 30 August 2006 16:48, Joshua D. Drake wrote:
 Martijn van Oosterhout wrote:
  On Wed, Aug 30, 2006 at 01:54:56PM -0400, Robert Treat wrote:
  Seems they are fast where it counts... namely getting a team of
  developers on top of the contest so they come out shining.  Too bad
  people in this community don't see the value of paying people to do
  advocacy related development.
 
  I don't remember this ever being mentioned on the lists? I never heard
  of it. Maybe if it had been mentioned here it would've got more
  attention?
 

FWIW it was mentioned and discussed on the german postgresql list.

  It's true there isn't a group here looking for competitions to enter...
 
 I *think* Robert's point is that a paid advocate may have actually been
 looking for this type of thing to come up and would help organize an
 effort.


Right... these types of things come up all the time, whether they be 
benchmarks, contests, tutorials, or just general application support, and all 
of the commercial database companies (ie. oracle, ibm, ms, mysql) have people 
on staff to point at these tasks.  The community has been good about full 
time developers working on core, but seems to overlook all of the other areas 
that you can point a paid developer that will increase adoption.  

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Dennis Reaves




Hello all!

I'm trying to install postgresql and I'm getting the following error;

error: failed dependencies: 
libc.so.6(GLIBC_2.3) is needed by 
postgresql-8.1.4-3PGDG 
libcrypto.so.4 is needed by 
postgresql-8.1.4-3PGDG 
libpq.so.4 is needed by 
postgresql-8.1.4-3PGDG 
libssl.so.4 is needed by postgresql-8.1.4-3PGDG
Any suggestion on trying to resolve this? I can't seem to find 
anything that helps.

Thanks all!

Thanks!Dennis 
Reaves+1.917.209.4108MSN: [EMAIL PROTECTED] ICQ: 2166319Skype: 
dennis.reavesCONFIDENTIALITY 
NOTICE:The information contained in this e-mail may be 
confidential and/or privileged. This e-mail is intended to be reviewed 
initially by only the individual or individuals named above. If the reader 
of this e-mail is not one of the intended recipients or a representative of 
an intended recipient, you are hereby notified that any review, 
dissemination or copying of this e-mail or the information contained herein 
is prohibited. If you have received this e-mail in error, please immediately 
notify the sender by telephone and permanently delete this 
e-mail.Thank you! 



Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Steve Atkins


On Aug 30, 2006, at 2:49 PM, Dennis Reaves wrote:



Hello all!

I'm trying to install postgresql and I'm getting the following error;

error: failed dependencies:
libc.so.6(GLIBC_2.3)   is needed by postgresql-8.1.4-3PGDG
libcrypto.so.4   is needed by postgresql-8.1.4-3PGDG
libpq.so.4   is needed by postgresql-8.1.4-3PGDG
libssl.so.4   is needed by postgresql-8.1.4-3PGDG
Any suggestion on trying to resolve this?  I can't seem to find  
anything that helps.




Redhat 7.2 is about five years old, which is very old by
the standards of Linux distributions.

I've no doubt that current Postgresql versions will compile from
source and run on 7.2, but you're fairly unlikely to find RPMs
for current versions of PG that support such a geriatric linux
release. You could try installing the various dependent RPMs
you list, but I suspect you'll end up chasing dependencies for
quite a while.

So you most likely need to do one of 1) update your box to
a more recent distribution, 2) install postgresql from source
or 3) start grabbing RPMs to install the newer libraries that
the postgresql RPM you have needs.

Cheers,
  Steve





---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Alan Hodgson
On Wednesday 30 August 2006 14:49, Dennis Reaves [EMAIL PROTECTED] wrote:
 Any suggestion on trying to resolve this?  I can't seem to find anything
 that helps.

a) install an operating system that isn't 5 years old.

or b) try rebuilding packages from the source RPM.

or c) install from source.

Binary RPM's have to be built on a system very similar to the one they will 
be running on to meet their dependencies.  

-- 
Alan

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Douglas McNaught
Dennis Reaves [EMAIL PROTECTED] writes:

 Hello all!
  
 I'm trying to install postgresql and I'm getting the following error;
  
 error: failed dependencies:
 libc.so.6(GLIBC_2.3)   is needed by postgresql-8.1.4-3PGDG
 libcrypto.so.4   is needed by postgresql-8.1.4-3PGDG
 libpq.so.4   is needed by postgresql-8.1.4-3PGDG
 libssl.so.4   is needed by postgresql-8.1.4-3PGDG
 Any suggestion on trying to resolve this?  I can't seem to find anything that
 helps.

RH7.2 is *ancient*.  You will probably have to build from the SRPMs as
the libraries needed by the binary RPMs are much newer than your OS.

-Doug

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve Atkins wrote:
 
 On Aug 30, 2006, at 2:49 PM, Dennis Reaves wrote:
[snip]
 I've no doubt that current Postgresql versions will compile from
 source and run on 7.2, but you're fairly unlikely to find RPMs

Really?  Most system libraries have changed quite a bit in 5 years.
 If PG uses any new functions, thhtt goes the build.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is common sense really valid?
For example, it is common sense to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that common sense is obviously wrong.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE9hrPS9HxQb37XmcRAlSCAKC0X2N+I12zFHzpytI17BeKwvo9uwCfXS8a
MWA2f3ubW7pdzCWGmHUSuu4=
=87D2
-END PGP SIGNATURE-

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[GENERAL] Dependency graph of all tuples relied upon in a query answer

2006-08-30 Thread Randall Lucas
I'm storing facts about an entity (e.g., company) in a normalized
form with various repeating groups, link tables, etc.  My workflow
requires that after (or as part of) collecting these facts, I be able
to sign off as having verified all of the facts that pertain to a
given company.  I understand this as meaning I need to sign off on each
row that was used in answering the query select * from company left
join ...

An inverted way of thinking about the problem is the notion of getting a
source document (say, a company registration form) and parsing and
storing it in a normalized format.  How do you tag the origin of each
and every row in every table that resulted from that source document?
It is possible to do so by associating an extra column with each
inserted or modified value (yuck).

It seems to me that the elegant way to do this would be to get the
entire graph of dependencies for not only all tables that reference the
entity, but only those rows within those tables that refer specifically
to my entity.

The query engine should have a pretty good idea about which tables and
which rows would actually be used in forming the responses to a given
query.  How can I get this information?  Or am I off the deep end (-ency
graph) with this one?

Best,

Randall

-- 
Randall Lucas   Tercent, Inc.   DF93EAD1

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Steve Atkins


On Aug 30, 2006, at 4:10 PM, Ron Johnson wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve Atkins wrote:


On Aug 30, 2006, at 2:49 PM, Dennis Reaves wrote:

[snip]

I've no doubt that current Postgresql versions will compile from
source and run on 7.2, but you're fairly unlikely to find RPMs


Really?  Most system libraries have changed quite a bit in 5 years.
 If PG uses any new functions, thhtt goes the build.


Postgresql is a well-written, portable package that tries to avoid
stupid linux-specific tricks. I've not tried it, but I'd be surprised if
it didn't compile on an old linux installation with fairly minimal
effort.

Cheers,
  Steve


---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Steve Crawford
Alan Hodgson wrote:
 On Wednesday 30 August 2006 14:49, Dennis Reaves [EMAIL PROTECTED] wrote:
 Any suggestion on trying to resolve this?  I can't seem to find anything
 that helps.
 
 a) install an operating system that isn't 5 years old.
 
 or b) try rebuilding packages from the source RPM.
 
 or c) install from source.

Option c has always worked well for me on RH 7.[23].

The OP may have a problem similar to mine - systems that contains dozens
of quite expensive cards (in my case Dialogic) which are tied to
proprietary drivers with very particular version/kernel requirements. We
run our PG servers on recent OS versions but have to compile
clients/libs on RH 7.2 and 7.3.

Cheers,
Steve

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Postgresql mentioned on Newsforge MySQL article

2006-08-30 Thread Tim Allen

Martijn van Oosterhout wrote:

On Wed, Aug 30, 2006 at 01:54:56PM -0400, Robert Treat wrote:

Seems they are fast where it counts... namely getting a team of developers on 
top of the contest so they come out shining.  Too bad people in this 
community don't see the value of paying people to do advocacy related 
development. 



I don't remember this ever being mentioned on the lists? I never heard
of it. Maybe if it had been mentioned here it would've got more
attention?

It's true there isn't a group here looking for competitions to enter...

Have a ncie day,


Speaking for myself, I'm _delighted_ that the core postgres developers 
spend their time improving postgres, rather than spending their time on 
random beauty contests.


Tim

--
---
Tim Allen  [EMAIL PROTECTED]
Proximity Pty Ltd  http://www.proximity.com.au/

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] Installing on Redhat 7.2

2006-08-30 Thread Dennis Reaves

Doug:

Thanks a-lot; that worked perfectly!

Thanks,
-Dennis

- Original Message - 
From: Douglas McNaught [EMAIL PROTECTED]

To: Dennis Reaves [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Sent: Wednesday, August 30, 2006 6:49 PM
Subject: Re: [GENERAL] Installing on Redhat 7.2



Dennis Reaves [EMAIL PROTECTED] writes:


Hello all!

I'm trying to install postgresql and I'm getting the following error;

error: failed dependencies:
libc.so.6(GLIBC_2.3)   is needed by postgresql-8.1.4-3PGDG
libcrypto.so.4   is needed by postgresql-8.1.4-3PGDG
libpq.so.4   is needed by postgresql-8.1.4-3PGDG
libssl.so.4   is needed by postgresql-8.1.4-3PGDG
Any suggestion on trying to resolve this?  I can't seem to find anything 
that

helps.


RH7.2 is *ancient*.  You will probably have to build from the SRPMs as
the libraries needed by the binary RPMs are much newer than your OS.

-Doug




---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] Listening on more than one port?

2006-08-30 Thread Kelly Burkhart

On 8/30/06, Michael Nolan [EMAIL PROTECTED] wrote:

Situation in a nutshell:

Production  and test databases are on two separate systems inside the
firewall.  The web server is at an ISP, outside the firewall.

The firewall sends all data coming from the ISP, port 5432 to a specific IP
address inside the firewall: port 5432, which is the production serve.

Test transactions need to go to the other server, which has to be the same
IP address (the address of the firewall), so it needs to be a different
port, but I'm not sure if the port translator in the firewall will do any
better at getting a response  that than a port translator on the test server
does.

However, I also need the test database responding to requests on port 5432.


Your firewall can probably redirect firewallhost:5431 to
insidehost:5432.  If not, you could use something like simpleproxy on
insidehost to do what you want.

http://sourceforge.net/projects/simpleproxy/

-K

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] pg_config --includedir is null

2006-08-30 Thread Keith Hutchison

G'day

After a successful make install of postgresql-8.1.3 with msys and mingw
pg_config --includedir is null ...

I want to to show the correct includedir to allow libpqxx to compile.
Any clues on how to recompile postgres or pg_config to show the
correct directories?

Thanks in advance

--
Keith Hutchison
http://balance-infosystems.com http://realopen.org
http://www.kasamba.com/Keith-Hutchison


Output of pg_config
$ /c/usr/src/postgresql-8.1.3/src/bin/pg_config/pg_config.exe
BINDIR = c:/usr/src/POSTGR~1.3/src/bin/PG_CON~1
DOCDIR =
INCLUDEDIR =
PKGINCLUDEDIR =
INCLUDEDIR-SERVER =
LIBDIR =
PKGLIBDIR =
LOCALEDIR =
MANDIR =
SHAREDIR =
SYSCONFDIR =
PGXS =
CONFIGURE =
CC = gcc
CPPFLAGS = -I./src/include/port/win32 -DEXEC_BACKEND
-I../../../src/include/port/win32
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
CFLAGS_SL =
LDFLAGS = -Wl,--allow-multiple-definition
LDFLAGS_SL =
LIBS = -lpgport -lz -lwsock32 -lm  -lws2_32 -lshfolder
VERSION = PostgreSQL 8.1.3

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster