Re: [GENERAL] SAP DB: The unsung Open Source DB

2003-07-25 Thread Shridhar Daithankar
On 24 Jul 2003 at 10:00, Tom Lane wrote: Richard Huxton [EMAIL PROTECTED] writes: There's a multi-year plan to bring the code bases closer together which sounds like one of those big projects that always make me nervous. Just between us chickens, I hope they do spend multiple man-years

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Thomas Kellerer
Terence Chang schrieb: I am still getting the error. would this matter with 7.3.3 on windows with cygwin? From my experience I'd never user quotes at any place (neither during creation of the table nor in the SELECT, UPDATE statements). All DBMS I know behave like Postgres. So if you never quote

[GENERAL] Which file belongs to which database?

2003-07-25 Thread Thomas Kellerer
Hello all, just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? I have looked through the documentation of the system catalogs, but couldn't find any reference to that. The field datpath in pg_database is empty in my system (7.2 on

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Shridhar Daithankar
On 25 Jul 2003 at 8:45, Thomas Kellerer wrote: just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? There is a contrib module oid2name. Use that. You can just find the oid of the object from catalog and search for that file. That's

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Karsten Hilbert
just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? I have looked through the documentation of the system catalogs, but couldn't you should also look through the mailing list archives... Karsten -- GPG key ID E4071346 @

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Thomas Kellerer
Shridhar Daithankar schrieb: On 25 Jul 2003 at 8:45, Thomas Kellerer wrote: just out of curiosity: how can I find out which files in the PG_DATA directory belong to which database/table? There is a contrib module oid2name. Use that. You can just find the oid of the object from catalog and

[GENERAL] plPython and restricted execution issues

2003-07-25 Thread JX
Hi. I've made a small stored procedure un PL/python. This procedure retrieve python code from a row then execute it and calls a predefined function. Alls works well while no others functions are defined and called in the row retrieved code; I mean when I define the row retrieved

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Andrew Sullivan
On Thu, Jul 24, 2003 at 04:34:26PM -0700, Terence Chang wrote: All: I don't remember I even seen a document saying PostgreSQL are case sensitive. I just figure out that my column name are case The docs have it in a footnote:

[GENERAL] Hardware selection

2003-07-25 Thread psql-mail
As mentioned previously I have a large text database with upwards of 40GB of data and 8 million tuples. The time has come to buy some real hardware for it. Having read around the subject online I see the general idea is to get as much memory and the fastest I/O possible. The buget for the

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Ron Johnson
On Fri, 2003-07-25 at 07:28, Andrew Sullivan wrote: On Thu, Jul 24, 2003 at 04:34:26PM -0700, Terence Chang wrote: All: I don't remember I even seen a document saying PostgreSQL are case sensitive. I just figure out that my column name are case The docs have it in a footnote:

[GENERAL] Solaris, Postgresql and Problems

2003-07-25 Thread Errol Neal
Hi All, I have posted this before, but have not yet got any resolutions on it. I am hoping someone with experience can help me out. I am running Postgresql 7.3.2 on Solaris 5.9. I am trying to increase the number of max connections for postgresql but it but I am having some issue. After reading

Re: [GENERAL] How to encrypt data in Postgresql

2003-07-25 Thread Reuben D. Budiardja
On Thursday 24 July 2003 02:59 pm, Franco Bruno Borghesi wrote: You must install pgcrypto (its in your contrib/pgcrypto directory). Then, the functions crypt and gen_salt will become available. As an example, to insert a new user (peter) with an encrypted password (1234) you can do: INSERT

Re: [GENERAL] Which file belongs to which database?

2003-07-25 Thread Tom Lane
Thomas Kellerer [EMAIL PROTECTED] writes: Shridhar Daithankar schrieb: You can just find the oid of the object from catalog and search for that file. That's the principle. That easy ? :-) Actually you must look at pg_class.relfilenode; this is initially the same as oid, but there are

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Reuben D. Budiardja
On Friday 25 July 2003 02:37 am, Thomas Kellerer wrote: Terence Chang schrieb: I am still getting the error. would this matter with 7.3.3 on windows with cygwin? From my experience I'd never user quotes at any place (neither during creation of the table nor in the SELECT, UPDATE

Re: [GENERAL] Hardware selection

