Re: [GENERAL] Queries and views

2001-10-16 Thread Emmanuel SARACCO

hi,

you can use the EXPLAIN instruction.
"\h EXPLAIN" in psql for help.

bye

David Cana wrote:

> Hello!
> 
> I have got a view like:
> 
> create view consulta_material as
>   select
> material.clave as clave,
> referencia,
> sede.nombre_es as nombre_sede, clave_sede,
> soporte.nombre_es as nombre_soporte, clave_soporte,
> area_materiales.nombre_es as nombre_area_materiales,
> clave_area_materia
> autor,
> titulo,
> descripcion,
> fecha_intro, fecha_modificacion
> 
>   from material, sede, soporte, area_materiales
> 
>   where (material.clave_sede = sede.clave)
> and (material.clave_soporte = soporte.clave)
> and (material.clave_area_materiales = area_materiales.clave);
> 
> I´d like to know the performance difference between...
> 
> select * from consulta_material where clave=1;
> 
> And...
> 
> select
>   material.clave as clave,
>   referencia,
>   sede.nombre_es as nombre_sede, clave_sede,
>   soporte.nombre_es as nombre_soporte, clave_soporte,
>   area_materiales.nombre_es as nombre_area_materiales,
> clave_area_materia
>   autor,
>   titulo,
>   descripcion,
>   fecha_intro, fecha_modificacion
> 
>   from material, sede, soporte, area_materiales
> 
>   where (material.clave_sede = sede.clave)
>   and (material.clave_soporte = soporte.clave)
>   and (material.clave_area_materiales = area_materiales.clave)
>   and (material.clave=1);
> 
> How can I measure SQL queries and views?
> 
> Thanks.
> 
> 
> 
> 
> 
> ---(end of broadcast)---
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 
> 
> 



-- 
Emmanuel SARACCO
Email: [EMAIL PROTECTED]


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [GENERAL]

2001-10-16 Thread Dave Cramer
Title: Message



you 
have to start a transaction with begin
 
Dave

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
  On Behalf Of MonaSent: October 13, 2001 2:32 
  AMTo: [EMAIL PROTECTED]Subject: [GENERAL] 
  
  Hi
   
  We are trying to rollback an update in postgres. But so far we have 
  not been able to do it.When we Rollback..it says:
   
  ROLLBACK: No transaction in progress.
   
  Same happens with commit.We are used to SQL PlUS
   
  Without these facilities we really cannot go ahead with postgres db. 
  Could you please help us out on this.
   
   
   
  Thanks
  mlisa


Re: [GENERAL] User privileges

2001-10-16 Thread Tom Lane

"Mihai Gheorghiu" <[EMAIL PROTECTED]> writes:
> It is possible that a user is a member of more than one group.
> Do this user's privileges AND or OR the privileges of each of the two
> groups?

OR.  A user's privileges are always the union of what he has personally
and what he has via any group.  See aclcheck() in
src/backend/catalog/aclchk.c: it keeps looking for any way to grant
permission.

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [GENERAL] postgresql 7.1.3

2001-10-16 Thread Lamar Owen

On Tuesday 16 October 2001 02:39 pm, samsom, debra wrote:
> I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
> Postgresql will not start on Boot.  I have added the -o '-i' to the
> postgresql.conf and done the chkconfig --add postgresql.  Is there anything
> else that I am missing?

My apologies.  In my README.rpm-dist I missed a step: 
chkconfig --level 345 postgresql on

Put the runlevels desired to start in in place of '345' above if desired.
Sorry.
-- 
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [GENERAL] Python interface memory leak?

2001-10-16 Thread Keary Suska

Are you disposing the results of each select call? Not being familiar with
Python, as well as not knowing which interface for Python you are using, or
the code used to invoke the selects, I can only surmise that the result data
from each select is being stored in RAM and never garbage collected. At
least that could be responsible for significant memory jumps. For small
jumps, it could simply be the accumulation of multiple objects. So 1) you
may have to explicitly destroy result data and 2) you may need to ensure
that you are re-using the same object.

Without more info, any guess is as good as another.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

> From: Stephen Robert Norris <[EMAIL PROTECTED]>
> Date: 16 Oct 2001 22:00:35 +1000
> To: [EMAIL PROTECTED]
> Subject: [GENERAL] Python interface memory leak?
> 
> Does the python interface leak memory? We are seeing the process grow
> with basically every select. Any suggestions on what's going on? There
> are no cycles, and a trivial program (basically a loop around a select)
> demonstrates the problem.
> 
> This is 7.1.2 on RH7.[01].
> 
> Stephen
> 


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[GENERAL] postgresql rpms and jdbc

2001-10-16 Thread Richard Welty

a really quick question:

are the postgresql 7.1.3 rpms compiled with jdbc support, or do i need to build
from source to get jdbc to work?

thanks,
  richard



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL]

2001-10-16 Thread patrick keshishian


Try:

   begin;
   update TABLE set FIELDx = VALUEy
   rollback;


On Sat, Oct 13, 2001 at 12:02:01PM +0530, Mona wrote:
> 
> We are trying to rollback an update in postgres. But so far we have not been able to 
>do it.
> When we Rollback..
> it says:
> 
> ROLLBACK: No transaction in progress.
> 
> Same happens with commit.
> We are used to SQL PlUS
> 
> Without these facilities we really cannot go ahead with postgres db. Could you 
>please help us out on this.

-- 
patrick keshishian

Gnu  __   _
 -o)/ /  (_)__  __   __
 /\\ /__/ / _ \/ // /\ \/ /
_\_v __/_/_//_/\_,_/ /_/\_\

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [GENERAL] postgresql 7.1.3

2001-10-16 Thread Keary Suska

Yes. The error log entries showing why Postgres won't boot. Without them, we
can't help you.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

From: "samsom, debra" <[EMAIL PROTECTED]>
Date: Tue, 16 Oct 2001 13:39:15 -0500
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: [GENERAL] postgresql 7.1.3



I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except
Postgresql will not start on Boot.  I have added the -o '-i' to the
postgresql.conf and done the chkconfig --add postgresql.  Is there anything
else that I am missing?

Debra Samsom 
Bristol Aerospace Ltd.
(204) 775-8331 3402
[EMAIL PROTECTED] 



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [GENERAL] pg_views view doesn't work

2001-10-16 Thread Tom Lane

"Jim Buttafuoco" <[EMAIL PROTECTED]> writes:
> I am having a problem with the "pg_views" view.  It seems that the
> internal function pg_get_viewdef() is the problem.  See below. 

It looks to me like you've got some one view that refers to a
no-longer-existent function.  To figure out which it is, try
"select * from pg_views limit N" for various N until you know
where the failing row is, then extract just the viewname of that
row.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[GENERAL] User permissions for functions

2001-10-16 Thread Mihai Gheorghiu

The users can access the database only via rules. Some of the rules do call
functions.
I found in PG notes that: "An SQL or plpgsql function invoked by a rule
would be executed with the current user's permissions, not the rule
owner's." What exactly does this mean? What do I need to do with respect to
user rights regarding these functions?
Do I need to enhance user rights with respect to these functions? How?

Thank you all.


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL] Easy way of pruning pg_data?

2001-10-16 Thread [EMAIL PROTECTED]

No they are not.
I wondered if they were temporary space or something other.
I might take a punt at moving them, but then again :-(!
Thanks
Lee

- Original Message -
From: "David Link" <[EMAIL PROTECTED]>
To: "Lee Crampton" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 15, 2001 7:48 PM
Subject: Re: [GENERAL] Easy way of pruning pg_data?


> What are those files?  my $PGDATA/base only contains subdirectores, one
> for each database name.  Are those your database names?
>
> Lee Crampton wrote:
> >
> > Hi All
> > given the folowing:
> >
> > ls -l pg_data/base
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 1
> > drwx--S---2 postgres postgres 2048 Aug 27 12:26 1007014
> > drwx--S---2 postgres postgres 2048 Sep 15 08:57 1045851
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 18719
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 18735
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 18891
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 18916
> > drwx--S---2 postgres postgres 4096 Oct 12 20:09 19100
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 192660
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 206353
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 206889
> > drwx--S---2 postgres postgres 2048 Apr 15  2001 207360
> > drwx--S---2 postgres postgres 2048 Jun  5 10:44 639889
> > drwx--S---2 postgres postgres 2048 Jun  5 11:19 643727
> > drwx--S---2 postgres postgres 2048 Aug  1 12:28 953493
> >
> > Is there an easy way to housekeep (prune) these directories?
> > Thanks in advance
> > Lee
> >
> > ---(end of broadcast)---
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[GENERAL] User privileges

2001-10-16 Thread Mihai Gheorghiu

It is possible that a user is a member of more than one group.
Do this user's privileges AND or OR the privileges of each of the two
groups?

Thank you all.


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Re: [GENERAL] "user"

2001-10-16 Thread will trillich

Marshall Spight wrote:
> "Daniel Åkerud" <[EMAIL PROTECTED]> wrote in message
> 007101c13b96$834e8960$c901a8c0@automatic100">news:007101c13b96$834e8960$c901a8c0@automatic100...
> >
> > Anyway I called it "uzer" now. Maybe usr is better... users is out of the
> > question since table names are supposed to go in singularis.
> 
> Since a table is a collection of things, plural always seemed to make
> more sense to me. But I've seen it done both ways. Postgres system
> tables are singular, but it SqlServer, they're plural.
> 
> What do other people think?

hmm -- here's what we do. with postgresql 7.1, we use

static lookups: PLURALS
states.*
colors.*
types.*
stages.*
codes.*
(the collection of records -- plural -- in these tables
define and restrict what options are available for certain
contexts.)

fluctuating data: SINGULARS
client.*
contact.*
property.*
image.*
message.*
(each record -- singular -- in these tables represents a
significant thing that's of direct importance to our bottom
line.)

plus, the actual tables (which are prefixed with "_") are hidden
by the views (sans leading "_") we use to access them:

create TABLE _cust ( ... );
create VIEW cust AS SELECT ... FROM _cust ...;
create TABLE _contact ( ... );
create VIEW client AS SELECT ... FROM _cust,_contact WHERE ...;
create RULE add_client AS ON INSERT TO client DO INSTEAD ...;
create RULE upd_client AS ON UPDATE TO client DO INSTEAD ...;

and for joining via serial indexes, we use "ID":

create table _colors (
id SERIAL,
...
);
create table _stages (
id SERIAL,
...
);
create table _gizmo (
...
colors_id INTEGER REFERENCES _colors( id ),
stages_id INTEGER REFERENCES _stages( id ),
...
);

so that any field _id references _.id (we
can't use natural joins, but that's not a big deal with us.)
alas, there is a weakness here: if there's more than one instance
of a particular subtable: colors_id might need to be
interior_colors_id and exterior_colors_id. zut alors!

for name collisions, we improvise: instead of "user" we use "who"
(after considering, and rejecting, "human" "person" "someone"
and "creature") for example.

so, what pre-existing standards are there, Out There in Database
Land? and what problems can you postgresql fans find with this
paradigm? (it's worked pretty well for us so far... :)

-- 
They don't remember whether or not they weren't doing anything
I didn't want them to do.
-- Karen, on why she feeds the cats when they misbehave
 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[GENERAL] binding tcp connections to certain addresses

2001-10-16 Thread will trillich

i'm trying to get postgresql to listen on 127.0.0.1:5432,
192.168.1.1:5432 but not on xx.yy.zz.qq:5432 --

from the admin guide i see:

VIRTUAL_HOST (string)
Specifies the TCP/IP hostname or address on which the
postmaster is to listen for connections from client
applications. Defaults to listening on all configured
addresses (including localhost).

so i've tried

# /etc/postgresql/postgresql.conf
[snip]
port = 5432
virtual_host = 127.0.0.1
virtual_host = 192.168.1.1

so then i restart the server--

root@debian-potato# /etc/init.d/postgresql restart
Restarting PostgreSQL postmaster.
Stopped /usr/lib/postgresql/bin/postmaster (pid 18685 18688 18689 18692 18751 
18774 18776 18777 18778).
-su: /etc/postgresql/postmaster.init: No such file or directory
Starting PostgreSQL postmaster.
/usr/lib/postgresql/bin/pg_ctl start -D /var/lib/postgres/data -l 
/var/log/postgres.log
postmaster successfully started

and the /var/log/postgres.log file shows

FATAL 1:  postgresql.conf:42: syntax error, token=".0"

so i try using quotes:

# /etc/postgresql/postgresql.conf
[snip]
port = 5432
virtual_host = "127.0.0.1"
virtual_host = "192.168.1.1"

which also doesn't work -- log shows:

FATAL 1:  postgresql.conf:41: syntax error, token="""

so how do i specify which interfaces/addresses postgres should
listen to, and which it shouldn't? (i probably mis-read the
documentation... nudges welcome.)

-- 
They don't remember whether or not they weren't doing anything
I didn't want them to do.
-- Karen, on why she feeds the cats when they misbehave
 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[GENERAL] User privileges on sequences

2001-10-16 Thread Mihai Gheorghiu

I have a db in which users can view and update data only via views.
It is my understanding that the privileges of the view/rule creator do not
extend to sequences. Therefore, I have to give users permissions to
sequences, just to the extent that they could add records. What is the
minimum set of privileges for this? Are SELECT privileges on sequences
enough? What happens actually when a user issues a statement: SELECT
nextval("sequence")? What about setval()? Do these involve only a SELECT to
the sequence, or is it an UPDATE, or is it a DELETE and INSERT, or just an
INSERT?


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



[GENERAL] postgresql 7.1.3

2001-10-16 Thread samsom, debra
Title: postgresql 7.1.3





I just installed postgresql 7.1.3 on Linux Redhat 7.1.  All is well except Postgresql will not start on Boot.  I have added the -o '-i' to the postgresql.conf and done the chkconfig --add postgresql.  Is there anything else that I am missing?

Debra Samsom
Bristol Aerospace Ltd.
(204) 775-8331 3402
[EMAIL PROTECTED] 





Re: [GENERAL] Practical Cursors

2001-10-16 Thread Christopher Masto

On Tue, Sep 25, 2001 at 12:06:48AM -0400, Micah Yoder wrote:
> (sorry to reply to a week-old message.  need to keep up with this list more!)

Ditto, but more so.

> I then wrote a daemon in C to do the work and store the results in RAM.  The 
> PHP script connected to the daemon via a socket, and passed a request ID and 
> the numbers of the records it wanted.  Sure, it was convoluted, but I 
> actually got the speed up to where I was fairly happy with it.
> 
> If there's a better solution than that, I'm not aware of it.

A technique I've used with some success is to select the primary keys
from the rows you're interested in, and only have to memorize a list of
integers.  Then for each page, select the rows "WHERE pkey IN (...)".
It's sort of a middle ground as far as tradeoffs go.  You don't have to
store a huge amount of data in RAM or temporary files, but you still
have to do the work up front.

The problem I have with persistent per-session connections is that you
end up having basically the same
(per-transaction-overhead * simultaneous-transactions), and you add
(per-connection-overhead * simultaneous-open-sessions) on top.
There are certainly situations where you can do better one way or the
other.. figuring out how to best tune the per-session case scares me.
-- 
Christopher Masto

CB461C61 8AFC E3A8 7CE5 9023 B35D  C26A D849 1F6E CB46 1C61

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [GENERAL] PostgreSQL and OpenOffice

2001-10-16 Thread Mihai Gheorghiu

Here is from staroffice.com.support.starbase:

Mihai Gheorghiu wrote:
>
> I want to connect to a PostgreSQL database on a RH7.0 machine.
> I go File New Database, general "Test", Type "JDBC", JDBC
> "org.postgresql.Driver" "jdbc:postgresql:sales" "username" "password".
> I use the same strings to successfully connect to the db from servlets
that
> run on the same computer (Tomcat).
> The message I get is:
> Error reading from database
> An error occured. JDBC can only be used again after Office has been
> restarted.
> Using //localhost:5432/sales instead of sales does not help.
> A weird message that I get sometimes (e.g. when I try to connect to the
> forum) is
> No Java installation found.
> The message goes away all by itself and I get connected OK.
> I have JAVA_HOME and JDK_HOME defined. Does it need anything else?
> Thank you all in advance.

Follow the directions given at http://www.staroffice.fsnet.co.uk/ in
the HowTo section and adapt to the JDBC driver or switch to ODBC.

--
___
G. Roderick Singleton, <[EMAIL PROTECTED]>


Hi Mihai,

This difficulty could be reproduced under our in-house test conditions.
According to the Quality Assurance department, this is a ODCB driver
problem. This problem should be fixed in the next version.

Regards,

Sanal

Sun Microsystems Inc.



>Did anybody try to connect OpenOffice or Staroffice to PostgreSQL via
>ODBC or any other interface?
>Does anybody have experience? Does it work and if so; does it work well?
>
>Hans



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [GENERAL] WWW interface for postgres

2001-10-16 Thread gravity

On Tue, Oct 16, 2001 at 07:41:26PM +0900, Karen Ellrick wrote:
> Meanwhile, my first question is still valid - it's a spooky feeling to see
> your own domain name show up, married with someone else's username, as a
> return address on a message that you know neither you (nor anyone else in
> your domain - in my case I am the only English speaker) wrote.  Did others
> get the same message as coming from [EMAIL PROTECTED], or were all the
> copies with mine (sctech.co.jp)?
> 

same here.
Debian@mydomain

flabbergasted 
(no! I'm an open relay!)

tinus

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



Re: [GENERAL] VACUUM, 24/7 availability and 7.2

2001-10-16 Thread Denis Gasparin

Ok, little language qui pro quo...

I'm sorry for the error...

Denis

At 15/10/01 17.00, Andrew Sullivan wrote:
>On Mon, Oct 15, 2001 at 10:40:17AM +0200, Denis Gasparin wrote:
> > >
> > >It's long since done.
> >
> > ==>> This means that it will not be included in 7.2? I've read 7.2
>
>No, it means it _will_ be included.
>
>A
>
>--
>
>Andrew Sullivan   87 Mowat Avenue
>Liberty RMS   Toronto, Ontario Canada
><[EMAIL PROTECTED]>   M6K 3E3
>  +1 416 646 3304 x110


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])



[GENERAL]

2001-10-16 Thread Mona



Hi
 
We are trying to rollback an update in postgres. But so far we have not 
been able to do it.When we Rollback..it says:
 
ROLLBACK: No transaction in progress.
 
Same happens with commit.We are used to SQL PlUS
 
Without these facilities we really cannot go ahead with postgres db. Could 
you please help us out on this.
 
 
 
Thanks
mlisa


Re: [GENERAL] Managing Users

2001-10-16 Thread Stephan Szabo

On Mon, 15 Oct 2001, Chris Cameron wrote:

> I'm having a bit of a problem managing users.
> 
> I have a database owned by user joe. Joe has a bunch of tables in this 
> database and is allowed to create databases but not users. All the 
> tables are owned by joe.
> If I create another user without any privledges at all, that user is 
> able to (on my system) create tables in any existing databases. 
> Including joes database.
> 
> Do I have something improperly configured, or is this just the way 
> Postgres works? I realize I have little details, but I'm not entirely 
> sure whats causing this so I don't know what details to include.

Right now, if a user can connect to a database, they can create objects.
You can make it impossible for the user to connect to the database by
using the pg_hba.conf to disallow the connections, but that's as far
as it goes.





---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [GENERAL] FTI Queries and Explain

2001-10-16 Thread Tom Lane

Gordan Bobic <[EMAIL PROTECTED]> writes:
> [ why is this slow? ]
> explain select jobs.title from jobs, jobs_description_fti, 
> jobs_title_fti where (jobs_description_fti.string = 'linux' or 
> jobs_title_fti.string = 'linux') and (jobs_description_fti.id = jobs.oid and 
> jobs_title_fti.id = jobs.oid);

Because the query is wrong.  The way you wrote the WHERE, given a
match in jobs_description_fti and jobs, *any* jobs_title_fti row
with a matching ID will result in an output row.  Similarly, given
a match in jobs_title_fti and jobs, *any* jobs_description_fti row
with a matching ID will produce output.  So the system generates
what's essentially a doubly nested loop over the insufficiently
constrained tables.

A correct and practical form of the query would be something like

select jobs.title from jobs, jobs_description_fti where
jobs_description_fti.string = 'linux' and jobs_description_fti.id = jobs.oid
union
select jobs.title from jobs, jobs_title_fti where
jobs_title_fti.string = 'linux' and jobs_title_fti.id = jobs.oid;

One of the not-so-pleasant aspects of SQL is that erroneous queries
frequently look like performance problems, because no one waits around
for the enormous result set that the query actually generates ... they
try to debug the performance problem instead of looking to see if the
query requests what they want ...

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [GENERAL] WWW interface for postgres

2001-10-16 Thread Richard Welty

On Tue, 16 Oct 2001 19:41:26 +0900 Karen Ellrick <[EMAIL PROTECTED]> wrote:
> Meanwhile, my first question is still valid - it's a spooky feeling to see
> your own domain name show up, married with someone else's username, as a
> return address on a message that you know neither you (nor anyone else in
> your domain - in my case I am the only English speaker) wrote.  Did others
> get the same message as coming from [EMAIL PROTECTED], or were all the
> copies with mine (sctech.co.jp)?
 
odds are that the user named debian is using a system where the MTA isn't
adding the domain name (which it should be doing, unqualified usernames in
from fields of email are evil.) none of the intervening MTAs took any
action, and the MTA for your company probably recognized the unqualified
username in the from address and "helpfully" added one.

my best guess,
  richard



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[GENERAL] pg_views view doesn't work

2001-10-16 Thread Jim Buttafuoco


Hi all,

I am having a problem with the "pg_views" view.  It seems that the
internal function pg_get_viewdef() is the problem.  See below. 

This problem is preventing me from dumping the database (either as 1
export or 1 table at a time).  I have recreated the database, but the
problem seems to have come back again last night.  If I create a new
database now the problem doesn't happen.

Thanks
Jim

TEST=# select version();
   version   
-
 PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC egcs-2.91.66
(1 row)


TEST=# select * from pg_views;
ERROR:  cache lookup for proc 189295778 failed
TEST=# 

TEST=# \d pg_views
   View "pg_views"
 Attribute  | Type | Modifier 
+--+--
 viewname   | name | 
 viewowner  | name | 
 definition | text | 
View definition: SELECT c.relname AS viewname,
pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.relname) AS
definition FROM pg_class c WHERE (c.relkind = 'v'::"char");

TEST=# select pg_get_viewdef(c.relname) from pg_class c;
ERROR:  cache lookup for proc 189295778 failed
TEST=# 







---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



[GENERAL] Queries and views

2001-10-16 Thread David Cana

Hello!

I have got a view like:

create view consulta_material as
  select
material.clave as clave,
referencia,
sede.nombre_es as nombre_sede, clave_sede,
soporte.nombre_es as nombre_soporte, clave_soporte,
area_materiales.nombre_es as nombre_area_materiales,
clave_area_materia
autor,
titulo,
descripcion,
fecha_intro, fecha_modificacion

  from material, sede, soporte, area_materiales

  where (material.clave_sede = sede.clave)
and (material.clave_soporte = soporte.clave)
and (material.clave_area_materiales = area_materiales.clave);

I´d like to know the performance difference between...

select * from consulta_material where clave=1;

And...

select
  material.clave as clave,
  referencia,
  sede.nombre_es as nombre_sede, clave_sede,
  soporte.nombre_es as nombre_soporte, clave_soporte,
  area_materiales.nombre_es as nombre_area_materiales,
clave_area_materia
  autor,
  titulo,
  descripcion,
  fecha_intro, fecha_modificacion

  from material, sede, soporte, area_materiales

  where (material.clave_sede = sede.clave)
  and (material.clave_soporte = soporte.clave)
  and (material.clave_area_materiales = area_materiales.clave)
  and (material.clave=1);

How can I measure SQL queries and views?

Thanks.





---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [GENERAL] connecting to a windows application, visual basic

2001-10-16 Thread postgresql


You are probably going to use ODBC. I don't know if there are VB 
drivers for postgresql. I have been using RealBasic on the mac and 
there are drivers to directly access postgresql. Connecting is very 
easy.

Check out the ODBC availability for VB.

Ted

-Original Message-
From: "Evan Panagiotopoulos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Mon, 15 Oct 2001 20:56:27 -0400
Subject: [GENERAL] connecting to a windows application, visual 
basic

> Well, I am in the process of trying to find an easy way of connecting
> to a
> database. I picked visual basic because I an a little familiar with 
the
> language and its interface. How do I connect to the database?
> 
> Any help/suggestions will be appreciated.
> 
> Thanks,
> 
> Evan Panagiotopoulos
> Technology, Library and Media Director
> Poughkeepsie City School District
> 
> 
> ---(end of
> broadcast)---
> TIP 3: if posting/reading through Usenet, please send an 
appropriate
> subscribe-nomail command to [EMAIL PROTECTED] so 
that your
> message can get through to the mailing list cleanly



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]