[GENERAL] psql -E option is not working in 7.4.2 like 7.3.4

2004-05-20 Thread Durai raj
Hello All, I built the latest postgresql 7.4.2 in HPUX PA. The command "psql -E ", is not give the output like in 7.3.4. In Postgresql 7.3.4, it gives the following output: $ echo "select * from db5;" | psql -E test * QUERY ** BEGIN; SELECT usesuper FROM pg_catalog.pg_user WHER

Re: [GENERAL] problem with sorting using 'ORDER BY' when character field is filled with numerical values

2004-05-20 Thread Tom Lane
Dragan Matic <[EMAIL PROTECTED]> writes: > Is there some way to make Postgres sort elements > in this way (setting sort order or collation, I suppose)? C locale would sort that way; you appear to be using some other locale. I concur with the nearby suggestions that you should consider a more app

Re: [GENERAL] backend terminated abnormally

2004-05-20 Thread Tom Lane
"Bob Powell" <[EMAIL PROTECTED]> writes: > NOTICE : analyzing pg_type server closed connection unexpectedly. > This probably means the backend terminated abnormally before or > while processing the request. Not good ... can you get a stack trace from the backend core dump? > Vacuum has been

Re: [GENERAL] Dblink question

2004-05-20 Thread Joe Conway
Sam Masiello wrote: After doing lots of reading it looks like dblink might be a great solution for this. After trying to insert dblink.sql into the database, I just get a series of errors: ERROR: stat failed on file '$libdir/dblink': No such file or directory This is not a dblink error per se, but

Re: [GENERAL] problem with sorting using 'ORDER BY' when character

2004-05-20 Thread Stephan Szabo
On Thu, 20 May 2004, Dragan Matic wrote: > If I have a table t with column c which is defined as char(5) and fill > it with following values: > > insert into t (c) values ('1') > insert into t (c) values ('2') > insert into t (c) values ('3') > insert into t (c) values ('4') > inse

[GENERAL] ORDER BY 'DK', 'DE', DESC?

2004-05-20 Thread Victor Spång Arthursson
Hi! I would like to know if it's possible to give a priority order of how to sort the returning rows? Like for example to order every row with a field language = DK first, then the rows with field language = *DE' and last the other languages, ordered alphabetically…? Sincerely Victor -

[GENERAL] Equivalent for mysql's FOUND_ROWS()

2004-05-20 Thread Victor Spång Arthursson
With mysql it's possible to add a parameter "SQL_CALC_FOUND_ROWS" to the selectstatement and then after having made a query to the database with a limit clause you can fire off a second query, "SELECT found_rows() as numberofrows" to get the number of rows the query would have returned without

[GENERAL] pg_temp_N temp schema buildup

2004-05-20 Thread Jerry Sievers
Hello. I'm running postgres 7.4.1 and notice an accumulation of temp schemas named pg_temp_1, pg_temp_2... etc. These schemas are empty and I have manually removed them from time to time. What procedure is leaving these behind and is there a way for me to have them cleaned up automatically after

[GENERAL] Does INSERT inserts always at the end ?

2004-05-20 Thread Florence HENRY
Hello, well, almost everything is in the subject ! I have to fill 2 tables (more complicated than in the example !): CREATE TABLE A ( id serial primary key, foo text); CREATE TABLE B ( id serial references A, bar text); I fill A with : INSERT into A VALUES (DEFAULT, "toto"); Th

Re: [GENERAL] serial autoincrement and related table

2004-05-20 Thread Marco Colombo
On Mon, 17 May 2004, Milos Prudek wrote: > > > Actually, if you declared idmember as SERIAL PRIMARY KEY, you could > > just do: > > I can't do that. idmember is a SERIAL PRIMARY KEY for members. Each > member can have many messages (msg table) with the same idmember column > value. See my or

Re: [GENERAL] postmaster shutdown failed

2004-05-20 Thread Ed L.
On Thursday May 20 2004 10:11, Durai raj wrote: > When I stop the postmaster in another session or in > terminal, I got the following error: > > $ pg_ctl -D /var/opt/iexpress/postgresql stop > waiting for postmaster to shut > down > fa

[GENERAL] Run external program upon change

2004-05-20 Thread David Siegal
Hi, Whenever my database's data gets updated in a variety of ways, I need to run an external perl script (to re-generate static web pages). What do you recommend I look at to accomplish this? (Triggers?) Thanks for your help! David ---(end of broadcast)-

Re: [GENERAL] Data change logs

2004-05-20 Thread Mike Nolan
> So, if anyone out there has an effective alternative, I would love to > hear about it. The way I do it is to create a copy of the table I want to track and add a text column for the user name and a timestamp column. I then set up an on update trigger on the original table that does the followi

Re: [GENERAL] Is Linux 2.6.5 kernel good enough for production?

2004-05-20 Thread Dirk Försterling
Am 05/17/2004 10:19 PM schrieb Greg Stark: Richard Huxton <[EMAIL PROTECTED]> writes: I'm guessing an index isn't being used because your LANG is something-UTF-8 and that got picked up when you recreated your database. Try recreating the database with the C locale and see if that does it. I never

[GENERAL] relocation error

2004-05-20 Thread w00t
I am running Suse 9.0 and have been working with postgresql 7.3.3 When I run psql as psql -v or psql -V and even psql --help I get a relocation error psql: relocation error: /usr/lib/libreadline.so.4: undefined symbol: BC Is there anyway to fix this with out reinstalling postgresql.

Re: [GENERAL] PG_HBA.conf still keeps complaining. I've done all I could imagine.

2004-05-20 Thread Tom Lane
[EMAIL PROTECTED] (Liza) writes: > When I try to connect to the postgresql server in pgmanage, or through > an ODBC from other windows machines I get a message: > "missing or erroneous pg_hba.conf file" > Here is my pg_hba.conf: > local all trust > host 10.1.9

Re: [GENERAL] Unable to run testlibpq.c program

2004-05-20 Thread Tom Lane
[EMAIL PROTECTED] (Vikram) writes: > (bash#)gcc -I/usr/include/pgsql sirisha_retrieve.c -o output2 -lpq > /usr/bin/ld: cannot open output file output2: Permission denied > collect2: ld returned 1 exit status > What does the above message signify? It sure looks like you're doing this in a director

[GENERAL] enforce unique rows?

2004-05-20 Thread Matt Van Mater
I'm using v7.3.2 from OpenBSD 3.4 ports collection. I'm looking for a way to enforce unique rows in a table with about 20 columns. I found a way to do it, but it looks a little clunky so I was wondering if there was a better way. What I found is I have to do a: CREATE TABLE tblname (col1 tex

Re: [GENERAL] Index not being used properly

2004-05-20 Thread Tom Lane
Waldo Nell <[EMAIL PROTECTED]> writes: > I have a *huge* problem. I have a table with indexes on but the moment > I have an OR in my SELECT query it seems to not use the appropriate > index. 7.5 will be smarter about this, but in 7.4 and before you need to fool with the column order of your i

Re: [GENERAL] Data change logs

2004-05-20 Thread Mike Nolan
> > insert into _log select * from where keyfield = NEW.keyfield; Oops, that should be OLD.keyfield. -- Mike Nolan ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister Your

Re: [GENERAL] pg_temp_N temp schema buildup

2004-05-20 Thread Tom Lane
Jerry Sievers <[EMAIL PROTECTED]> writes: > I'm running postgres 7.4.1 and notice an accumulation of temp schemas > named pg_temp_1, pg_temp_2... etc. That's intentional. Removing them just causes extra work to add them again later (not to mention possibly crashing any backend that is actively us