Hello,
I need a trigger which is updating a delete flag of a row instead of
deleting it physically.
How do I implement a trigger which doesn't execute a delete without raising
an exception
in plsql ?
CREATE TRIGGER trigger1 BEFORE DELETE ON table1
FOR EACH ROW EXECUTE PROCEDURE setDeleteFlag ();
Hello,
is the inheritance of tables specified in the SQL99 standard,
or is this a postgresql "add-on" ?
Does anybody know when the primary key bug, which is
documented in the docs, of this feature will be fixed ?
Thx
berger
---(end of broadcast)-
Hello,
is it possible to change the locale sorting order in statements ?
I need this for a multilingual web application, where I'm not
able to set the locale in the session or elsewhere.
In Oracle I would use something like that :
SELECT * FROM table1
ORDER BY NLSSORT(column1, 'NLS_SORT=FRENCH');
Hello,
I have a statement like this :
INSERT INTO tab1 (c1, c2, c3) VALUES (1,2, SELECT MAX(pos)+1 FROM tab2);
This works fine if the subselect returns a value, but if it returns
null there is a problem. In this case a 0 has to be inserted.
Is there any pg function which solves this problem ?
I
but how do I know that "distinct on" doesn't cut off
the row with max(val2) of that id that I need ?
> see the yesterday's thread about DISTINCT ON (non-standard Postgres
feature)
>
> > I have a problem, which I'm not able to solve with a simple query :
> >
> > I need a resultset with distinct i
Hello,
I have a problem, which I'm not able to solve with a simple query :
I need a resultset with distinct id's, but the max val2 of each id.
I tried to group by id, but though I need the pk in my resultset
I have to group it too, which "destroys" the group of val2.
Can this be done without a h