>
> i made desperate efforts with handling errors in a function.
>
> I am using functions for encapsulating a few sql-statements. Please
have a
> look at this:
>
> CREATE FUNCTION sp_fdelce(int4) RETURNS int4 AS '
> DECLARE
> id ALIAS FOR $1;
> BEGIN
>DELETE FROM f_ces WHERE fce_id = id;
>
Peter Gabriel wrote:
When executing this and violating that constraint (i mustn't delete that
row), the function aborts with "unknown error" and i have no way to
return 0 or
something like that.
I am programming with PHP and PEAR, each time, the result set is an object
of type error, the scrip
>
> I am able to find couple
> of examples for dynamic sql programming through ecpg. But i want to
> do dynamic sql programming through libpq.
> If anyone has programs doing the dynamic sql programmming using the
> libpq libraries please mail to me.
>
Attached you'll find my encapsulated library of
Ludwig Lim wrote:
Try changing the "AFTER" to "BEFORE"
CREATE TRIGGER projtask_insert_depend_trig BEFORE...
Changes made to the "NEW" will not be reflect in the
AFTER trigger since, the row is already inserted.
Thanks, however this seems to present a different problem now.
FOR depe
HI...
When i executed a query using PQexec..It returned error.
Is there any way to check this error is because of Database is down.
like
PGRES_EMPTY_QUERY -- The string sent to the backend was empty.
PGRES_COMMAND_OK -- Successful completion of a command returning no
da
Tim,
> That loop apparently does not find any matching rows, which would
> have been inserted just before this row was, inside the same
> transaction.
>
> It was successfully finding those rows before, when the trigger was
> AFTER INSERT. If I manually select those rows after the query is
> commi
Hi folks,
how do I define a referene from 2 columns in 1 table to 2 columns in another.
I have:
create table ranks (
rid int4 default nextval('ranks_rid_seq'::text) unique not null,
rdidcharacter references depts(did), -- department
rrank int4 not null,
Hello again
Gary Stainburn wrote:
Hi folks,
how do I define a referene from 2 columns in 1 table to 2 columns in
another.
I have:
create table ranks (
rid int4 default nextval('ranks_rid_seq'::text) unique not null,
rdid character references depts(did), -- department
rrank int4 not nu
Josh Berkus wrote:
Tim,
That loop apparently does not find any matching rows, which would
have been inserted just before this row was, inside the same
transaction.
It was successfully finding those rows before, when the trigger was
AFTER INSERT. If I manually select those rows after the query
Hi Tomasz,
On Wednesday 18 December 2002 4:46 pm, Tomasz Myrta wrote:
> Hello again
>
> Gary Stainburn wrote:
> > Hi folks,
> >
> > how do I define a referene from 2 columns in 1 table to 2 columns in
> > another.
> >
> > I have:
> >
> > create table ranks (
> > rid int4 default nextval('r
unsubscribe
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
On Wednesday 18 December 2002 4:56 pm, Gary Stainburn wrote:
> Hi Tomasz,
[snip]
> > > create table jobtypes (
> > > jid int4 default nextval('jobs_jid_seq'::text) unique not null,
> > > jdid character references ranks(rdid), -- This joint reference
> > > jrank
Gary Stainburn <[EMAIL PROTECTED]> writes:
> I've just tried this on a 7.2.1-5 system and get the same error.
>> create table jobtypes (
>> jid int4 default nextval('jobs_jid_seq'::text) unique not null,
>> jdid character, -- This joint reference
>> jrank
Tom Lane wrote:
Gary Stainburn writes:
>I've just tried this on a 7.2.1-5 system and get the same error.
>>create table jobtypes (
>>jid int4 default nextval('jobs_jid_seq'::text) unique not null,
>>jdid character, -- This joint reference
>>jrank int4 not null references ranks(rrank),
14 matches
Mail list logo