Re: [GENERAL] SHOW

2001-09-03 Thread Joe Conway
> > > What is the equivalent to the mysql's: > > > SHOW COLUMNS FROM [TABLENAME]; > > > > in psql, \d will show you all tables and \d TABLE will show you the > > columns in the table. If you need it as a sql command, you can check the > > system tables. > > OK. That works for ./bin/psql, but NO

Re: [GENERAL] how do functional indices work?

2001-09-03 Thread John Clark Naldoza y Lopez
hubert depesz lubaczewski wrote: > > hi > i have a question. > let's assume i have table users which is (id int4, person_id int4) - pkey'ed > on id with index on person_id. > next i have table people (id int4, fullname text) with pkey on id. > there is a foreign key between the two tables on user

Re: [GENERAL] SHOW

2001-09-03 Thread Stephan Bergmann
Hi! > > > What is the equivalent to the mysql's: > > SHOW COLUMNS FROM [TABLENAME]; > > in psql, \d will show you all tables and \d TABLE will show you the > columns in the table. If you need it as a sql command, you can check the > system tables. OK. That works for ./bin/psql, but NOT on th

[GENERAL] how do functional indices work?

2001-09-03 Thread hubert depesz lubaczewski
hi i have a question. let's assume i have table users which is (id int4, person_id int4) - pkey'ed on id with index on person_id. next i have table people (id int4, fullname text) with pkey on id. there is a foreign key between the two tables on users.person_id => people.id. now i wrote a functio

[GENERAL] is there a function/variable with remote host addr?

2001-09-03 Thread David Ford
As the subject says, is there a function or variable in pg I can use as a default insert/update value on a column that represents the IP or hostname of the current session's remote client? David ---(end of broadcast)--- TIP 6: Have you searched

Re: [GENERAL] Select from different database

2001-09-03 Thread Bruce Momjian
> Jacob Vennervald Madsen writes: > > > Is it possible to fetch data from another database than the current? > > No. New FAQ item: 4.25) How do I perform queries using multiple databases? There is no way to query any database except the current one. Because PostgreSQL loads da

Re: [GENERAL] nested SQL with SPI

2001-09-03 Thread Markus Wagner
Hi Tom, this would mean that all result tables are kept in memory until the trigger function exits? What do you mean with "copy it and associated globals into locals", just the pointers or the data itself? If I understand it the right way, I could something like in the code below, e. g. loop

[GENERAL] Unexpected Behavior Using a Rule With Multiple Actions (Long)

