Insert do not work in my case

Ask a Question related to PostgreSQL / PGSQL, Design and Development.

  1. #1

    Default Re: Insert do not work in my case

    The easiest way to start is to turn on query logs for your server and
    see if it gets that far.

    If it does - copy the query into psql and run it manually - it will tell
    you if there's a problem.

    If it doesn't get that far, then that's another problem altogether...

    Regards,

    Chris Smith

    Suite 30, 45-51 Huntley St, Alexandria, NSW 2015 Australia

    Ph: +61 2 9517 2505
    Fx: +61 2 9517 1915

    email: [email]info@interspire.com[/email]
    web: [url]www.interspire.com[/url]


    Mickael Remond wrote:
    > Hello,
    >
    > I am running an application on Postgresql 8.0.0 rc1. The application is
    > running on JBoss 4.0.1RC2 and I am using the JDBC driver
    > pg80b1.308.jdbc3.jar.
    >
    > My problem is that insert that are sent to the database through a
    > prepared statement are not written in the database. The application is
    > doing a subsequent read and fail. A simple select from psql show that
    > the table is stil empty.
    > The log in debug level mode 3 are showing no particular problem. I
    > clearly see the prepared statement (Not complete but with question marks
    > instead of variable). I then see the select but the read is failing in
    > the application.
    >
    > I really do not see why this is happening. I suspect a configuration
    > problem but does not see what I should change.
    >
    > The application was working properly on PostgreSQL 7.2.
    >
    > Do you have any clue ?
    >

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.296 / Virus Database: 265.5.4 - Release Date: 12/15/2004


    ---------------------------(end of broadcast)---------------------------
    TIP 1: subscribe and unsubscribe commands go to [email]majordomo@postgresql.org[/email]

    Chris Smith Guest

  2. Similar Questions and Discussions

    1. Preserving case for insert object
      I've got an object in the insert bar that inserts some custom html tags that are, unfortunately, camel cased. E.g. they look like:...
    2. forcing upper case on insert of record
      I'm having trouble figuring out the code to force a form field to upper case when it is inserted into the database. This is what I have. What am I...
    3. #23026 [Com]: Make Zend case-sensitive (classes, functions, remove case-insensitive)
      ID: 23026 Comment by: nvivo at mandic dot com dot br Reported By: mfischer@php.net Status: Open Bug Type: ...
    4. DMX insert menu doesn't work !!
      When I click the insert menu I get this message: "c:\ProgramFiles\Macromedia\Dreamweaver...
    5. dvd jewel case insert......
      not a pro at ps but i am alright.... I am making dvd labels for my project and i can not get the correct width and height and spine of the dvd to...
  3. #2

    Default Insert do not work in my case

    Hello,

    I am running an application on Postgresql 8.0.0 rc1. The application is
    running on JBoss 4.0.1RC2 and I am using the JDBC driver
    pg80b1.308.jdbc3.jar.

    My problem is that insert that are sent to the database through a
    prepared statement are not written in the database. The application is
    doing a subsequent read and fail. A simple select from psql show that
    the table is stil empty.
    The log in debug level mode 3 are showing no particular problem. I
    clearly see the prepared statement (Not complete but with question marks
    instead of variable). I then see the select but the read is failing in
    the application.

    I really do not see why this is happening. I suspect a configuration
    problem but does not see what I should change.

    The application was working properly on PostgreSQL 7.2.

    Do you have any clue ?

    --
    Mickaël Rémond
    [url]http://www.erlang-projects.org/[/url]

    ---------------------------(end of broadcast)---------------------------
    TIP 8: explain analyze is your friend

    Mickael Remond Guest

  4. #3

    Default Re: Insert do not work in my case

    Chris Smith wrote:
    > The easiest way to start is to turn on query logs for your server and
    > see if it gets that far.
    When turning on query logs in Postgresql, I only get the content of the
    prepared statement without the parameters (question mark). I there a way
    to expand what is executed by the server ?

    Programmatically, I am printing out the prepared statement and the
    parameters seperatly. I already tried to do the insert manually and it
    works.

    However, I do not see what could be the problem. PostgreSQL is not
    showing any error. I thought it could be a problem with prepared
    statement and the jdbc driver or it could have something to do with a
    change in the postgreSQL default parameters.

    Any other idea ?

    --
    Mickaël Rémond
    [url]http://www.erlang-projects.org/[/url]

    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    Mickael Remond Guest

  5. #4

    Default Re: Insert do not work in my case

    Mickael Remond wrote:
    > Chris Smith wrote:
    >
    >> The easiest way to start is to turn on query logs for your server and
    >> see if it gets that far.
    >
    >
    > When turning on query logs in Postgresql, I only get the content of the
    > prepared statement without the parameters (question mark). I there a way
    > to expand what is executed by the server ?
    Are you sure this isn't being logged when the query is prepared, rather
    than when it is executed?
    > Programmatically, I am printing out the prepared statement and the
    > parameters seperatly. I already tried to do the insert manually and it
    > works.
    >
    > However, I do not see what could be the problem. PostgreSQL is not
    > showing any error. I thought it could be a problem with prepared
    > statement and the jdbc driver or it could have something to do with a
    > change in the postgreSQL default parameters.
    If the logs are not showing the INSERT occurring, nor an error, then I
    would guess the INSERT is not happening at all. Look at the exact point
    in your code where the prepared statement gets executed, for some reason
    it doesn't appear to be called. Put a "SELECT 1;" either side of the
    execute and just check.

    --
    Richard Huxton
    Archonet Ltd

    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    Richard Huxton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139