pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #12257: Cause for: Exception 0xC0000005
2+ messages / 2 participants
[nested] [flat]
* BUG #12257: Cause for: Exception 0xC0000005
@ 2014-12-17 11:34 chrisgoldstar@wp.pl
2014-12-17 16:21 ` Re: BUG #12257: Cause for: Exception 0xC0000005 David G Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: chrisgoldstar@wp.pl @ 2014-12-17 11:34 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 12257
Logged by: Chris Goldstar
Email address: chrisgoldstar@wp.pl
PostgreSQL version: 9.3.5
Operating system: Windows 7 64-bit Professional
Description:
My configuration
================
System: Windows 7 64-bit Professional
DB engine: Postgres 9.3.5 64-bit
Extension: oracle_fdw 1.1
I have the following foreign table (on Oracle),
create foreign table pds_pojazd
(pm bigint not null,
dv bigint not null,
av bigint not null,
pr bigint not null,
op character varying(30) not null,
wr timestamp without time zone not null,
vf timestamp without time zone not null,
vt timestamp without time zone not null,
st_numer character varying(2000) ,
st_rodzaj character varying(2000) ,
st_marka character varying(2000) ,
st_ubezp character varying(2000) ,
fk_kierpm bigint ,
st_wynik character varying(2000)
)
server pds_oracle
OPTIONS (schema 'PDS_PRD', table 'DEF_POJAZD');
alter foreign table pds_pojazd
owner to postgres;
I have written one function (for test only) as below,
CREATE OR REPLACE FUNCTION pds_vehicle(vehicle_pm bigint, vehicle_number
character varying)
RETURNS integer AS
$BODY$
declare
v_pm bigint;
begin
-- skip function parameters
select pm into v_pm from pds_pojazd where st_numer = 'RZ8193A' and pm =
av limit 1;
return v_pm;
end
$BODY$
LANGUAGE plpgsql volatile
COST 100;
ALTER FUNCTION pds_vehicle(bigint, character varying)
OWNER TO postgres;
Calling...
select pds_vehicle(1015627, 'RZ8193A'); -- call one or more times (more than
10)
Everything works fine.
but the following stops the postgres service!
CREATE OR REPLACE FUNCTION pds_vehicle(vehicle_pm bigint, vehicle_number
character varying)
RETURNS integer AS
$BODY$
declare
v_pm bigint;
begin
-- use first parameter
select pm into v_pm from pds_pojazd where st_numer = 'RZ8193A' and pm =
vehicle_pm limit 1;
return v_pm;
end
$BODY$
LANGUAGE plpgsql volatile
COST 100;
ALTER FUNCTION pds_vehicle(bigint, character varying)
OWNER TO postgres;
or
CREATE OR REPLACE FUNCTION pds_vehicle(vehicle_pm bigint, vehicle_number
character varying)
RETURNS integer AS
$BODY$
declare
v_pm bigint;
begin
-- use second parameter
select pm into v_pm from pds_pojazd where st_numer = 'RZ8193A' and pm =
vehicle_pm limit 1;
return v_pm;
end
$BODY$
LANGUAGE plpgsql volatile
COST 100;
ALTER FUNCTION pds_vehicle(bigint, character varying)
OWNER TO postgres;
or
CREATE OR REPLACE FUNCTION pds_vehicle(vehicle_pm bigint, vehicle_number
character varying)
RETURNS integer AS
$BODY$
declare
v_pm bigint;
begin
-- use both parameters
select pm into v_pm from pds_pojazd where st_numer = vehicle_number and
pm = av limit 1;
return v_pm;
end
$BODY$
LANGUAGE plpgsql volatile
COST 100;
ALTER FUNCTION pds_vehicle(bigint, character varying)
OWNER TO postgres;
or
CREATE OR REPLACE FUNCTION pds_vehicle(vehicle_pm bigint, vehicle_number
character varying)
RETURNS integer AS
$BODY$
declare
v_pm bigint;
begin
select pm into v_pm from pds_pojazd where st_numer = vehicle_number and
pm = vehicle_pm limit 1;
return v_pm;
end
$BODY$
LANGUAGE plpgsql volatile
COST 100;
ALTER FUNCTION pds_vehicle(bigint, character varying)
OWNER TO postgres;
Calling...
select pds_vehicle(1015627, 'RZ8193A'); -- call one, two, three, four and
five times works fine
but next call stops the postgres service.
After six call the postgres shows message 'connection to database your_db
lost' and error message in log is like that
Server process (PID xxxx) was terminated by exception 0xC0000005
see C include file "ntstatus.h" for a description of the hexadecimal value.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #12257: Cause for: Exception 0xC0000005
2014-12-17 11:34 BUG #12257: Cause for: Exception 0xC0000005 chrisgoldstar@wp.pl
@ 2014-12-17 16:21 ` David G Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G Johnston @ 2014-12-17 16:21 UTC (permalink / raw)
To: pgsql-bugs
chrisgoldstar wrote
> The following bug has been logged on the website:
>
> Bug reference: 12257
> Logged by: Chris Goldstar
> Email address:
> chrisgoldstar@
> PostgreSQL version: 9.3.5
> Operating system: Windows 7 64-bit Professional
> Description:
>
> My configuration
> ================
> System: Windows 7 64-bit Professional
> DB engine: Postgres 9.3.5 64-bit
> Extension: oracle_fdw 1.1
Oracle_fdw is not supported via the main PostgreSQL mailing lists.
See instead:
http://pgxn.org/dist/oracle_fdw/
> Calling...
> select pds_vehicle(1015627, 'RZ8193A'); -- call one, two, three, four and
> five times works fine
> but next call stops the postgres service.
> After six call the postgres shows message 'connection to database your_db
> lost' and error message in log is like that
>
> Server process (PID xxxx) was terminated by exception 0xC0000005
> see C include file "ntstatus.h" for a description of the hexadecimal
> value.
5 is a magic number relating to planning and switching between specific
plans and generic ones.
David J.
--
View this message in context: http://postgresql.nabble.com/BUG-12257-Cause-for-Exception-0xC0000005-tp5831137p5831142.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2014-12-17 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-12-17 11:34 BUG #12257: Cause for: Exception 0xC0000005 chrisgoldstar@wp.pl
2014-12-17 16:21 ` David G Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox