Re: [SQL] SQL list table names

2003-01-08 Thread Alan Gutierrez
alviN wrote: is it possible to execute an sql query to be able to list the tables's names? well, you can do it on psql using \dt. but im talking about the SQL statement, because i want to execute that query from a script. Oh, even *I* know the answer to this one! Run psql with the -E argument

Re: [SQL] SQL list table names

2003-01-08 Thread Achilleus Mantzios
On Wed, 8 Jan 2003, Alan Gutierrez wrote: alviN wrote: is it possible to execute an sql query to be able to list the tables's names? well, you can do it on psql using \dt. but im talking about the SQL statement, because i want to execute that query from a script. Oh, even *I* know

[SQL] full join in view

2003-01-08 Thread Tambet Matiisen
I'm making a report in Crystal Reports, which makes use of full join. As Crystal Reports does not support full join natively, I created a view which contains the join and based my report on that view. The report has also a parameter to filter only subset of rows from view. My problem is, that

Re: [SQL] full join in view

2003-01-08 Thread Tomasz Myrta
Tambet Matiisen wrote: I'm making a report in Crystal Reports, which makes use of full join. As Crystal Reports does not support full join natively, I created a view which contains the join and based my report on that view. The report has also a parameter to filter only subset of rows from

Re: [SQL] [PERFORM] 7.3.1 index use / performance

2003-01-08 Thread Achilleus Mantzios
On Tue, 7 Jan 2003, Tom Lane wrote: Rod Taylor [EMAIL PROTECTED] writes: I am wondering about a compiler bug, or some other peculiarity on your platform. Can anyone else using FreeBSD try the above experiment and see if they get different results from mine on 7.3.* (or CVS tip)? On

[SQL] Search and Replace

2003-01-08 Thread Randy D. McCracken
I apologize for having to resort to sending what is most likely a simple tech support question regarding PostgreSQL to this list but I have not been able to find the answer in the documentation. I am responsible for managing a database containing over 6,000 records of US Forest Service Research

Re: [SQL] Search and Replace

2003-01-08 Thread Bruno Wolff III
On Wed, Jan 08, 2003 at 09:02:47 -0500, Randy D. McCracken [EMAIL PROTECTED] wrote: UPDATE publications SET url = 'www.srs.fs.usda.gov' WHERE url = 'www.srs.fs.fed.us'; For simple cases you can do this with available string functions. For more complicated cases, you can write a simple

[SQL] to_date() confusion

2003-01-08 Thread Richard Rowell
I'm confused. How do I massage the integer 10102 into the date 2002-01-01? cmi= select to_date('010102','MMDDYY'); to_date 2002-01-01 (1 row) cmi= select to_char(10102,'00'); to_char - 010102 (1 row) cmi= select to_date(to_char(10102,'00'),'MMDDYY');

Re: [SQL] to_date() confusion

2003-01-08 Thread Bruno Wolff III
On Wed, Jan 08, 2003 at 08:49:00 -0600, Richard Rowell [EMAIL PROTECTED] wrote: I'm confused. How do I massage the integer 10102 into the date 2002-01-01? cmi= select to_char(10102,'00'); to_char - 010102 (1 row) Note the leading space in the returned row. That is

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
REPLACE is the right function for you avaliable as an addon. install it in postgresql installation using the source at: http://www.brasileiro.net:8080/postgres/cookbook/view-one-recipe.adp?recipe_id=23 if you face problem please lemme know once this function is installed you could update

[SQL] count(*) optimization

2003-01-08 Thread Nikola Ivacic
Hi I have trouble executing count(*) statement. On a large dataset it takes quite a while to return result. Is there any other way to get number of tupples in relation or is the only way tooptimize count() function to indexit? thanks Nikola

Re: [SQL] count(*) optimization

2003-01-08 Thread Bruno Wolff III
On Wed, Jan 08, 2003 at 17:04:40 +0100, Nikola Ivacic [EMAIL PROTECTED] wrote: Hi I have trouble executing count(*) statement. On a large dataset it takes quite a while to return result. Is there any other way to get number of tupples in relation or is the only way to optimize count()

Re: [SQL] count(*) optimization

