Giter VIP home page Giter VIP logo

Comments (17)

okbob avatar okbob commented on July 29, 2024

from orafce.

kamfasage avatar kamfasage commented on July 29, 2024

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
$BODY$
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;
$BODY$
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.

kamfasage avatar kamfasage commented on July 29, 2024

the server craches by the moment i use
' utl_file.GET_LINE ' function
i don't really why..
please help

from orafce.

okbob avatar okbob commented on July 29, 2024

from orafce.

kamfasage avatar kamfasage commented on July 29, 2024

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.

kamfasage avatar kamfasage commented on July 29, 2024

Best regards

from orafce.

okbob avatar okbob commented on July 29, 2024

from orafce.

kamfasage avatar kamfasage commented on July 29, 2024

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.

okbob avatar okbob commented on July 29, 2024

from orafce.

kamfasage avatar kamfasage commented on July 29, 2024

there is just fopen functions that work and fclose the other 's make my server crashes

from orafce.

okbob avatar okbob commented on July 29, 2024

from orafce.

kamfasage avatar kamfasage commented on July 29, 2024

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.

kamfasage avatar kamfasage commented on July 29, 2024

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.

okbob avatar okbob commented on July 29, 2024

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.

okbob avatar okbob commented on July 29, 2024

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.

okbob avatar okbob commented on July 29, 2024

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.

okbob avatar okbob commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.