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

  1. #1

    Default Numeric type

    Hi All,
    I have a double type in java that I am trying to store in postgresql as
    type numeric and it doesn't seem to like it. The error message is,
    function double(numeric) does not exist
    unable to identify a function that satisfies the given argument type
    you may need to add explicit type casts.

    If I just want to store the number as 'xx.xx', is 'numeric' the right
    postgresql type?
    thanks,
    Phil


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

    phil campaigne Guest

  2. Similar Questions and Discussions

    1. #39056 [NEW]: Interbase NUMERIC data type error
      From: ddi at elecom dot ru Operating system: All PHP version: 5.1.6 PHP Bug Type: InterBase related Bug description: ...
    2. Sending Numeric Type Variable From DataGrid toColdFusion
      Hi All: I am trying to send a selected item from a numeric type back to the database. I use datagrid.selectedItem.numericvarname to select the...
    3. ldap DirectoryServices.DirectoryEntry System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb).
      hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i...
    4. Type Mismatch When Set VB Com Property to Request Form Numeric Var
      Hi, We are moving existing, production ASP 2 and VB6 code from NT4/IIS4 to Windows 2003/IIS6. We get a Type Mismatch error when we try to assign a...
    5. Problem with character palette and Tracking field: can't type zero after type is modified
      System: Illustrator CS, Panther 10.3.3 Try this: Create a few characters of type. Select some letters and change their tracking (Option + Command...
  3. #2

    Default Re: Numeric type


    On 27/01/2005 01:06 phil campaigne wrote:
    > Hi All,
    > I have a double type in java that I am trying to store in postgresql as
    > type numeric and it doesn't seem to like it. The error message is,
    > function double(numeric) does not exist
    > unable to identify a function that satisfies the given argument type
    > you may need to add explicit type casts.
    use getBigDecimal()/setBigDecimal()
    >
    > If I just want to store the number as 'xx.xx', is 'numeric' the right
    > postgresql type?
    It depends a lot on your precision requirements and whether or not small
    rounding errors matter in your application. For an accounting application,
    I would recommend using numeric and using BigDecimal in your Java code. If
    small rounding errors don't matter the you'll find using double precision
    (int8) in the databse and double in your Java code somewhat easier.

    HTH

    --
    Paul Thomas
    +------------------------------+-------------------------------------------+
    | Thomas Micro Systems Limited | Software Solutions for Business |
    | Computer Consultants | [url]http://www.thomas-micro-systems-ltd.co.uk[/url] |
    +------------------------------+-------------------------------------------+

    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?

    [url]http://www.postgresql.org/docs/faq[/url]

    Paul Thomas 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