Re: [GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Ow Mun Heng
On Tue, 2008-01-29 at 19:16 +, Dave Page wrote: > On Jan 29, 2008 6:16 PM, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > > > I try to be reasonable (no laughing people :)). > > Oh it's hard, so very, very hard! > But seriously, I've ranted on this some time ago( and you can tell that I'm ab

Re: [GENERAL] [ADMIN] Can we have 2 databases on same server

2008-01-29 Thread Gregory Williamson
Suresh Gupta asked: > > I have Solaris 9 machine with Pgsql 7.4 and want to upgrade to 8.2.5. I > don't want to disturb the first version now. I want to install second > one separately and need to test with my application. If it works fine, I > will activate only the latest one and other version

Re: [GENERAL] Can we have 2 databases on same server

2008-01-29 Thread Chris
1) Can I please know, if we can run 2 databases on the same server with out any conflicts? You can as long as they are installed in separate locations. That is: db1: /usr/local/pgsql/7.4 db2: /usr/local/pgsql/8.1 The main reason is so your app doesn't pick up the wrong binary and use

Re: [GENERAL] [ADMIN] how to create cluster(loadbanacing) of postgresql server

2008-01-29 Thread Brian Modra
http://slony.info/ On 30/01/2008, yogesh m chaudhari <[EMAIL PROTECTED]> wrote: > > Hi Friends > Can any Guys help me to create postgresql Cluster. > Is there any useful link or Info. related to cluster than pl mail me. > > -- > This message has been scanned for viruses and > dangerous content by

Re: [GENERAL] PGCon vs Postgresql Conference

2008-01-29 Thread Joshua D. Drake
Sim Zacks wrote: Anyway my suggestion to Sim is to read about each conference on the respective conference websites: http://www.postgresqlconference.org/why/ http://www.pgcon.org/2008/ I read those, I was just confused as to why there were 2 conferences on the same topics one right after the o

[GENERAL] Can we have 2 databases on same server

2008-01-29 Thread Suresh Gupta VG
Hi Team, I have Solaris 9 machine with Pgsql 7.4 and want to upgrade to 8.2.5. I don't want to disturb the first version now. I want to install second one separately and need to test with my application. If it works fine, I will activate only the latest one and other version 7.4 will be discard

Re: [GENERAL] PGCon vs Postgresql Conference

2008-01-29 Thread Sim Zacks
Anyway my suggestion to Sim is to read about each conference on the respective conference websites: http://www.postgresqlconference.org/why/ http://www.pgcon.org/2008/ I read those, I was just confused as to why there were 2 conferences on the same topics one right after the other. Someone ment

