>
> I have some instead of triggers in Oracle, some update instead of triggers
> and some insert instead of triggers. I was thinking that I could maybe use
> instead of rules in PostgreSQL to get the same effect. I converted the
> instead of trigger in Oracle into a PostgreSQL function below:
>
Hi Christoph,
Thanks for the links but the techdoc links for converting from Oracle to
PostgreSQL has 2 links that don't go to their intended targets anymore, one
is in the 7.3 docs which is really limited (only covers simple things), and
the Ora2Pg one I don't really get that well.
As far as u
I want to convert an interval (from substraction between two timestamps) into
a integer that represents how many seconds that interval has. How do I do
that?
I am using postgresql 7.3.1
Thanks
Wei
---(end of broadcast)---
TIP 5: Have you chec
I have a test I need to do in my trigger function to see if a standard set
of shipmentcharges exists, if not I insert two rows.
IF (SELECT COUNT(orderchargeid) FROM ordercharges WHERE
orderid=NEW.orderid OR orderid=OLD.orderid)=0 THEN
I added the "OR orderid=OLD.orderid" expression to handle th
Dnia 2003-12-04 19:09, Użytkownik Wei Weng napisał:
I want to convert an interval (from substraction between two timestamps) into
a integer that represents how many seconds that interval has. How do I do
that?
select extract(epoch from your_interval);
Regards,
Tomasz Myrta
-
Dnia 2003-12-04 19:18, Użytkownik Jeff Kowalczyk napisał:
When this trigger runs on INSERT operations, the OLD variable is not
yet set, and the trigger function returns an error.
Can anyone suggest a more sensible way to check for OLD before including
it in my expression, or another shortcut? Thank
Tomasz Myrta wrote:
> You can always check whether your trigger has been fired as insert or
> update trigger.
> DECLARE old_orderid integer;
> BEGIN
>if TG_OP=''UPDATE'' then
> old_orderid=OLD.orderid;
>else
> old_orderid=-1;
>end if;
Thank you, that works well enough. I'
Hi,
How can i use a user-defined type in ECPG code ?
For example:
I have the following stored-procedure:
CREATE FUNCTION teste(MY_TYPE) RETURNS boolean;
where MY_TYPE is:
CREATE TYPE MY_TYPE AS (id_person INT8, id_book INT8);
Now, i am having problem with:
EXEC SQL SELECT teste(:asd);
--
I'm on PHP 4.2.2 and RedHat 9 with PGSQL. I want to turn quoted
identifiers off with my SQL queries. What SQL statement or .CONF
setting do I need to change so that I can turn quoted identifiers off?
Quoted identifiers, as I understand them, are where you must put
double quotes around any table or
hi,
SELECT isfinite(timestamp '123.45.2003'); if this is true, the date is
ok, if error, than not :)
C.
Alexander M. Pravking wrote:
I just discovered that to_date() function does not check if supplied
date is correct, giving surprising (at least for me) results:
fduch=# SELECT to_date('31.11.
hi,
zerobearing2 wrote:
Hi all-
I'm migrating to postgres from the MS SQL Server land, as I can see
a great potential with postgres, I was wondering if anyone has
experimented or started a project with XML inside user defined
functions?
I've seen the contrib/xml shipped with the distro, as I see
Hi all, new to postgresql and I have a question about how to lay out my
database.
I have a database with 4 main tables, organizations, contacts, events,
grants. My thinking here is that organizations can have contacts, sponsor
events,
and sponsor grants, so it is what I would call
the main table.
On Thursday 04 December 2003 19:42, Google Mike wrote:
> I'm on PHP 4.2.2 and RedHat 9 with PGSQL. I want to turn quoted
> identifiers off with my SQL queries. What SQL statement or .CONF
> setting do I need to change so that I can turn quoted identifiers off?
Short answer - you don't. Your unders
Google Mike writes:
> I'm on PHP 4.2.2 and RedHat 9 with PGSQL. I want to turn quoted
> identifiers off with my SQL queries. What SQL statement or .CONF
> setting do I need to change so that I can turn quoted identifiers off?
There is no setting for that.
> For that matter, how do I turn case-se
On Tue, 02 Dec 2003, Taylor Lewick wrote:
> Hi all, new to postgresql and I have a question about how to lay out my
> database.
>
> I have a database with 4 main tables, organizations, contacts, events,
> grants. My thinking here is that organizations can have contacts, sponsor
> events,
> and sp
15 matches
Mail list logo