am 10.01.2006, um 11:19:32 -0500 mailte Sameer Nanda folgendes:
> Is it possible to accept an array (or any data structure representing an
> ordered set ) as an input parameter in a stored procedure? The
> number of elements will vary from call to call.
Yes, of course. A simple example:
http://a-
Hello everybody,
Since I am new to PostgreSQL mailing lists, I am not sure which mailing list to
use for my problem, I issue it to this group. If there is a more appropriate
list, please let me know and I will happily post there.
The situation:
While porting an existing application from Sybase
On Mon, 2006-01-09 at 20:28, Tom Lane wrote:
> Robert Greimel <[EMAIL PROTECTED]> writes:
> > I have a question regarding function overloading:
>
> > assume that you have a function that takes several numeric arguments -
> > lets for example say 4 arguments: f(a,b,c,d)
>
> > Now further assume th
I'm doing a query that really should be too taxing. But when I
execute it I get the following error(s):
psql(18967) malloc: *** vm_allocate(size=8421376) failed (error code=3)
psql(18967) malloc: *** error: can't allocate region
psql(18967) malloc: *** set a breakpoint in szone_error to debug
Is it possible to accept an array (or any data structure representing an ordered set ) as an input parameter in a stored procedure? The
number of elements will vary from call to call.
DB:
PostgreSQL 8.0.0 on Linux
Adding -general back into this...
No, I don't think there's any way to trigger on this programmatically, though
there has been talk from time-to-time about adding support for triggers on DDL.
In the meantime you'll just need to scan the system tables for new indexes.
I'm also wondering if there
MG schrieb:
> Hello,
>
> I use PostgreSQL 8.0.3.
>
> I want to get the information of the last value of a sequence.
>
> The function 'currval' only gives the value back, if before a nextval is
> executed.
>
> /Return the value most recently obtained by |nextval| for this sequence
> in the cu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
>> If you think that spammers are unable to do s/ (at) /@/ you're living in
>> a dream world.
> Agreed. I'd honesly rather we drop that nonsense so I can at least cut
> and paste email addresses when needed.
I'd rather not. While obfuscation is n
On Sun, Jan 08, 2006 at 06:35:06PM -0800, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have to archieve functions like this:
> When users define a new index, I will do something (for instance,
> increase an counter in my table or do some other statistics). However,
> I defined rule for insert on pg_cl
On Sun, Jan 08, 2006 at 10:22:22AM +0100, Marc Philipp wrote:
> > This sounds like it has more to do with inadequate freespace map
> > settings than use of arrays. Every update creates a dead tuple, and
> > if
> > it is large (because the array is large) and leaked (because you have
> > no
> > r
On Mon, Jan 09, 2006 at 10:13:12AM +, Richard Huxton wrote:
> Angshu Kar wrote:
> >Hi Pgsql,
> >
> >Could anyone please advise whether the following program can be implemented
> >using pgsql cursors/anythign else (or do we need some external scripts)?If
> >yes, could you give please some functi
On Sun, Jan 08, 2006 at 12:34:25AM +0100, Peter Eisentraut wrote:
> Magnus Hagander wrote:
> > archives.postgresql.org properly "hides" the addresses.
>
> If you think that spammers are unable to do s/ (at) /@/ you're living in
> a dream world.
Agreed. I'd honesly rather we drop that nonsense so
On Sat, Jan 07, 2006 at 02:45:44PM -0500, Robert Treat wrote:
> You should be able to do this now using pg_depend, it would just take a bit
> of
> leg-work. Pretty sure it would be easier than solving physical/logical
> attribute separation. Someone writing a pg_list_all_dependencies function
Please Unsuscribe me.
Thanks.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
On 1/10/06, Mark <[EMAIL PROTECTED]> wrote:
> This is great,
> Now here's my explain analyze:
>
> Seq Scan on balance (cost=0.00..54.51 rows=147 width=106) (actual
> time=0.026..0.767 rows=62 loops=1)
> Filter: (amount >= 0::double precision)
>
> I do have an index on amount,
Mark <[EMAIL PROTECTED]> writes:
> I do have an index on amount, but I guess it won't be used for >= ...
The general rule is that an index is only helpful for extracting a
fairly small subset of the table ("small" can mean as little as 1%).
So a one-sided inequality is not usefully indexable unles
PgBrowse ver 1.7 is a generic Postgresql database browser that works on
Windows, Macintosh and Linux platforms that is written in Tcl/Tk.
A Starpack is available for Linux/x86 and an application bundle
is available for MacOSX.
What is new in 1.6?
o 1.6 Contains and can display the complete ht
This is great,
Now here's my explain analyze:
Seq Scan on balance (cost=0.00..54.51 rows=147 width=106) (actual
time=0.026..0.767 rows=62 loops=1)
Filter: (amount >= 0::double precision)
I do have an index on amount, but I guess it won't be used for >= ...
is there any way
"Jonathan Roby" <[EMAIL PROTECTED]> writes:
> For a project here at work I look after a web app that communicates with =
> a postgresql database. We need to clone/copy the existing database to =
> run app upgrades on the clone database and then use the upgraded =
> database in place of the original
Hi everyone,
For a project here at work I look after a web app
that communicates with a postgresql database. We need to clone/copy the existing
database to run app upgrades on the clone database and then use the upgraded
database in place of the original.
I've read the pg_dump/pg_restore
On 1/10/06, John McCawley <[EMAIL PROTECTED]> wrote:
> Regarding the usefulness of triggers...I tend to stay away from them. I
> like to keep my data in my database and my logic in my application. I
> try to relegate triggers to very simple things like timestamping
> records. i.e. things that I
On 1/10/06, Mark <[EMAIL PROTECTED]> wrote:
> Hello,
>
> When I run 'explain analyze' on a query, how do I know what index is
> used and is it used at all. What are specific words should I look
> for?
>
> Is "Seq Scan" indicates that index has been used?
> How do I know that it was Full Table Scan?
Hello,
When I run 'explain analyze' on a query, how do I know what index is
used and is it used at all. What are specific words should I look
for?
Is "Seq Scan" indicates that index has been used?
How do I know that it was Full Table Scan?
Thanks,
Mark.
___
Nico,
I do not believe there is anyone who can tell you the "best way to go" as
that is determined by far more than DB access.
That said, I am inclined to agree with John. I would expand on that to say
that if Delphi is the only language you know, then it is the best option for
getting prod
John McCawley <[EMAIL PROTECTED]> writes:
> Foreign keys do not cascade deletions.
By default, no, but there is the CASCADE option ...
regards, tom lane
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will
John McCawley wrote:
> Foreign keys do not cascade deletions.
They will if you specify "on delete cascade".
--
Guy Rouillier
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail com
Select last_value from your_sequence_name;
John
MG wrote:
Hello,
I use PostgreSQL 8.0.3.
I want to get the information of the last value of a sequence.
The function 'currval' only gives the value back, if before a nextval is
executed.
Return the value most recently obtained by nextval for t
On 1/10/06, Jaime Casanova <[EMAIL PROTECTED]> wrote:
> On 1/10/06, surabhi.ahuja <[EMAIL PROTECTED]> wrote:
> >
> >
> > is there an advantage of using a trigger? when the same job can be performed
> > by a stored procedure?
> >
>
a trigger is actually a stored procedure... the advantage is that i
Hello,
I use PostgreSQL 8.0.3.
I want to get the information of the last value of a sequence.
The function 'currval' only gives the value back, if before a nextval is
executed.
Return the value most recently obtained by nextval for this sequence in the current session. (An
error is repo
On 1/10/06, surabhi.ahuja <[EMAIL PROTECTED]> wrote:
>
>
> is there an advantage of using a trigger? when the same job can be performed
> by a stored procedure?
>
a trigger is actually a stored procedure... the advantage is that it's
called automagically when an event happens...
> one more questi
Foreign keys do not cascade deletions. If table y references table x on
column a, the attempt to delete records in x with dependent records in y
will yield an error. So the answer to that question is no, your trigger
won't get called because a) y doesn't get touched because that's not
what fo
I really wouldn't take relative DB performance into much consideration
when choosing a programming language for your project. I have found
that the actual Language/API overhead to be pretty inconsequential in
most of my projects. When my DB access is slow, I have found it is
almost always a p
Title: regarding triggers
is there an advantage of using a trigger? when the same job can be performed by a stored procedure?
one more question is as follows:
suppose i have a table x, with a primary attribute 'a'
and i have a table y, with the primary attribute 'b', and a foreign key 'a'.
Matthew Peter wrote:
CREATE OR REPLACE FUNCTION getlist(text) RETURNS SETOF my_tbl as $$
SELECT * FROM my_tbl
WHERE u_id IN (0, $1);
$$ LANGUAGE SQL;
SELECT * from getlist('1,2,3');
(0 rows)
You're executing SELECT * FROM my_tbl WHERE u_id IN (0, '1,2,3').
Apparently there are no values 0 or
34 matches
Mail list logo