2003-07-25 Thread Ron Johnson
On Fri, 2003-07-25 at 07:42, [EMAIL PROTECTED] wrote: As mentioned previously I have a large text database with upwards of 40GB of data and 8 million tuples. The time has come to buy some real hardware for it. Having read around the subject online I see the general idea is to get as

Re: [GENERAL] How to encrypt data in Postgresql

2003-07-25 Thread Richard Welty
On Fri, 25 Jul 2003 09:33:30 -0400 Reuben D. Budiardja [EMAIL PROTECTED] wrote: I think if you encrypt MD5 before storing it into the table, then there is no way to retrieve the corresponding clear text right? since MD5 is one-way encryption.. yes, but normally when doing passwords, one

Re: [GENERAL] Solaris, Postgresql and Problems

2003-07-25 Thread Doug McNaught
Errol Neal [EMAIL PROTECTED] writes: After making this change, and increasing the max number of buffers to 128 and the max number of connections to 64, I rebooted my system. Things come up fine, Postgres seems happy, but shortly after the Postgres server dies or terminates with nothing in

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Tom Lane
Ron Johnson [EMAIL PROTECTED] writes: On Fri, 2003-07-25 at 07:28, Andrew Sullivan wrote: The docs have it in a footnote: http://candle.pha.pa.us/main/writings/pgsql/sgml/sql-syntax.html#FTN.AEN1031 PostgreSQL's approach is backwards from the standard. Is there any firm discussion about

Re: [GENERAL] Can I turn the case sensitive off

2003-07-25 Thread Terence Chang
This is exactly what I was doing. I use PostgreSQL Manager Pro. The tool covert all my column name and table name in the double quote. So I have all my column/table/function created in upper case (Oracle habit). Now, I have to quote all of them. I should stay with psql, I guess. :-) Thanks! At

Re: [GENERAL] Query analyse

2003-07-25 Thread Dmitry Tkach
The first query is able to use the index on nr_proponente, because the condition involves that column directly, the second query is not, because the index only contains the values of nt_proponente, not results of trunc(..)/ Try replacing that condition with something like pa.nr_proponente

[GENERAL] ERROR: DefineIndex: index function must be marked iscachable

2003-07-25 Thread Elielson Fontanezi
Hi all! What can I do in this case? I could not found anything about iscachable. postgres$ cat in.sqlcreate index bt_proposta_f01 on propostausing btree (func_cod_secretaria(nr_proponente)); postgres$ psql -d escola -f in.sqlpsql:in.sql:2: ERROR: DefineIndex: index function must be

Re: [GENERAL] [SQL] ERROR: DefineIndex: index function must be marked iscachable

2003-07-25 Thread Stephan Szabo
On Fri, 25 Jul 2003, Elielson Fontanezi wrote: What can I do in this case? I could not found anything about iscachable. postgres$ cat in.sql create index bt_proposta_f01 on proposta using btree (func_cod_secretaria(nr_proponente)); postgres$ psql -d escola -f in.sql

Re: [GENERAL] [SQL] ERROR: DefineIndex: index function must be

2003-07-25 Thread Stephan Szabo
On Fri, 25 Jul 2003, Stephan Szabo wrote: On Fri, 25 Jul 2003, Elielson Fontanezi wrote: What can I do in this case? I could not found anything about iscachable. postgres$ cat in.sql create index bt_proposta_f01 on proposta using btree (func_cod_secretaria(nr_proponente));

RES: [GENERAL] [SQL] ERROR: DefineIndex: index function must be marked iscachable

