Jonathan Bartlett <[EMAIL PROTECTED]> writes:
> 1) If you have an index on a cacheable function, does PostgreSQL use the
> index instead of calculating the results?
Not in general --- only for an indexscan lookup.
> 2) How does PostgreSQL know when to recompute the function?
Never. That's what
On Fri, 25 Jul 2003, Tomasz Myrta wrote:
> Dnia 2003-07-25 23:38, U?ytkownik Jamie Lawrence napisa?:
> >dlm(# values (
> >dlm(# new.projects._id,
> ^
> >dlm(# new.doc_num,
> >dlm(#
Dnia 2003-07-25 23:38, Użytkownik Jamie Lawrence napisał:
Hi all -
I'm having a strange problem creating a rule on a view.
I've done this with no problem in other databases... I'm wondering if
somehow there was something omitted or some other type of prolem with
the database creation. Or, I coul
Hi all -
I'm having a strange problem creating a rule on a view.
I've done this with no problem in other databases... I'm wondering if
somehow there was something omitted or some other type of prolem with
the database creation. Or, I could have no idea what I'm talking about.
Any guesses?
dlm=
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;
'
On Fri, 2003-07-25 at 11:49, [EMAIL PROTECTED] wrote:
>
> lock table excl_table in exclusive mode;
That probably wont work, but this will:
EXECUTE ''LOCK TABLE ''
|| quote_ident(excl_table) || '' IN EXCLUSIVE MODE'';
Eric
---(end of broadcast)--
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 rel
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:
c
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
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(n
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: pgsql-genera
Dnia 2003-07-25 21:09, Użytkownik Elielson Fontanezi napisał:
Hi all!
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.
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
> psq
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
m
Is it possible to do variable substitution with explicit locks in plpgsql?
Something along the lines of
...
declare
big_string alias for $1;
excl_table text;
begin
--assuming big_string starts with something like table=table1!
excl_table := substr(big_string,7,(position(''!'' in big_string)-7))
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 B
On Fri, 25 Jul 2003, Elielson Fontanezi wrote:
> 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.1
>
> I would like some suggestions on how to speed up a query.
>
> Both of t
[EMAIL PROTECTED] wrote:
Quoting Dmitry Tkach <[EMAIL PROTECTED]>:
What about:
CREATE VIEW my_view AS SELECT b,c from
(SELECT a, b FROM table1 WHERE b=1) as my_ab,
(SELECT a, c FROM table2) as my_ac WHERE my_ac.a=my_ab.a
This looks like what you are trying to do, and doesn't use that
'subs
[EMAIL PROTECTED] writes:
> Quoting Dmitry Tkach <[EMAIL PROTECTED]>:
>> CREATE VIEW my_view AS SELECT b,c from
>> (SELECT a, b FROM table1 WHERE b=1) as my_ab,
>> (SELECT a, c FROM table2) as my_ac WHERE my_ac.a=my_ab.a
> I assume that with this statement postgresql will compute both subselects,
Good
morning!
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.1
I would like some suggestions on how
to speed up a query.
Both of the queries below are
identical exce
On Fri, 25 Jul 2003 [EMAIL PROTECTED] wrote:
> Hey postgresql gurus,
>
> I was just wondering, what kind of frontend do you recommend in 'bills
> (windows...)' environment?
> Is it better to use a tool like Qt from trolltech or is it better to use
> something like Omnis or Access???
>
> What are
On Friday 25 July 2003 09:18, [EMAIL PROTECTED] wrote:
> Hey postgresql gurus,
>
> I was just wondering, what kind of frontend do you recommend in 'bills
> (windows...)' environment?
> Is it better to use a tool like Qt from trolltech or is it better to use
> something like Omnis or Access???
I've
Quoting Dmitry Tkach <[EMAIL PROTECTED]>:
> What about:
>
> CREATE VIEW my_view AS SELECT b,c from
> (SELECT a, b FROM table1 WHERE b=1) as my_ab,
> (SELECT a, c FROM table2) as my_ac WHERE my_ac.a=my_ab.a
>
> This looks like what you are trying to do, and doesn't use that
> 'subsubselect' you w
Hey postgresql gurus,
I was just wondering, what kind of frontend do you recommend in 'bills
(windows...)' environment?
Is it better to use a tool like Qt from trolltech or is it better to use
something like Omnis or Access???
What are you opinions
best regards,
Ries van Twisk
--
On Friday 25 July 2003 07:04, vijaykumar M wrote:
> Hi All!
> is it possible to get in sql number of rows affected by the sql last insert,
>
> update or delete statement??
>
> for eg,
>
> oracle - sql%rowcount.
> sqlserver select @@rowcount.
You can do this sort of thi
25 matches
Mail list logo