Mike,
> I recently lost a hard drive and had to re-install, so the PG version
> I am
> using is only about 3 weeks old. However, as I said in my original
> post, I
> have A LOT of data in this database. Brick* implies 1334 tables,
> some of
> which have 2.5M records... All told, I have about 3
"Diehl, Jeffrey" <[EMAIL PROTECTED]> writes:
> Brick* implies 1334 tables
Hmm ... I wonder if the query is somehow holding onto a buffer pin for
the last block of each successively-accessed table? Will look into it.
What -B (# of shared buffers) setting are you running the postmaster
with? Try
clayton cottingham wrote:
>
> Brett Schwarz wrote:
> >
> > I couldn't resist, so I went ahead and did all of them. I might be using
> > these in a future app anyways. Again these are Tcl procs, but you may be
> > able to transfer the logical to another language, if you want.
> >
>
> if you need
> You need conditional logic, which suggests pl/pgsql is the way to go.
Maybe he could use simple sql function like this:
create function check_loan(text,int,int) returns boolean as '
select (
select count(*) from kolcsonok where
code_user=($2) and code_loan=($3) and typet
=?iso-8859-1?Q?Miguel_Gonz=E1lez?= <[EMAIL PROTECTED]> writes:
> But I got that the parser cannot identify the =$ operator
You need a space between = and $.
regards, tom lane
---(end of broadcast)---
TIP 2: you can get off
Ok, can someone explain to me why this first query might run faster than the
second?
select src,dst,count(dst) from data;
select src,dst,count(*) from data;
I've always used the second form. If the first is faster, I need to know.
Thanx,
Mike Diehl,
Network Monitoring Tool Devl.
Sandia Nation
I recently lost a hard drive and had to re-install, so the PG version I am
using is only about 3 weeks old. However, as I said in my original post, I
have A LOT of data in this database. Brick* implies 1334 tables, some of
which have 2.5M records... All told, I have about 355G of data. I don't
Brett Schwarz wrote:
>
> I couldn't resist, so I went ahead and did all of them. I might be using
> these in a future app anyways. Again these are Tcl procs, but you may be
> able to transfer the logical to another language, if you want.
>
if you need this in perl i think Data::Manip might hep
I couldn't resist, so I went ahead and did all of them. I might be using
these in a future app anyways. Again these are Tcl procs, but you may be
able to transfer the logical to another language, if you want.
proc getTG {year} {
set di \
[clock format [clock scan $year-11-30] -fo
Maybe the reason is that you defined the function to return bool, but are
attempting to return text?
You need conditional logic, which suggests pl/pgsql is the way to go.
Something simple should do it, like:
create function check_loan (text,int,int)
returns bool
as '
begin
select * from loans whe
On Wed, 19 Sep 2001, [iso-8859-1] Miguel González wrote:
> I tried
>
> create function check_loan (text,int,int)
> returns bool
> as
> 'select CAST(typetable AS text) from loans where typetable=$1 and
> code_user=$2 and code_loan=$3;'
> language 'sql';
>
>
> But I got that the parser cannot id
Hello !
Ok...
I wrote a small text against that virus just in case you need it !
http://www.horus.ch/virus180901.txt
A bientôt !
Denis Bucher
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscr
by the way you know how to create the following sql function?
I need to return a boolean saying if an object is onloan.
the loan table is as follows:
loans
-
code_loan
code_user
typetable
i want to check these three fields, the first two fields (the code ones) are
integer and the last a s
Some of you may get this message for the second time, but as
I see there is some problem with one particular mail server
on the route, and this message didn't arrive back from the
list despite the fact that I sent it several days ago.
--
Subject: R
Pasha,
> I'm trying to find if anyone knows how to find out when the stored
> procedure was used last time (not created).
If you want to do this, you'd need to create your own log table, and
write to it at the beginning of your function:
CREATE TABLE function_log (
run_id SERIAL NOT NULL PRI
rdear <[EMAIL PROTECTED]> writes:
> I'm doing a check within a PL/PGSQL function using a regular expression
> and I get the error:
> ERROR: regcomp failed with error invalid character range
> This appears to be because of the underscore "_" character. The regex I
> want to use is ''[A-Za-z0-9
I'm working on a HP-UX system, so some of the
following has to be adapted, but in principle
it's the same on every system and it works.
First piece of code is a standalone program,
which you should always write and test before
you start creating C functions inside PostgreSQL.
Second piece is
I'm doing a check within a PL/PGSQL function using a regular expression
and I get the error:
ERROR: regcomp failed with error invalid character range
This appears to be because of the underscore "_" character. The regex I
want to use is ''[A-Za-z0-9_]'' but this doesn't work. Any suggestions
Many thanks for your answers. The thing that in the Bruce´s book doesnt
explain how to compile this kind of functions, anyway I found how to compile
it.
Now, I am still having problems. I want to create a function to send an
email. I pass to the function two arguments: the email to send, and the
On Sat, 15 Sep 2001 00:26:01 +0200, I wrote:
> [...]
>CREATE VIEW mj1 (jid, cnt) AS
>SELECT jid, COUNT(mid) cnt FROM mj GROUP BY jid;
This should be COUNT(mid) AS cnt ...
> [...]
>I did not test this with PostgreSQL, but you get the idea.
Well, now I did test with PostgreSQL (thanks, Jason Tis
So I wasn't paying enough attention to postgres upgrades and missed that 7.1 actually
has outer joins, so I'm currently happily rebuilding, but I had a few questions about
the explicit join syntax and preformance issues.
1. Say i have a tables called
"married" (marriedid, husband, wife),
"peo
Did you use the compiler option for generating
position independent code (PIC) for use in building
shared libraries.
Did you use the linker option for creating
a shared library - I think you did, the file
suffix .so looks that way.
I did it several times successfully using commands
like
CREA
Miguel González writes:
> ERROR:/load of file /home/postgres/ctof.so failed: /home/postgres/ctof.so
> ELF file´s phentsize not the expected size.
You probably didn't compile or link the code correctly. See the
PostgreSQL Programmer's Guide for information.
--
Peter Eisentraut [EMAIL PROTEC
23 matches
Mail list logo