Comments (17)
from orafce.
hi, my apologies for not answering earlier.. i wasn't doing fine (i was sick) :)
`CREATE OR REPLACE FUNCTION gen_file(
mydir text,
infile text,
outfile text,
copyfile text)
RETURNS void AS
DECLARE
v1 VARCHAR(32767);
inf UTL_FILE.FILE_TYPE;
otf UTL_FILE.FILE_TYPE;
BEGIN
inf := UTL_FILE.FOPEN(mydir, infile,'r',256);
otf := UTL_FILE.FOPEN(mydir, outfile,'w');
v1 := UTL_FILE.GET_LINE(inf,256);
PERFORM UTL_FILE.PUT_LINE(otf,v1,TRUE);
v1 := UTL_FILE.GET_LINE(inf,256);
PERFORM UTL_FILE.PUTF(otf,'%s\n',v1);
v1 := UTL_FILE.GET_LINE(inf, 256);
PERFORM UTL_FILE.PUT(otf,v1);
PERFORM UTL_FILE.NEW_LINE(otf);
PERFORM UTL_FILE.FFLUSH(otf);
inf := UTL_FILE.FCLOSE(inf);
otf := UTL_FILE.FCLOSE(otf);
PERFORM UTL_FILE.FCOPY(mydir, outfile, mydir, copyfile, 2, 3);
PERFORM UTL_FILE.FRENAME(mydir, outfile, mydir, 'rename.txt');
END;
LANGUAGE plpgsql VOLATILE
COST 100;`
so when i do a
SELECT gen_file('c:/symfo', 'input.txt', 'output.txt', 'copyfile.txt');
my server (pgadmin)(in loclahost) disconnect
from orafce.
the server craches by the moment i use
' utl_file.GET_LINE ' function
i don't really why..
please help
from orafce.
from orafce.
Thanks for your answer..
For a) i have made sure the target dictionary is registered because i could use fopen without any path error..
B) the target is accessible by the user postgres i think (how do i check this)
What do you mean by backtrace ?
from orafce.
Best regards
from orafce.
from orafce.
hi
may be it's the way i install orafce into windows..
can you please explain to me how to do it?
so i can compare with what i did..
because i did this method from the net
[(https://groups.google.com/forum/#!topic/orafce-general/tUEPnrECO1E`))]
from orafce.
from orafce.
there is just fopen functions that work and fclose the other 's make my server crashes
from orafce.
from orafce.
i have this on my systeme log
Nom de l’application défaillante pgAdmin3.exe, version : 1.22.1.1, horodatage : 0x57316441
Nom du module défaillant : MSVCR120.dll, version : 12.0.21005.1, horodatage : 0x524f83ff
Code d’exception : 0xc0000417
Décalage d’erreur : 0x000000000006dd3d
ID du processus défaillant : 0xeb0
Heure de début de l’application défaillante : 0x01d26a60f3f656b5
Chemin d’accès de l’application défaillante : C:\apps\POSTGRESQL\PostgreSQL9.5\bin\pgAdmin3.exe
Chemin d’accès du module défaillant: C:\windows\system32\MSVCR120.dll
ID de rapport : 1f842515-d655-11e6-b4c7-24be051202b5
from orafce.
for more detail
Provider
[ Name] Application Error
- EventID 1000
[ Qualifiers] 0
Level 2
Task 100
Keywords 0x80000000000000
- TimeCreated
[ SystemTime] 2017-01-09T10:19:38.000000000Z
EventRecordID 190701
Channel Application
Computer XXXXXXXXXX
Security
-
EventData
pgAdmin3.exe
1.22.1.1
57316441
MSVCR120.dll
12.0.21005.1
524f83ff
c0000417
000000000006dd3d
eb0
01d26a60f3f656b5
C:\apps\POSTGRESQL\PostgreSQL9.5\bin\pgAdmin3.exe
C:\windows\system32\MSVCR120.dll
1f842515-d655-11e6-b4c7-24be051202b5
from orafce.
Maybe I am able to reproduce it on MSWindows. Unfortunately have no idea how to fix it. Microsoft API returns broken data - have not a idea why.
from orafce.
Looks like some hard issue between PostgreSQL implementation and basic MSVS function implementation. I am not able do fopen/fclose call without a exception when I call these functions from PostgreSQL extension dll.
from orafce.
I am able to fix a exception by using _xxx_nolock functions, but it still doesn't work - because opened file is very immediately closed without my request, and any other operations fails. Now I have plan to block this functionality on win 32 platform, where it is doesn't work.
from orafce.
Hi
I didn't find a reason why dis function doesn't work on MS Windows. Probably it is related to some security, maybe some other. Unfortunately, then there is only one solution. I disabled this function on MS Windows platform :(
from orafce.
Related Issues (20)
- how to update the extension if an old update script file changed HOT 1
- remainder function is not fully compatible with oracle HOT 2
- dbms_random output variation on big-endian s390x HOT 3
- Fail test dbms_random on windows after commit 1a0d336 HOT 1
- Problems related to storing Chinese characters in varchar2! HOT 2
- failed upgrade from 4.5.0 to 4.6.0 HOT 3
- Bogus inputs to remainder() causes crash
- oracle.substr should return null when the 3rd argument is 0 HOT 2
- Regression test for to_char(string) failed? HOT 3
- orafce build error on Postgres 16 on AlmaLinux HOT 5
- Unable to drop extension orafce HOT 1
- Some ERRORS about regexp_funtion HOT 7
- dbms_sql.debug_cursor causes Segmentation fault HOT 3
- Consider supporting DEFAULT XX ON CONVERSION ERROR syntax? HOT 2
- dbms_random.string Enhancement HOT 2
- segmentation fault in dbms_sql.dbms_sql_execute HOT 19
- Segmentation fault on dbms_sql.column_value with null value HOT 2
- Unable to compile orafce 3.15.0 or 3.18.1 on both PostgreSQL 11 and 16.2 HOT 6
- Execute UTL_FILE.FCLOSE after executing UTL_FILE.FCLOSE, the application crashes. HOT 4
- UTL_FILE File Protection HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orafce.