[GENERAL] libpq.so.3 not found error while use Perl DBI

2003-10-14 Thread jake johnson
I'm using Postgresql 7.3.4, FreeBSD 4.7, Apache 2.0.47. I have a perl script which uses the DBI module and it works great from the command line as long as I have '/usr/local/pgsgl/lib' in LD_LIBRARY_PATH or else it would give me an 'libpq.so.3 not found' error. Now, I've turned that perl script

[GENERAL] PG tools

2003-10-14 Thread G Lam
Hi, I am new to postgresql. I have done some small applications with MS Access. Are there some PG tools out there that can build applications like MS Access does out there? Thanks Gary ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Interfaces that support cursors

2003-10-14 Thread Christopher Browne
[EMAIL PROTECTED] (Doug McNaught) writes: Network Administrator [EMAIL PROTECTED] writes: Ok, I did see the autocommit flag setting in DBD:Pg when I starting reading up on the DBI/DBD interfacing methods so I guess I could recode for that. However, how do you maintain the current

Re: [GENERAL] Redhat RPMs

2003-10-14 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Nigel J. Andrews) was seen spray-painting on a wall: I've not looked at many RPMs but I must say that the few I have have never been relocatable. Can the postgresql RPMs not be made relocatable? Unfortunately, relocation would have to include the init scripts, and that

Re: [GENERAL] Can SQL return a threaded-comment-view result set?

2003-10-14 Thread Chris
Hello all, I've been meaning to get back to you all but I just haven't had time. Okay, I've got a little bit of time now so here goes I received many useful answers from many of you including Tom Lane, Joe Conway, and Josh Berkus. Max Nachlinger in particular on October 5th (which was my

[GENERAL] CREATE INDEX question (how to index on money field?)

2003-10-14 Thread Stephane Charette
QUICK VERSION: How do I create an index on a field of type MONEY? - LONG VERSION: I have a table with a field of type money. I very often need to access records by the purchase price so I thought I'd create an index to help out my selects: CREATE INDEX

[GENERAL] previous next buttons

2003-10-14 Thread Psybar Phreak
hi all, im developing a site in perl with mason on a postgreSQL backend. i currently have a page that lists all items in a table, but would like to do the PREVIOUS 1 2 3 4 NEXT sort of thing - say LIMIT of 10 records to a page. can someone help me out. thanks PP

[GENERAL] How to list which tables are available?

2003-10-14 Thread B.W.H. van Beest
It seems so elementary, but how I get a list of which tables are available in a database. I can't find an SQL command for this, but there must be a way! Thanks. Bertwim ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please

[GENERAL] Question

2003-10-14 Thread Robert Partyka
Hi, I have question: why such condition: foofield not like '%bar%' where foofield is varchar returns false (or rather even ignore row) on record where foofield is null but returns true on records where foofield is '' (empty string) regards Robert ---(end of

Re: [GENERAL] simple remote user access question - pg_hda.conf

2003-10-14 Thread tj
I just discovered that SuSE provides the sample pg_hba.conf in /usr/share/pgsql but the real pg_hba.conf file is located in /var/lib/pgsql/data Fixed! ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan

Re: [GENERAL] need for concrete info

2003-10-14 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Andrew Sullivan) would write: On Sat, Oct 11, 2003 at 05:48:23PM -0700, Dennis Gearon wrote: projects.) I want to use as my main argument, the fact (at this time, only from my previous usage), that MySQL really doesn't have foreign

Re: [GENERAL] backend exit mystery

2003-10-14 Thread Ed Loehr
On Friday October 10 2003 4:46, Ed L. wrote: I have libpq client program that repeatedly connects to a DB, queries, and then disconnects. After a seemingly random number of such successful sessions (sometimes 30, sometimes hundreds), the backend mysteriously exits after the client calls

[GENERAL] Transaction Queries!!!

2003-10-14 Thread Vatsal
Hi, We are using postgresql as the underlying RDBMS for one of our application. When in a transaction if we execute an query that causes database to return a failure. The whole transaction gets roll backed. Below are 2 examples which illustrate this problem. We want the

Re: [GENERAL] SET within a function?

2003-10-14 Thread Arthur Ward
Is the rewrite only for the literal 'X = NULL' or will it do a test against a value such as 'X = OLD.X' (and rewrite is OLD.X is NULL)? Is there any way to match NULLS to each other (as I am looking for a literal row, not using NULL as the UNKNOWN). I suppose I could put in a dummy value for

Re: [GENERAL] SET within a function?

