Hello!
i have a lots of threads that work on a table, making insertions,
updates removes.
now i certain cases its important to keep data integrity, so i looked
into locks
all i found was a lock function that locks the entire table
now even in shared mode, if i understand it well th
Hello!
just trying to write an upgrade script for my bookkeeping system and
noticed that it seems that i can't throw out the legacy stuff
accumulated over time
as far as i can tell, i can add columns to a table, but can't remove
them later on.
is this true? any easy way to circumv
Hello!
how can i change the ownership of a table? i have the problem that i
create table with CONSTRAINTS on other tables, those others have a
different owner... and thus the creation of the table is refused
is it possible to make constraints on tables whithout having their
ownership? is it
hello!
since i am now destroying and recreating my functions at every request
(due to the fact that pl/psql can't cope with dynamic table names, and i
didn't found anywhere a decent doc about pl/perl) i have now the
problem, that a psql error is displayed if i try to drop a nonexistent
function,
hello!
i have the following function:
CREATE FUNCTION plusSum(text,int4) RETURNS int4 AS '
DECLARE
jrlname ALIAS FOR $1;
sumup ALIAS FOR $2;
actsum int4;
arow RECORD;
conversion float8;
temp float8;
sum float8;
BEGIN
sum := 0;
RAISE NOTICE ''stats % '', sumup;
FOR arow IN
Hello
a problem i am encountering quite frequently lately.
for some reason my databases are registered under several users and
making a pg_dump gives me the following error:
getDatabase(): SELECT failed. Explanation from backend: 'ERROR: More
than one tuple returned by a subselect used as
hello,
i have the following problem:
i have in php an array structure with user-prefs that have to be stored
onto DB
actually i look up if the corresponding entry exists (comparing
user-name and field-name) if yes i update, if no i insert
this isn't very appealing, but i couldn't find a
Hello,
in old days i was used to open the connection to my DB at the begin of
the script, make lots of stuff inside the script and eventually close
the connection at the end (even if php is supposed to do it for me...).
This stopped to work
now each time i make a call to the DB i connect, ma
hello,
now that i finally managed to write some functions and triggers in perl,
i get the following error:
insert into journal (plus,minus,description,currency,amount) VALUES
(101,420,'a test','EUR','1.000.000');
ERROR: pg_atoi: error in "1.000.000": can't parse ".000.000"
normal since the
On Wed, Dec 06, 2000 at 05:52:13PM +0100, Bruno Boettcher wrote:
> $work =~s/\.//g;
ehm yeah stupid me... think i even read it somewhere in the docu
should be $work =~ s/\\.//g;
:(
at least it works now...
--
ciao bboett
==
[EM
On Wed, Dec 06, 2000 at 10:54:58AM -0500, Tom Lane wrote:
> I'm confused too...
:D
> I don't see why print wouldn't work. Realize however that it will
> go to the postmaster's stdout, so you'd better not have started the
yep found it in the log
> Also, it looks like plperl supports elog(NOT
Hello,
i am still at the same stage thanks to Oliver Elphick the plperl
module is working, as a stand alone per program the thing works (sole
difference, i use $toparse = shift; instead of the $toparse = $_[0];
in the sql-function
here's the thing:
CREATE FUNCTION cleanFromSep(text,tex
hello,
played a bit around with the serial type
wanted to adapt my already existing tables to this system...
dumped the DB, created the new tables, loaded old data in
all works, until i try to insert something without specifying the id
field (that's the now sequential field). And the reas
hello,
i have a nice command to create a db 'createdb', but hows when you want
to get rid of a DB?? searched for a removedb script
Took me some time to read through the
man page, find out how the command actually works, look up the SQL
commands and find out that there's also a DROP DATABASE
Hello,
subject says it all, wanted to give plperl a try, but the lib doesn't
seem installed... now i installed all through debian packaging system,
and the lib surely is somewhere, but i didn't found it yet...
so i anybody could point on on where to search for it...
--
ciao bboett
=
On Mon, Nov 20, 2000 at 06:06:52PM +0100, Kovacs Zoltan Sandor wrote:
> > FOR arow IN SELECT currency,amount FROM journal WHERE col=sumup LOOP
> My opinion is the problem that you cannot give a column name as a
> parameter. But I'm not sure. This never worked for me. The thing here
:( can somebo
Hello,
once more, i ran into a problem
i got no syntax error, i don't know how to debug, except for raising
exceptions the loop never executes making the select call by hand
with fixed values, returns a result... but the second raise is never passed
with the function...so something
Hello,
me again :(
i just ran into another problem
didn't found it neither in the doc nor in the FAQ.
the currencies conversion factors i use are stored as float4 in a table,
the values to apply on are stores as int4
is the type casting done automaticly? how? can i have an influenc
yeah forgot another thing
i want also to write a SQL trigger to parse incoming fields for
preprocessing before DB insertion
in perl i would do a thing like that:
$format = ".999.999,99"; #took out of DB...
#inserting a number into the db
$theval =~ s/\.//g;
if($theval =~/\S+,\d{2
hello,
the thing i am making is a bookkepping program. This program handles
multiple currencies, each currency is formatted a bit differently on
from the other.
I do store the amounts as int's in the DB...
In another table i have sample format strings that could be used to
format them...
but if
hello,
again fiddling around with SQL...
wanted to loop over the Base search for Strings beginning with a
sequence and replace that sequence with another one.
tryed the following:
update journal set description='Add '||(select id description from
journal subq where subq.description like '%PS
hello,
i am a beginner at SQL and PL/pgsql and thus have some surely
already known problems...
i have set up some tables, and wanted to play around with inbuild
functions, and set up the following function:
CREATE FUNCTION balance (int4) RETURNS int4 AS '
DECLARE
compte ALIAS FOR
22 matches
Mail list logo