2003-01-08 Thread Nikola Ivacic
The problem is in other software I use, witch uses count(*) function to display relation properties pgAdmin II phpPgAdmin Nikola - Original Message - From: Bruno Wolff III [EMAIL PROTECTED] To: Nikola Ivacic [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 08, 2003 5:22

Re: [SQL] Search and Replace

2003-01-08 Thread Ross J. Reedstrom
On Wed, Jan 08, 2003 at 09:02:47AM -0500, Randy D. McCracken wrote: I apologize for having to resort to sending what is most likely a simple tech support question regarding PostgreSQL to this list but I have not been able to find the answer in the documentation. Hey, this is Open Source:

[SQL] What benefits can I expect from schemas ?

2003-01-08 Thread Bob Lapique
Hi, I could not find much documentation about SQL 92 schemas that version 7.3 now supports. I understood it was a structure to group various objects, which allows faster privilege management, namespaces definition. Besides that, I don't see any advantages. I'd be glad if someone could point them

Re: [SQL] count(*) optimization

2003-01-08 Thread Nikola Ivacic
I am not sure pgAdmin uses count(*) and I didn't have time to check phpPgAdmin also, I presumed it from similarly slow response I get in psql Nikola - Original Message - From: Ian Harding [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday,

Re: [SQL] What benefits can I expect from schemas ?

2003-01-08 Thread Bruce Momjian
Bob Lapique wrote: Hi, I could not find much documentation about SQL 92 schemas that version 7.3 now supports. I understood it was a structure to group various objects, which allows faster privilege management, namespaces definition. Besides that, I don't see any advantages. I'd be glad if

Re: [SQL] [PERFORM] 7.3.1 index use / performance

2003-01-08 Thread Tom Lane
Just to close off the thread, here is the end-result of investigating Achilleus Mantzios' problem. --- Forwarded Message Date:Wed, 08 Jan 2003 11:54:36 -0500 From:Tom Lane [EMAIL PROTECTED] To: Achilleus Mantzios [EMAIL PROTECTED] Subject: Re: [SQL] [PERFORM] 7.3.1 index use /

Re: [SQL] count(*) optimization

2003-01-08 Thread Josh Berkus
Nikola, I am not sure pgAdmin uses count(*) and I didn't have time to check phpPgAdmin also, I presumed it from similarly slow response I get in psql Well, pgAdmin and phpPgAdmin have their own mailing lists. I'd suggest posting there. Ideally, these programs should have an option that

Re: [SQL] insert rule doesn't see id field

2003-01-08 Thread Ron Peterson
On Tue, Jan 07, 2003 at 11:01:08AM -0500, Tom Lane wrote: I thought that the idea behind noup was to protect single columns from update. However, when I apply the noup trigger as above, I can't update /any/ column. Is this the intended behaviour? Idly looking at the source code for

Re: [SQL] Search and Replace

2003-01-08 Thread Randy D. McCracken
Just to close off another thread and to give a tad more information... I was not clear enough in my initial question to the list because not all of the URLs I am trying to change begin with http://www.srs.fs.fed.us/ so what I was really looking for was the syntax for replacing www.srs.fs.fed.us

Re: [SQL] What benefits can I expect from schemas ?

2003-01-08 Thread chester c young
I could not find much documentation about SQL 92 schemas that 7.3 now supports. I understood it was a structure to group various objects, which allows faster privilege management, namespaces definition. Besides that, I don't see any advantages. I'd be glad if someone could point them

Re: [SQL] What benefits can I expect from schemas ?

2003-01-08 Thread Bruce Momjian
chester c young wrote: I could not find much documentation about SQL 92 schemas that 7.3 now supports. I understood it was a structure to group various objects, which allows faster privilege management, namespaces definition. Besides that, I don't see any advantages. I'd be glad if

[SQL] Postgresql Bug List?

2003-01-08 Thread Wei Weng
Is there a bugzilla kind of thing for Postgresql? I would like to help out on the development, but have no idea where to start... Thanks Wei ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [SQL] Postgresql Bug List?

2003-01-08 Thread Bruce Momjian
No bugzilla, but do have a TODO list. See the developers FAQ. --- Wei Weng wrote: Is there a bugzilla kind of thing for Postgresql? I would like to help out on the development, but have no idea where to start...

Re: [SQL] Search and Replace

2003-01-08 Thread Rajesh Kumar Mallah.
any anyone explain whats wrong with the replace based solution to this problem which i posted earlier? did i misunderstood anything? regds mallah. On Thursday 09 January 2003 01:48 am, Randy D. McCracken wrote: Just to close off another thread and to give a tad more information... I was