2001-09-03 Thread James F. Hranicky
I'm attempting to set up a table that keeps it's own transaction history. Specifically, the table looks like this: create table homes_table ( fsname varchar(30), fspath varchar(40), record_added datetime default now(),

Re: [GENERAL] How Does TEMP Table Work In Plpgsql?

2001-09-03 Thread Stephan Szabo
> Weid is that test2 and test work only once per psql > connection (i.e. "session", am I correct?). > Can anyone help? The reason is that the query plans are getting cached. AFAIK, if you want to work with temp tables in plpgsql, you're going to need to use EXECUTE to generate all the queries

Re: [GENERAL] Crash in vacuum analyze

2001-09-03 Thread Sean Chittenden
> > Can we test for this at configure time and spit out a warning > > message to the user that they need to upgrade their version of glibc? > > I think most of the people who are getting bitten have installed PG from > RPMs, so configure couldn't help them anyway. ::grrr:: I have nothin

[GENERAL] How to select using LIKE with bytea?

2001-09-03 Thread David Ford
First a row, then the question. archives=# select * from archives; listname | received_date | header_date | subject | author | | headers

Re: [GENERAL] Crash in vacuum analyze

2001-09-03 Thread Tom Lane
Sean Chittenden <[EMAIL PROTECTED]> writes: > Can we test for this at configure time and spit out a warning > message to the user that they need to upgrade their version of glibc? I think most of the people who are getting bitten have installed PG from RPMs, so configure couldn't help the

Re: [WAY OT] Re: [GENERAL] PL/java?

2001-09-03 Thread Alex Knight
OK. If I find some time, I'm going to attempt to do some things that java does well, that I think perl can not do easily. -Knight -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Robert J. Sanford, Jr. Sent: Monday, September 03, 2001 6:02 PM To: [EMAIL P

Re: [WAY OT] Re: [GENERAL] PL/java?

2001-09-03 Thread Robert J. Sanford, Jr.
> No offense, but I've been developing under your language > since nearly it's public conception... and perl is _great_. > > Frankly, I don't want to argue with you, because you'll > simply defend your own creation without reasonably > evaluating the situation. > > But I think everyone needs t

Re: [GENERAL] query not using index

2001-09-03 Thread Peter Eisentraut
Norbert Zoltan Toth writes: > I have created the following test table: > create table history (event_id int8 not null, event_type int, event_name > char(10), event_ts timestamp, user_data_ref int8); > When I issue the following query, it takes about 6 minutes: > select event_id from hist

[GENERAL] European date format option

2001-09-03 Thread Nigel Gilbert
Title: European date format option The online documentation for SET says: Running postmaster using the option -o -e to set dates to the European convention. but attempting to do this results in: $ pg_ctl start -o -e postmaster successfully started $ /usr/local/pgsql/bin/postmaster: illegal opt

[GENERAL] PG log analyzer v1.1

2001-09-03 Thread Gilles DAROLD
Hi all, I've updated the version of the PostgreSQL Log Analyzer. This version fix many bugs and include some cool charts. There's now hourly statistics and some average calculation. You can take a look at the output at : http://www.samse.fr/GPL/pg_analyzer/sample/ Download here: http://ww

Re: [GENERAL] Referential Integrity --> SystemTables

2001-09-03 Thread Stephan Szabo
On Mon, 3 Sep 2001, David M. Richter wrote: > Hello! > > I want to update a old postgresdatabase. In the time of databasecreation > the postgres had no "references" construct. So the integrity is > maintained by the C-Driver. > Now I want to build in the integrity. But i have to maintain > compa

Re: [GENERAL] query not using index

2001-09-03 Thread Joe Conway
> explain select event_id from history where event_type = 120; > NOTICE: QUERY PLAN: > > Seq Scan on history (cost=0.00..446079.00 rows=20 width=8) > > even if I do a drop index history_idx, explains sais the same. > Try explain select event_id from history where event_ty

Re: [GENERAL] Perl won't eval PgSQL boolean value

2001-09-03 Thread Andrew Snow
When comparing strings in perl you usually use the eq operator, not == e.g. if($cust_data->{hold} eq 't') - Andrew > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of Randall Perry > Sent: Monday, 3 September 2001 10:01 AM > To: [EMAIL PROTECTED

[GENERAL] Adding a Foreign key!

2001-09-03 Thread tankgirl
Hello everyone, I know that a Primary Key can be added to a table after it has been created, doing this... CREATE UNIQUE INDEX table_pkey ON table (atribute); Well I wonder if a Foreign Key can also be added after the table is already created, and what syntax does it follow. Thankyou

Re: [GENERAL] PL/java?

2001-09-03 Thread Andrew Snow
> | Its not a perception. Java is still a dog. > > Back it up or back out please. > > The most scalable and stable enterprise solutions out there are today > running Java. In Java you actually get more time to concentrate on > removing the real performance bottlenecks of your application.

[GENERAL] Adding a Foreign Key

2001-09-03 Thread tankgirl
Hello everyone, I know that a Primary Key can be added to a table before it has been created, doing this... CREATE UNIQUE INDEX table_pkey ON table (atribute); Well I wonder if a Foreign Key can also be added and what syntax does it follow. Thankyou in advance. Stay Safe & Happy.

Re: [GENERAL] [WAY OT] Re: PL/java?

2001-09-03 Thread Lincoln Yeoh
Just curious about one thing. How was the perl app implemented? It seems Solaris doesn't do/fork processes very well which is why Sun pushes threads. Whereas *BSD and Linux do processes about as well as Solaris does threads. Postgresql doesn't do so well on our Solaris 2GB box as it does on a

[GENERAL] very slow delete

2001-09-03 Thread Jakub Ouhrabka
hi, i'm trying to tune some batches and after some research i located the biggest problem in doing something like this: begin; update ts08 set ts08typ__ = ; delete from ts08; end; the update takes about 1m25s (there are aprox. 7 rows in ts08). but the delete then takes more than 20 minut

[GENERAL] Perl won't eval PgSQL boolean value

2001-09-03 Thread Randall Perry
I've got an if statement that checks if a boolean value is true: if ($cust_data->{'hold'} eq 't') But perl will not evaluate the value. $cust_data->{'hold'} is taken from a PgSQL boolean field (either t or f). If I use the construct above it tell me that 'eq' is not defined thinking it's a s

[GENERAL] Referential Integrity --> SystemTables

2001-09-03 Thread David M. Richter
Hello! I want to update a old postgresdatabase. In the time of databasecreation the postgres had no "references" construct. So the integrity is maintained by the C-Driver. Now I want to build in the integrity. But i have to maintain compatibiliy to old databases in the code itself. So my question

Re: [GENERAL] Apache authentication

2001-09-03 Thread Giorgio Volpe
Thanks all who replied me ... i suceed compiling the module from the site above and all is ok! If someone else needs it, I did it so: I only need same little change on the INSTALL istruction to fit debian conventiones ... I used apxs and exec ONLY the following instruction ... - install debina m

[GENERAL] query not using index

2001-09-03 Thread Norbert Zoltan Toth
Hi, I have created the following test table: create table history (event_id int8 not null, event_type int, event_name char(10), event_ts timestamp, user_data_ref int8); I've populated the table with 20,000,000 rows. I have created an index table: create index history_idx on history (eve