Re: [GENERAL] How to make it work? (PL/Perl + Net::LDAP)

2007-07-15 Thread Stuart Cooper
PL/Perl won't let you use modules, you need to createlang plperlu (u for "untrusted") and use that. Hope this helps, Stuart. On 7/16/07, Bruno Lavoie <[EMAIL PROTECTED]> wrote: hello, simple problem, I hope I can do this working on! If i'm on a wrong place, just tell me where I can find answer

Re: [GENERAL] How to make it work? (PL/Perl + Net::LDAP)

2007-07-15 Thread Joshua D. Drake
Bruno Lavoie wrote: hello, if ($mesg == 0) { return true; } else { return false; } $body$ LANGUAGE 'plperl' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; WHY: compile without the use Net::LDAP and crash at runtime...? don't compiles with the use of Net::LDAP? You need plperlu not

[GENERAL] How to make it work? (PL/Perl + Net::LDAP)

2007-07-15 Thread Bruno Lavoie
hello, simple problem, I hope I can do this working on! If i'm on a wrong place, just tell me where I can find answers to my problem Here's my first pl/perl routine that compile very well: my $ldap = Net::LDAP->new('mydc.mycomp.com'); my $bind_uid = 'DOMAIN\\'.$_[0]; my $mesg = $ldap

Re: [GENERAL] Could not create log file error?

2007-07-15 Thread novnov
That is all that the error contains. I try to start postgres and it returns that error. I had tried to set the perms to allow creation of files but for some reason it didn't stick. Redid and all ok. I'm still curious as to why there is the log in the etc/.../main dir (actually I see now that it'

Re: [GENERAL] Could not create log file error?

2007-07-15 Thread Tom Lane
novnov <[EMAIL PROTECTED]> writes: > * Error: Could not create log file > /var/lib/postgresql/8.2/main/pg_log/postgresql-2007-07-15_143020.log > I manually created a dir called pg_log, since it wasn't already there. What > am I missing? Wrong ownership or permissions of that directory, likely. Y

Re: [GENERAL] count the number of bits set to 1 in a bit string field

2007-07-15 Thread Stefan Becker
Hi, I don't quite know what you mean by a "bit string field" but for any numeric, better integer row can use the following construct: Say the bits you where testing where bit 3 ('0100' bit), and bit 6 ('0010' bit) of say some_integer row then this would do it: select sum(case whe

Re: [GENERAL] count the number of bits set to 1 in a bit string field

2007-07-15 Thread Ragnar
On sun, 2007-07-15 at 15:35 -0400, Rajarshi Guha wrote: > Hi, is there a built in function that will give me the number of bits > that are set to 1 in a bit string field? no, but it should be trivial to do with pl/pgsql a naive implementation could be: create or replace function bitsetlen(bit)

Re: [GENERAL] Could not create log file error?

2007-07-15 Thread novnov
And the other thing that I have found puzzling is that there *is* already a log file in the main postgres dir, right next to postgresql.cong (/etc/postgresql/8.2/main). In postgresql.cong all logging was rem'd; but that log file was being updated. What's the difference between the log file that wa

[GENERAL] pg_dump without blobs

2007-07-15 Thread Sébastien Boutté
Hi, I have a postgressql database with a table containing a bytea field. I would like to dump without this particulary field in order to improve dump and restore time. I try with options : -n public (without -b) but it's always the same, the dump is huge. How can i do that ? Do i have to convert

[GENERAL] Could not create log file error?

2007-07-15 Thread novnov
I am rather unsure of postgres logging, but I think the way to go is to unrem some of the lines in postgresql.conf, restart the db. Now I get this: * Starting PostgreSQL 8.2 database server * Error: Could not create log file /var/lib/postgresql/8.2/main/pg_l

[GENERAL] count the number of bits set to 1 in a bit string field

2007-07-15 Thread Rajarshi Guha
Hi, is there a built in function that will give me the number of bits that are set to 1 in a bit string field? Thanks, --- Rajarshi Guha <[EMAIL PROTECTED]> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE

[GENERAL] slony over LAN and VPN

2007-07-15 Thread angga erwina
hi, all... i would like to replicate my dbase over LAN and VPN,could you help me please,give the tutorial or url that i can follow it step-by-step..especially about the configuration in admin conninfo... thank you very much, regards, Bayu - Don't be flak

[GENERAL] Joining with set returning functions

2007-07-15 Thread Tuukka Norri
Hi all, Can tables be joined with set returning functions? For example, it is indeed possible to perform queries such as this: SELECT oid, do_something (oid) FROM pg_class WHERE relkind = 'r'; Here, do_something returns only one record. What I'd like to do instead is to select from a funct

Re: [GENERAL] smtp

2007-07-15 Thread Devrim GÜNDÜZ
Hi, On Sun, 2007-07-15 at 09:49 +0100, paddy carroll wrote: > Can I have a straw poll on the best way to glue smtp to postgres, is > exim the only option? Postfix is another strong option (I haven't heard exim-postgres before, btw) Regards, -- Devrim GÜNDÜZ PostgreSQL Replication, Consulting,

[GENERAL] authorizations for a statement

2007-07-15 Thread Zlatko Matić
What authorizations are needed for the following statement: UPDATE "pg_class" SET "reltriggers" = 0 WHERE "relname" = 'orders'; ?

[GENERAL] smtp

2007-07-15 Thread paddy carroll
Can I have a straw poll on the best way to glue smtp to postgres, is exim the only option? Cheers ---(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 d

Re: [GENERAL] PostgreSQL equivelant of this MySQL query

2007-07-15 Thread paddy carroll
select split_part(usr_email,'@',2) ||split_part(usr_email,'@',1) from .. Hi all, I am reading through some docs on switching to Postfix with a SQL backend. The docs use MySQL but I want to use PgSQL so I am trying to adapt as I go. I am stuck though; can anyone help give me the PgSQL