2003-10-14 Thread Edmund Dengler
The problem I would face is that this still needs to be a sequential scan in the table rather than an index lookup. Regards, Ed On Tue, 14 Oct 2003, Arthur Ward wrote: Is the rewrite only for the literal 'X = NULL' or will it do a test against a value such as 'X = OLD.X' (and rewrite is

[GENERAL] converting varchar date strings to date

2003-10-14 Thread pw
Hello, How can I typecast a date generated from VARCHAR fields into a date field ie: UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day; where the date string is built up from varchar fields? Thanks for any help. Peter ---(end of

Re: [GENERAL] SET within a function?

2003-10-14 Thread Mike Mascari
Edmund Dengler wrote: The problem I would face is that this still needs to be a sequential scan in the table rather than an index lookup. IIRC, NULL values aren't indexed, only actual values, which is an implementation detail but yet-another reason why NULL-elimination through normalization is

Re: [GENERAL] Redhat RPMs

2003-10-14 Thread Lamar Owen
On Friday 10 October 2003 08:52 pm, Christopher Browne wrote: Oops! [EMAIL PROTECTED] (Nigel J. Andrews) was seen spray-painting on a wall: I've not looked at many RPMs but I must say that the few I have have never been relocatable. Can the postgresql RPMs not be made relocatable?

Re: [GENERAL] How to list which tables are available?

2003-10-14 Thread Richard Huxton
On Tuesday 14 October 2003 10:53, B.W.H. van Beest wrote: It seems so elementary, but how I get a list of which tables are available in a database. I can't find an SQL command for this, but there must be a way! In psql use \d or \dt If you start psql with the -E flag it will show you how it

Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread Richard Huxton
On Tuesday 14 October 2003 17:54, pw wrote: Hello, How can I typecast a date generated from VARCHAR fields into a date field ie: UPDATE inventory SET date_field = vc_year||'-'||vc_month||'-'||vc_day; ... SET date_field = CAST(vc_year...vc_day AS date) or ... SET date_field =

Re: [GENERAL] How to list which tables are available?

2003-10-14 Thread Ron Johnson
On Tue, 2003-10-14 at 04:53, B.W.H. van Beest wrote: It seems so elementary, but how I get a list of which tables are available in a database. I can't find an SQL command for this, but there must be a way! $ man psql, then search for the string list of all tables $ psql test1 Welcome to

Re: [GENERAL] PG tools

2003-10-14 Thread Jeff Eckermann
--- G Lam [EMAIL PROTECTED] wrote: Hi, I am new to postgresql. I have done some small applications with MS Access. Are there some PG tools out there that can build applications like MS Access does out there? MS Access works well with PostgreSQL via ODBC. Check here:

Re: [GENERAL] Excute comnands OS from plpgsql

2003-10-14 Thread Richard Huxton
On Tuesday 14 October 2003 17:15, Richard Huxton wrote: On Tuesday 14 October 2003 16:38, Edwin Quijada wrote: How can I use NOtify to do this? Please make sure you reply to the list too. In your daemon you do something like: LISTEN signal1, and in a trigger (say) you issue NOTIFY signal1.

Re: [GENERAL] previous next buttons

2003-10-14 Thread Network Administrator
I was just helped with this last week (see threat Interfaces that support cursors that started on 10/10 if its in the archives. The two ways to do it- either issuing a selects with limit/offset modifiers or with a cursor. On the above thread today, it was posted that large datasets are going to

Re: [GENERAL] Question

2003-10-14 Thread Gaetano Mendola
Robert Partyka wrote: Hi, I have question: why such condition: foofield not like '%bar%' where foofield is varchar returns false (or rather even ignore row) on record where foofield is null but returns true on records where foofield is '' (empty string) SQL specifications. Empty string and

Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread Peter Eisentraut
pw writes: How can I typecast a date generated from VARCHAR fields into a date field Using CAST(). -- Peter Eisentraut [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

Re: [GENERAL] Question

2003-10-14 Thread Stephan Szabo
On Mon, 13 Oct 2003, Robert Partyka wrote: why such condition: foofield not like '%bar%' where foofield is varchar returns false (or rather even ignore row) on record where foofield is null Actually, it probably returns unknown(NULL) on such records. NULL LIKE '%bar%' is unknown, so NULL

Re: [GENERAL] How to list which tables are available?

2003-10-14 Thread Peter Eisentraut
B.W.H. van Beest writes: It seems so elementary, but how I get a list of which tables are available in a database. I can't find an SQL command for this, but there must be a way! SELECT * FROM pg_tables; -- Peter Eisentraut [EMAIL PROTECTED] ---(end of

Re: [GENERAL] converting varchar date strings to date

2003-10-14 Thread pw
Hello, This has been resolved. As I told a previous poster, CAST() wasn't working. I have no idea why. I finally used: UPDATE inventory SET date_field=date(vc_year||'-'||vc_month||'-'||vc_day ); Peter pw writes: How can I typecast a date generated from VARCHAR fields into a date field

Re: [GENERAL] Question

2003-10-14 Thread vhikida
If you are experienced in Oracle, this might be confusing since Oracle treats empty string and NULL as being the same. On Mon, 13 Oct 2003, Robert Partyka wrote: why such condition: foofield not like '%bar%' where foofield is varchar returns false (or rather even ignore row) on record

[GENERAL] order by a string

2003-10-14 Thread Stefan Leitich
hi! i am developing with version 7.3.2 under cygwin. my production evironment is 7.3.3 on a suse machine. language settings (lc_...) for the server are on developing and production machine the same, 'C'. now i encoutered the following behaviour. i use a union select to unify a query result

Re: [GENERAL] PLPERL function error - utf-8 to iso8859-1

2003-10-14 Thread Tom Lane
Patrick Hatcher [EMAIL PROTECTED] writes: Trying to create a plperl function to strip non-friendly mainframe characters from a string. However, when I try to add the Trademark symbol (™) as a replace criteria, PG spits back an error: ERROR: Could not convert UTF-8 to ISO8859-1 AFAICT this