I don't seem to be able to create tables (persistent or temporary) from
within a PL/PGSQL function. With the following script, I can create the
function fine:
CREATE FUNCTION tst()
RETURNS INTEGER
AS '
BEGIN
CREATE TABLE ttt(a int);
RETURN 0;
END;
'
LANGUAGE 'plpgsql';
... but when
I've written my Dijkstra's algorithm in PL/PGSQL. It didn't turn out to be
a big deal at all actually, programming-wise. I understand execution speed
will be poor but it shouldn't be any slower than having something else,
like PHP or Java, execute logic and query the database.
I'd like to gen
On Sun, 4 Mar 2001, xuyifeng wrote:
>
> - Original Message -
> From: The Hermit Hacker <[EMAIL PROTECTED]>
> To: Jaruwan Laongmal <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, March 02, 2001 8:04 PM
> Subject: Re: [HACKERS] why the DB file size does no
- Original Message -
From: The Hermit Hacker <[EMAIL PROTECTED]>
To: Jaruwan Laongmal <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 8:04 PM
Subject: Re: [HACKERS] why the DB file size does not reduce when 'delete'the data in
DB?
> On Fri
At 12:48 PM 3/2/2001 -0800, David Olbersen wrote:
>On Fri, 2 Mar 2001, Gerald Gutierrez wrote:
>
>->Recently I wanted to implement Dijkstra's algorithm as a stored procedure,
>->and finding that PL/PGSQL cannot return record sets, I thought about using
>->a temporary table for the results. If temp
Jacek Zagorski wrote:
>
> Is it possible to INSERT into xyz
> where xyz is a view ?
> What is the proper syntax ?
>
> Thanks Much
> Jacek Zagorski
You'll need to set up the rules for updating - PG can't figure out what
you want automatically. There's a page on this in the programmer's guide.
-
David Olbersen wrote:
>
> On Fri, 2 Mar 2001, Gerald Gutierrez wrote:
>
> ->Recently I wanted to implement Dijkstra's algorithm as a stored procedure,
> ->and finding that PL/PGSQL cannot return record sets, I thought about using
> ->a temporary table for the results. If tempoary tables are sess
You can use 'DBI'
from test.pl of DBD::Pg
# create large object from binary file
my ($ascii, $pgin);
foreach $ascii (0..255) {
$pgin .= chr($ascii);
};
my $PGIN = '/tmp/pgin';
open(PGIN, ">$PGIN") or die "can not open $PGIN";
print PGIN $pgin;
close PGIN;
# begin transaction
$dbh->{AutoCo
Blaise Carrupt wrote:
> Hi all !
>
> I use PostgreSQL 7.0.2 on a HP-UX system.
>
> I would like to create a simple function and a simple trigger (or rule) that
> deny a delete from a table if the row is referenced in another table.
>
> I though it should look like this (from my Ingres experience..