2003-07-25 Thread Elielson Fontanezi
Oh sorry! Linux netlab142.prodam 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001 i686 unknown pg_ctl (PostgreSQL) 7.2.1 -Mensagem original- De: Stephan Szabo [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 25 de julho de 2003 16:25 Para: Elielson Fontanezi Cc:

Re: [GENERAL] Query analyse

2003-07-25 Thread Tom Lane
Stephan Szabo [EMAIL PROTECTED] writes: You're probably ending up with different plans since in one case it has a plain column reference and in the other it has a marginally complicated expression in the join condition. Yeah. 7.3 and before cannot do merge or hash joins on conditions that are

[GENERAL] ERROR: DefineIndex: index function must be marked iscachable

2003-07-25 Thread Elielson Fontanezi
Hi! Who can help me on that? First of all, my envoronment is: Linux netlab142.prodam 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001 i686 unknown pg_ctl (PostgreSQL) 7.2. Problem: ERROR: DefineIndex: index function must be marked iscachable by executing: create index bt_proposta_f01

Re: [GENERAL] ERROR: DefineIndex: index function must be marked

2003-07-25 Thread Stephan Szabo
On Fri, 25 Jul 2003, Elielson Fontanezi wrote: Who can help me on that? First of all, my envoronment is: Linux netlab142.prodam 2.4.8-26mdk #1 Sun Sep 23 17:06:39 CEST 2001 i686 unknown pg_ctl (PostgreSQL) 7.2. You should definately move to the highest 7.2 release

RES: [GENERAL] ERROR: DefineIndex: index function must be marked iscachable

2003-07-25 Thread Elielson Fontanezi
Thanks a lot! The complete solution is here! 1st. The function wich substitute the trunc() function CREATE OR REPLACE FUNCTION func_cod_secretaria(INTEGER) RETURNS INTEGER AS ' DECLARE v_nr_proponente ALIAS FOR $1; BEGIN return TRUNC(v_nr_proponente/10,0)*10; END; '

[GENERAL] Function index qeustion

2003-07-25 Thread Jonathan Bartlett
Questions: 1) If you have an index on a cacheable function, does PostgreSQL use the index instead of calculating the results? 2) How does PostgreSQL know when to recompute the function? Jon On Fri, 25 Jul 2003, Elielson Fontanezi wrote: Thanks a lot! The complete solution is here! 1st.

Re: [GENERAL] Wacky query plan, why?

2003-07-25 Thread Stephan Szabo
On Fri, 25 Jul 2003, Maksim Likharev wrote: I have 2 queries, one is never returns, like explain shows 677195846.00 cost and another doing the same job works ( cost 6072.00 ) I do not understand one thing, why query number one, generates so unbelievably screwed up plan? why it does

Re: [GENERAL] Wacky query plan, why?

2003-07-25 Thread Maksim Likharev
My be I too spoiled by MS SQL Server, but does'nt syntax: update prod.t_results set expdate=e.termdate from work.termdate e, prod.t_results r where e.docid=r.docid; or update prod.t_results set expdate=e.termdate from work.termdate e inner join prod.t_results r on

Re: [GENERAL] Using YY-MM-DD date input

2003-07-25 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: It would be nice to specify the input and output formats independently. They are independent now. I think we can sort of do that now, but it isn't clear. When format is Postgres, US/European control whether month is first in input and output. When it

Re: [GENERAL] Wacky query plan, why?

2003-07-25 Thread Mike Mascari
Maksim Likharev wrote: My be I too spoiled by MS SQL Server, but does'nt syntax: update prod.t_results set expdate=e.termdate from work.termdate e, prod.t_results r where e.docid=r.docid; or update prod.t_results set expdate=e.termdate from work.termdate e inner join

Re: [GENERAL] Wacky query plan, why?

2003-07-25 Thread Stephan Szabo
On Fri, 25 Jul 2003, Maksim Likharev wrote: My be I too spoiled by MS SQL Server, but does'nt syntax: update prod.t_results set expdate=e.termdate from work.termdate e, prod.t_results r where e.docid=r.docid; or update prod.t_results set expdate=e.termdate from work.termdate e

Re: [GENERAL] Using YY-MM-DD date input

2003-07-25 Thread Ron Johnson
On Fri, 2003-07-25 at 18:55, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: It would be nice to specify the input and output formats independently. [snip] that I'm outvoted on that point). The point I'm trying to make is that we need to extend input DateStyle so that this approach

Re: [GENERAL] Using YY-MM-DD date input

2003-07-25 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: It would be nice to specify the input and output formats independently. They are independent now. I think we can sort of do that now, but it isn't clear. When format is Postgres, US/European control whether month is first in

Re: [GENERAL] Using YY-MM-DD date input

2003-07-25 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: But we lose functionality that can't possibily be used in 2003 because 03-01-01 doesn't identify 03 as a year. This argument is specious. You could equally well use it to justify removing our support for dd-mm-yy and mm-dd-yy, because those aren't unique

Re: [GENERAL] Using YY-MM-DD date input

2003-07-25 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: But we lose functionality that can't possibily be used in 2003 because 03-01-01 doesn't identify 03 as a year. This argument is specious. You could equally well use it to justify removing our support for dd-mm-yy and mm-dd-yy,