Menu

#1 pgsql 7.3.x patch

open
nobody
None
5
2003-09-02
2003-09-02
No

releases r0.1 and r0.2 are designed for postgresql 7.2.x
(7.2.3 to be sure):

you need to apply this (temporary) patch for pgsql
7.3.x, due to some differences in type casting

Discussion

  • Giuseppe D'Ambrosio

    patch1 for pgsql 7.3.x

     
  • P. Lui

    P. Lui - 2003-09-09

    Logged In: YES
    user_id=860987

    Dear boltthrower,

    I am now using the psql 7.3.1, windows exe version. First, I
    simply import the database from r0.2 and then execute the
    patch sql file. In addition, the web server runs properly. While
    I try to login at the login.php. There is a database error. I get
    the error from the db server. It shows "vw_accesso_utenti",
    this relation doesn't exist. This is the bug I have found after
    running the patch.

    Best regards,

    P

     
  • Giuseppe D'Ambrosio

    Logged In: YES
    user_id=724580

    hello P,
    vw_accesso_utenti is a db view, you should be able to
    recompile it from the export file or from the following sql
    script:

    drop view vw_accesso_utenti;
    create view vw_accesso_utenti as
    select u.*,
    p.password,
    decode(p.lingua,2,'INGLESE','ITALIANO') as lingua,
    s.scod as stile,
    s.cod as stile_cod,
    s.colore,
    s.colore2,
    s.img_menu,
    p.fl_trace,
    p.col_vis
    from
    (select utente,
    max(accesso) as accesso
    from bs_utenti group by utente ) u,
    bs_utenti_pwd p,
    vw_stili s
    where p.utente = u.utente
    and p.stile = s.cod;

    ....then you should be able to run this query without any error:

    select * from vw_accesso_utenti limit 1;

     
  • P. Lui

    P. Lui - 2003-09-10

    Logged In: YES
    user_id=860987

    Dear Giuseppe,

    Sorry for the disturbance again. Since I don't know much
    about the sql syntax. I am just a newbie of it.

    After examining the code you sent, I find that the "varchar"
    function is missing in this version for pgsql 7.3, isn't it?
    However, there are about 300 times existed in the bspg-
    export.txt. Do I have to delete them all? If so, it is too time
    consuming. Thus, my boss had added a function,

    CREATE FUNCTION "varchar" (integer) returns character
    varying as 'begin return $1; end;' language 'plpgsql';

    I believe it is not correct at all since there are still errors
    while importing the file. In addition, I want to ask you the
    database importing procedure. At the beginning, I simply
    import it by typing command,

    \i /home/../../../bspg-export

    When this step is finished, I will run the patch file afterwards.
    Is it correct?

    Looking forward to your reply. Hope you can help me to fix
    this problem. I have spent many days on it, but still failed. By
    the way, thank you for your preceding reply.

    Best regards,

    P

     
  • Giuseppe D'Ambrosio

    Logged In: YES
    user_id=724580

    ..don't mind to ask!
    "varchar" is not a function, but a data type: you can see it
    from psql, with:

    \dT varchar

    while \i is good for importing, with the patch afterwards..
    Can you provide me with the import log file?
    maybe I can help more effectively..

    bye,
    G.

     
  • P. Lui

    P. Lui - 2003-09-11

    Logged In: YES
    user_id=860987

    Dear Giuseppe,

    Wanna to say thank you again. I have tried to find the
    technical document how to get the log file for the importing.
    However, I can't find it. Would you tell me how to make the
    log for it?

    Best regards,

    P

     
  • Giuseppe D'Ambrosio

    Logged In: YES
    user_id=724580

    I don't know if there's a specific way to get the log,
    I'd say, just run:
    psql balance_test < export.txt
    and copy the output from the command line..

    bye,
    G

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.