Re: [GENERAL] Linux + PostgreSQL stats?
> Hello all. Microsoft just posted a rather cutting article > describing NT vs Linux performance. Is there a way > we could fill in the TPC-C statistics? > > http://www.microsoft.com/ntserver/nts/news/msnw/nt4vLinux.asp I got this off Linux Gazette: http://www.linuxgazette.com/issue41/raymond.html Interesting, especially after reading the MS page. MS must be scared to start this stuff. -- Bruce Momjian| http://www.op.net/~candle [EMAIL PROTECTED]| (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026
Re: [GENERAL] Trying to make functions in 'C'
> "fb" == fabian baena <[EMAIL PROTECTED]> writes: fb> I'm tying to learn how to make function in 'C'. fb> I'm trying to compile a program I made in 'C'. fb> The command I gave were: fb> % gcc -fPIC -c addone.c -I/usr/local/pgsql/include fb> % ld -G -Bdynamic -o addone.so addone.o fb> and created the function in postgres like this: fb> CREATE FUNCTION add_one(int4) RETURNS int4 fb> AS './addone.so' LANGUAGE 'c'; fb> The function I made looks like this: fb> #include "postgres.h" fb> int fb> add_one(int arg) fb> { fb> return arg + 1; fb> } fb> But when I try to test the function in postgres I recieve this error: fb> ERROR: stat failed on file ./addone.so fb> ERROR: stat failed on file ./addone.so fb> Can anyone tell where did I make a mistake? fb> I have a linux on a PC. Pehaps not 'int', but 'int4' in argument and return type? Except this I think your example is right. -- Anatoly K. Lasareff Email: [EMAIL PROTECTED] Senior programmer
Re: [GENERAL] Trying to make functions in 'C'
> I'm tying to learn how to make function in 'C'. > I'm trying to compile a program I made in 'C'. > The command I gave were: > > % gcc -fPIC -c addone.c -I/usr/local/pgsql/include > % ld -G -Bdynamic -o addone.so addone.o > > and created the function in postgres like this: > > CREATE FUNCTION add_one(int4) RETURNS int4 > AS './addone.so' LANGUAGE 'c'; ^ one must provide an absolute path here --Gene
[GENERAL] Trying to make functions in 'C'
I'm tying to learn how to make function in 'C'. I'm trying to compile a program I made in 'C'. The command I gave were: % gcc -fPIC -c addone.c -I/usr/local/pgsql/include % ld -G -Bdynamic -o addone.so addone.o and created the function in postgres like this: CREATE FUNCTION add_one(int4) RETURNS int4 AS './addone.so' LANGUAGE 'c'; The function I made looks like this: #include "postgres.h" int add_one(int arg) { return arg + 1; } But when I try to test the function in postgres I recieve this error: ERROR: stat failed on file ./addone.so ERROR: stat failed on file ./addone.so Can anyone tell where did I make a mistake? I have a linux on a PC. Thank you. Fabian. __ Get Your Private, Free Email at http://www.hotmail.com
Re: [GENERAL] RH 6.0 and PostgreSQL
Did you perhaps previously build postgres yourself, and now maybe Redhat has overwritten the configuration? Ricardo Peres wrote: > > Hello, > > After upgrading to RedHat 6.0, PostgreSQL no longer works... > Whenever I try to start the postmaster daemon, using > /erc/rc.d/init.d/postmaster script, I receive a message about postgresql > not finding the data directory. I checked /var/lib/pgsql, and in fact it > does not contain anything! > Am I missing something? > > Thanks in advance! > > PS-BTW, please e-mail-me directly, as I am not subscribed to this list! > > - > Ricardo Peres > E-mail: [EMAIL PROTECTED] > ICQ UIN: 708926 > TM: 0931 9459192 > Departamento de Engenharia Informática > Universidade de Coimbra > PORTUGAL > - -- Chris Bitmead http://www.bigfoot.com/~chris.bitmead mailto:[EMAIL PROTECTED]