Re: [GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
On Tue, 29 Jan 2008, David Owen wrote: On Tue, 29 Jan 2008, David Owen wrote: I discovered that if I change the rule to only do the insert, I still have troubles. The first update to simple2 will insert an row, but a second update will give a duplicate primary key error. Sorry, that's a ba

Re: [GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
On Tue, 29 Jan 2008, David Owen wrote: CREATE TABLE simple1(a varchar, b varchar, c timestamp DEFAULT now(), d timestamp, PRIMARY KEY(a, c)); CREATE VIEW simple2 AS SELECT a, b FROM simple1 WHERE d IS NULL; INSERT INTO simple1(a, b) VALUES('a', '1'); CREATE RULE simple2_upd AS ON UPDATE TO si

[GENERAL] [OT] Slony + Alter table using pgadmin

2008-01-29 Thread Ow Mun Heng
This is OT for this list and I don't have access to I-net (only email) and I'm not subscribed to the Slony list. I need to add a few additional columns to an existing replicated set/table. I know that I can't just add the columns normally but have to go through slonik's EXECUTE SCRIPT (/usr/bin/sl

[GENERAL] how to create cluster(loadbanacing) of postgresql server

2008-01-29 Thread yogesh m chaudhari
Hi FriendsCan any Guys help me to create postgresql Cluster.Is there any useful link or Info.  related to cluster than pl mail me. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

Re: [GENERAL] Autovacuum and stats_row_level

2008-01-29 Thread Tom Lane
Chander Ganesan <[EMAIL PROTECTED]> writes: > David Wall wrote: >> Noted that to use autovacuum we need to turn on stats_row_level (along >> with stats_start_collector that is on by default). Since >> stats_row_level is off by default, I wonder what sort of overhead is >> incurred since it soun

Re: [GENERAL] [ADMIN] Backup

2008-01-29 Thread Guido Barosio
AFAIK Dominic needs a plug-in certified by Symantec, and that is not the case. As you may have read prior to this mail, the common way is to pg_dump against a file, picking up that file later with BackupExec as a regular file. We are currently (www.globant.com) using it that way, no problems at a

Re: [GENERAL] [ADMIN] Backup

2008-01-29 Thread Vishal Arora
PostgreSQL has its own inbuilt mechanism for backing up the database. you can refer to the postgres manual online for more information. http://www.postgresql.org/docs/8.2/interactive/backup.html - Vishal Subject: [ADMIN] BackupDate: Thu, 24 Jan 2008 14:08:26 -0500From: [EMAIL PROTECTED]:

Re: [GENERAL] Autovacuum and stats_row_level

2008-01-29 Thread Chander Ganesan
David Wall wrote: Noted that to use autovacuum we need to turn on stats_row_level (along with stats_start_collector that is on by default). Since stats_row_level is off by default, I wonder what sort of overhead is incurred since it sounds like it could add up if it's storing additional stats

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29 Jan 2008 18:36:02 -0800 Reece Hart <[EMAIL PROTECTED]> wrote: > I'm guessing lack of maintenance... the SFPUG hasn't maintained David > for a very long time. We think he lives at Casa Donde, but no one is > really sure where that is. I th

Re: [GENERAL] enabling autovacuum

2008-01-29 Thread Chander Ganesan
Jeremy Harris wrote: Hi, We're starting to run autovacuum for the first time on a system that's been running with nightly cron-driven vacuum for some time. Version: PostgreSQL 8.2.4 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20070418 (Red Hat 4.1.2-10) We have one problematic

[GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
I'm trying to create a table that maintains change-history and a modifable view over it showing only current data. The delete and insert rules work well, but I'm having trouble getting my update rule to work (it contains two statements, the others contain only one each). Here's a simple demon

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Reece Hart
On Tue, 2008-01-29 at 13:28 -0500, Geoffrey wrote: > Are you speaking from personal experience, or just of the lack of > maintenance? I'm guessing lack of maintenance... the SFPUG hasn't maintained David for a very long time. We think he lives at Casa Donde, but no one is really sure where that

Re: [GENERAL] How can I avoid PGPool as a single point of failure?

2008-01-29 Thread Chander Ganesan
Hello... [EMAIL PROTECTED] wrote: I'm interested in using PGPool to do the load balancing, and it was suggested that I put one server running PGPool in front of two database servers. This only seems to move my risk to the PGPool machine. You could use linux hearbeat to allow one Pgpool serve

Re: [GENERAL] PGCon vs Postgresql Conference

2008-01-29 Thread Selena Deckelmann
On Jan 29, 2008 12:22 PM, Bruce Momjian <[EMAIL PROTECTED]> wrote: > Sim Zacks wrote: > > Is there any real difference between PGCon and Postgresql Conference > > East/West or is it the same idea in different places? > > > > My question is actually which people should go to which conference? > > Th

Re: [GENERAL] View fields are cast as text and link to Access as a Memo field

2008-01-29 Thread Tom Lane
Karen Springer <[EMAIL PROTECTED]> writes: > I need employeeName to be a text field in Access. I have tried casting > the fields in the view as varchar, but it seem to default back to ::text. The result of a || operator is always going to be type text. Put the cast around the whole expression,

[GENERAL] View fields are cast as text and link to Access as a Memo field

2008-01-29 Thread Karen Springer
Hi, I have a table CREATE TABLE "HR"."Participant_Names" ( "PIP" int4 NOT NULL, "LastNAME" varchar(32) NOT NULL, "FirstName" varchar(20) NOT NULL, "NameUsed" varchar(20), CONSTRAINT "pkey_PIP" PRIMARY KEY ("PIP"), ) WITHOUT OIDS; and a view CREATE OR REPLACE VIEW "HR"."tvw_EmployeeNames_A

Re: [GENERAL] PGCon vs Postgresql Conference

2008-01-29 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29 Jan 2008 15:22:59 -0500 (EST) Bruce Momjian <[EMAIL PROTECTED]> wrote: > Sim Zacks wrote: > > Is there any real difference between PGCon and Postgresql > > Conference East/West or is it the same idea in different places? > > > > My questio

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 03:16:41PM -0500, A.M. wrote: > ...and Pg.pm includes a serious security hole in the form of non- > existent query escaping which will never be fixed. Are we really > discussing the semantics of "rust"? It has never done that escaping. No rust has occurred. This is a

Re: [GENERAL] PGCon vs Postgresql Conference

2008-01-29 Thread Bruce Momjian
Sim Zacks wrote: > Is there any real difference between PGCon and Postgresql Conference > East/West or is it the same idea in different places? > > My question is actually which people should go to which conference? They are different conferences. I think PGCon is more for backend developers, w

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread A.M.
On Jan 29, 2008, at 2:36 PM, Andrew Sullivan wrote: On Tue, Jan 29, 2008 at 01:56:35PM -0500, A.M. wrote: The postgresql from eight years ago is also quite rusty. No, it's not, which is my point. If you don't need any of the features you mention, and are aware of the limitations, there's

Re: [GENERAL] Analyze Explanation

2008-01-29 Thread Michael Fuhr
On Tue, Jan 29, 2008 at 10:11:38AM -0800, Willem Buitendyk wrote: > When I run Analyze I get the following notice repeated for many of my > tables: > > NOTICE: no notnull values, invalid stats > > Is this just refering to my empty tables? The PostGIS function compute_geometry_stats() logs suc

Re: [GENERAL] Analyze Explanation

2008-01-29 Thread Tom Lane
Willem Buitendyk <[EMAIL PROTECTED]> writes: > When I run Analyze I get the following notice repeated for many of my > tables: > NOTICE: no notnull values, invalid stats There's no such message in the core Postgres code. Perhaps it's coming from an add-on, such as Postgis? If so, you should p

Re: [GENERAL] Table has duplicate keys, what did I do

2008-01-29 Thread Tom Lane
John Gateley <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: >> There was a fix released in 8.1.9 for a problem that could cause VACUUM >> FULL to create duplicate copies of a row that had recently been updated. >> Does that sound like a plausible scenario for your usage? > Yes,

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 01:56:35PM -0500, A.M. wrote: > The postgresql from eight years ago is also quite rusty. No, it's not, which is my point. If you don't need any of the features you mention, and are aware of the limitations, there's nothing wrong with using it. The v2 protocol works, for i

Re: [GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Dave Page
On Jan 29, 2008 6:16 PM, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > I try to be reasonable (no laughing people :)). Oh it's hard, so very, very hard! :-) /D ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread A.M.
On Jan 29, 2008, at 1:07 PM, Andrew Sullivan wrote: On Tue, Jan 29, 2008 at 08:14:28AM -0800, David Fetter wrote: I wouldn't trust that library or anything that depends on it if I were you. It's been unmaintained for a *very* long time. Because code rusts when it's sitting around on a h

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-29 Thread Tom Lane
"Vlad Marchenko" <[EMAIL PROTECTED]> writes: > I'm curious if that new hash aggregation algorithm was put in 8.3 with the > performance increase as a goal Yes. http://archives.postgresql.org/pgsql-hackers/2007-05/msg01179.php http://archives.postgresql.org/pgsql-committers/2007-06/msg7.php (a

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Vivek Khera
On Jan 29, 2008, at 7:24 AM, Glyn Astill wrote: I'm trying yo run a perl script that uses DBI (Slonys psql_replication_check.pl to be precise) and I'm getting the error: Can't locate Pg.pm in @INC It doesn't use DBI, it uses Pg. At some point I posted patches to convert it to DBI and DBD

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Geoffrey
David Fetter wrote: On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote: well its using the pgsql_replication_check.pl, which does: -- use Pg; I wouldn't trust that library or anything that depends on it if I were you. It's been unmaintained for a *very* long time

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-29 Thread Vlad
More test results for public. We ran my original query and found out that on 4 cores CPU: 1 thread test 8.2 bits 8.3 by 10..15% 4 threads 8.2. wins 8.3 by ~2% 8 threads 8.3 finally wins 8.2 by ~2% the same data set was affected during multi-threaded runs, but it's 100% cached from the disk. I gue

Re: [GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29 Jan 2008 13:03:29 -0500 Tom Hart <[EMAIL PROTECTED]> wrote: > I've checked out the docs online, and they've helped me a great deal. > I've also read excerpts from the free online version of practical. > I'll stick with my current strategy

Re: [GENERAL] Table has duplicate keys, what did I do

2008-01-29 Thread John Gateley
On Tue, 29 Jan 2008 12:53:11 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > John Gateley <[EMAIL PROTECTED]> writes: > > Tom Lane <[EMAIL PROTECTED]> wrote: > >> John Gateley <[EMAIL PROTECTED]> writes: > >>> Somehow I have managed to have two tables with duplicate keys. > > >> What PG version is th

[GENERAL] Analyze Explanation

2008-01-29 Thread Willem Buitendyk
When I run Analyze I get the following notice repeated for many of my tables: NOTICE: no notnull values, invalid stats Is this just refering to my empty tables? ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 08:14:28AM -0800, David Fetter wrote: > > I wouldn't trust that library or anything that depends on it if I were > you. It's been unmaintained for a *very* long time. Because code rusts when it's sitting around on a hard drive? Pg.pm doesn't get much attention, I agree,

Re: [GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Tom Hart
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29 Jan 2008 12:53:25 -0500 Tom Hart <[EMAIL PROTECTED]> wrote: Hey everybody. I was just informed that our organization has a credit at amazon.com and asked if I had any books I wanted. I've been thinking about get

Re: [GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 29 Jan 2008 12:53:25 -0500 Tom Hart <[EMAIL PROTECTED]> wrote: > Hey everybody. I was just informed that our organization has a credit > at amazon.com and asked if I had any books I wanted. I've been > thinking about getting a postgresql book,

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Andrew Sullivan
On Tue, Jan 29, 2008 at 04:24:05AM -0800, Glyn Astill wrote: > Hi chaps, > > I'm trying yo run a perl script that uses DBI (Slonys > psql_replication_check.pl to be precise) and I'm getting the error: > > Can't locate Pg.pm in @INC Pg.pm isn't DBI. It's the Pg Perl interface. A --

[GENERAL] postgresql book - practical or something newer?

2008-01-29 Thread Tom Hart
Hey everybody. I was just informed that our organization has a credit at amazon.com and asked if I had any books I wanted. I've been thinking about getting a postgresql book, and from what I've seen and read Practical PostgreSQL seems to be the standard (as well as co-authored by Joshua Drake,

Re: [GENERAL] Table has duplicate keys, what did I do

2008-01-29 Thread Tom Lane
John Gateley <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> wrote: >> John Gateley <[EMAIL PROTECTED]> writes: >>> Somehow I have managed to have two tables with duplicate keys. >> What PG version is this? We've fixed some bugs in the past that >> could give rise to duplicated rows.

Re: [GENERAL] referencing to "computed columns" in where clause

2008-01-29 Thread Richard Broersma Jr
--- On Tue, 1/29/08, Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: >> other than defining a function such that I can write: SELECT ( a-b ) as pippo FROM Yourtable WHERE ( a-b ) = 7 UNION ALL SELECT ( a*b ) as pippo FROM Yourtable WHERE ( a*b ) < 12 AND a > 3 UNION

Re: [GENERAL] referencing to "computed columns" in where clause

2008-01-29 Thread Ivan Sergio Borgonovo
On Tue, 29 Jan 2008 17:17:39 + Sam Mason <[EMAIL PROTECTED]> wrote: > On Tue, Jan 29, 2008 at 06:04:48PM +0100, Ivan Sergio Borgonovo > wrote: > > select > > case > > when (a>3) then a*b > > when (a<3) then a+b > > end as pippo > > where pippo<12; > > I've tended to do: > > SEL

Re: [GENERAL] referencing to "computed columns" in where clause

2008-01-29 Thread Sam Mason
On Tue, Jan 29, 2008 at 06:04:48PM +0100, Ivan Sergio Borgonovo wrote: > select > case > when (a>3) then a*b > when (a<3) then a+b > end as pippo > where pippo<12; I've tended to do: SELECT * FROM ( SELECT "complicated expression" AS pippo) x WHERE pippo < 12; Sam ---

[GENERAL] referencing to "computed columns" in where clause

2008-01-29 Thread Ivan Sergio Borgonovo
Is there a way to do things like select (a-b) as pippo from ... where pippo=7; or select case when (a>3) then a*b when (a<3) then a+b end as pippo where pippo<12; other than defining a function such that I can write: select func(a,b,c) as pippo from ... where func(a,b,c)=7; ? Is the

Re: [GENERAL] Surprising (?) Sequence Behavior

2008-01-29 Thread Richard M. Kues
Tom Lane schrieb: At least for me this is surprising! Why do you find it surprising? Per spec, the SELECT output list is not evaluated at rows that fail the WHERE clause. This must be so; consider examples like SELECT 1/x FROM t WHERE x <> 0; Of ocurse! I think what you need i

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-29 Thread Vlad
I just tried adjusting two parameters: enable_hashagg = off both versions run slower, still 8.2 quicker than 8.3 (by ~ the same %) enable_hashjoin = off both versions run slower, still 8.2 quicker than 8.3 (by ~ the same %) On Jan 29, 2008 10:34 AM, Clodoaldo <[EMAIL PROTECTED]> wrote: > Vlad,

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-29 Thread Clodoaldo
2008/1/29, Vlad Marchenko <[EMAIL PROTECTED]>: > Tom: > > Yes, they are ints. To (somewhat) check your guess on the role of the hash > aggregation speed, I just ran oltp test from sysbench > (http://sysbench.sourceforge.net/docs/#database_mode) on a table with 1mln > of records. That test uses pret

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread David Fetter
On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote: > well its using the pgsql_replication_check.pl, which does: > > -- > use Pg; I wouldn't trust that library or anything that depends on it if I were you. It's been unmaintained for a *very* long time. Cheers, David

Re: [GENERAL] Table has duplicate keys, what did I do

2008-01-29 Thread John Gateley
On Mon, 28 Jan 2008 21:36:35 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > John Gateley <[EMAIL PROTECTED]> writes: > > Somehow I have managed to have two tables with duplicate keys. > > ... > > But, mostly, I'm wondering how I managed to get in this state, > > What PG version is this? We've fixed

Re: [GENERAL] 8.3RC2 vs 8.2.6 testing results

2008-01-29 Thread Vlad Marchenko
Tom: Yes, they are ints. To (somewhat) check your guess on the role of the hash aggregation speed, I just ran oltp test from sysbench (http://sysbench.sourceforge.net/docs/#database_mode) on a table with 1mln of records. That test uses pretty simple queries (that do not use aggregation) and 8

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Glyn Astill
Hi chaps, Excellent, it was libpg-perl I needed. Thanks --- Richard Huxton <[EMAIL PROTECTED]> wrote: > Glyn Astill wrote: > > well its using the pgsql_replication_check.pl, which does: > > > > -- > > use Pg; > > use Getopt::Std; > > > > > So I assume it's not getting pas

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread adam_pgsql
On 29 Jan 2008, at 13:39, Martijn van Oosterhout wrote: On Tue, Jan 29, 2008 at 01:30:04PM +, adam_pgsql wrote: this looks to be using the Pg module rather than DBI + DBD::Pg. This one i think: http://www.cpan.org/authors/id/M/ME/MERGL/pgsql_perl5-1.9.0.tar.gz i think thats quite old no

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Martijn van Oosterhout
On Tue, Jan 29, 2008 at 01:30:04PM +, adam_pgsql wrote: > > this looks to be using the Pg module rather than DBI + DBD::Pg. This > one i think: > > http://www.cpan.org/authors/id/M/ME/MERGL/pgsql_perl5-1.9.0.tar.gz > > i think thats quite old now though In the one in this package: htt

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Colin Wetherbee
Colin Wetherbee wrote: CaT wrote: On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote: well its using the pgsql_replication_check.pl, which does: -- use Pg; ... So I assume it's not getting past the use Pg line as although it's looking in /usr/lib/perl5 it's not g

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Colin Wetherbee
adam_pgsql wrote: this looks to be using the Pg module rather than DBI + DBD::Pg. This one i think: http://www.cpan.org/authors/id/M/ME/MERGL/pgsql_perl5-1.9.0.tar.gz i think thats quite old now though Indeed, that's how it looks. That would be in the libpg-perl package on Debian. In

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread adam_pgsql
this looks to be using the Pg module rather than DBI + DBD::Pg. This one i think: http://www.cpan.org/authors/id/M/ME/MERGL/pgsql_perl5-1.9.0.tar.gz i think thats quite old now though On 29 Jan 2008, at 13:10, Glyn Astill wrote: well its using the pgsql_replication_check.pl, which do

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Colin Wetherbee
CaT wrote: On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote: well its using the pgsql_replication_check.pl, which does: -- use Pg; ... So I assume it's not getting past the use Pg line as although it's looking in /usr/lib/perl5 it's not going to look in /usr/lib

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Richard Huxton
Glyn Astill wrote: well its using the pgsql_replication_check.pl, which does: -- use Pg; use Getopt::Std; So I assume it's not getting past the use Pg line as although it's looking in /usr/lib/perl5 it's not going to look in /usr/lib/perl5/DBD ?? DBD::Pg is not the same

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread CaT
On Tue, Jan 29, 2008 at 05:10:00AM -0800, Glyn Astill wrote: > well its using the pgsql_replication_check.pl, which does: > > -- > use Pg; ... > So I assume it's not getting past the use Pg line as although it's > looking in /usr/lib/perl5 it's not going to look in > /usr/lib/p

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Glyn Astill
well its using the pgsql_replication_check.pl, which does: -- use Pg; use Getopt::Std; our ($opt_h, $opt_d, $opt_p, $opt_U, $opt_w, $opt_c) = ''; my ($conn, $res, $status, @tuple); my $query = 'SELECT * FROM replication_status' ; my @rep_time; -

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread CaT
On Tue, Jan 29, 2008 at 04:45:48AM -0800, Glyn Astill wrote: > Should the subdirectory DBD be in there? Perl was setup using apt. How are you using it and what's your DBI db connect line? I'm about to go to sleep so if I don't reply it'll be because I'm unconcious. :) -- "To the extent that

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Glyn Astill
> Run perl -V and see if the path is there for @INC. If it's there, > check > such things as permissions. If not, ponder deeply as to why this is > so > (as /usr/lib/perl5 is a standard path for perl in /usr) and if you > can't > fix it 'properly' you can work-around with the use of 'use lib' > (

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread CaT
On Tue, Jan 29, 2008 at 04:24:05AM -0800, Glyn Astill wrote: > I'm trying yo run a perl script that uses DBI (Slonys > psql_replication_check.pl to be precise) and I'm getting the error: > > Can't locate Pg.pm in @INC > > Now I do have the file in /usr/lib/perl5/DBD/ but the script can't > see it

[GENERAL] OT - pg perl DBI question

2008-01-29 Thread Glyn Astill
Hi chaps, I'm trying yo run a perl script that uses DBI (Slonys psql_replication_check.pl to be precise) and I'm getting the error: Can't locate Pg.pm in @INC Now I do have the file in /usr/lib/perl5/DBD/ but the script can't see it. I'm guessing that unless I fudge it and put the absoloute path

Re: [GENERAL] using = in a function

2008-01-29 Thread Raymond O'Donnell
On 29/01/2008 02:41, Tom Lane wrote: Andy Colson <[EMAIL PROTECTED]> writes: Notice I just use = and not :=. [snip] Yeah, plpgsql actually allows both, but it's not documented. I really like := 'cos I've used Delphi/Pascal a lot over the years, so := falls nicely under the fingers. :-) Ra

[GENERAL] bytea to varchar using different charsets

2008-01-29 Thread Peter Bauer
Hi all, i would like to write a PL/PGSQL function to convert a bytea into a varchar using the character maps GSM 03.38 (http://en.wikipedia.org/wiki/Short_message_service) and ISO 8859-1 (http://en.wikipedia.org/wiki/Iso_8859-1#ISO-8859-1). The first approach would be to loop through the bytes

Re: [GENERAL] Getting the count(*) from two tables and two date ranges in same query

2008-01-29 Thread Håkan Jacobsson
Adam, Big thanx - I'll try this out! Håkan Jacobsson - System Developer RELEVANT TRAFFIC EUROPE AB, Riddarg 17D, SE-114 57 Sthlm, Sweden Mobile (+46) 736 56 97 58 Direct (+46) 8 56 24 98 05 Phone to office (+46) 8 678 97 50 || F