On 7/17/16 at 11:57 PM, Melvin Davidson melvin6925-at-yahoo.com wrote:

I'm pretty sure it would be more helpful if you provided:A. The
structure of the table(s) involved.B. The actual query you used to
retrieve the data.C. Did you run the query in PgAdmin Query Tool or
psql ? Melvin Davidson I reserve the right to fantasize.  Whether or
not you wish to share my fantasy is entirely up to you.
No need for fantasy, so nothing to share.

I thought I was providing a simple report of a display bug in a beta release product with sufficient evidence to prove there is a problem and nothing more. I am trusting such bug reports are welcome on this list. Otherwise please let me know where I should be posting.


While I'm not sure how additional information would be helpful, since no additional information changes the discrepancy between the data type and its display, I am answering the questions:

The pgAdmin 4 screen shot snippet showed the "amount" column as "numeric(12,3)" and the tabulated data below this header has only two decimal places.
    The pgAdmin 4 query:
    SELECT * FROM accounts.transactions
    WHERE transaction_ref=1506
    ORDER BY transaction_ref,transaction_line

The psql screen shot snippet showed the underlying data does have some non-zero digits in the third decimal place. ANd psql displays the data to thee decimal places as per data type definition.
    The psql query:
    SELECT * FROM accounts.transactions WHERE transaction_ref=1506;

The table definition:
    CREATE TABLE accounts.transactions
    (
        tax_code character(1) COLLATE "default".pg_catalog NOT NULL,
        transaction_ref integer NOT NULL,
        transaction_line integer NOT NULL,
account_item char_short_key COLLATE "default".pg_catalog NOT NULL,
        amount numeric(12, 3),
job char_short_key COLLATE "default".pg_catalog NOT NULL DEFAULT 0, transaction_memo text COLLATE "default".pg_catalog DEFAULT ''::text,
        alt_ledger character(6) COLLATE "default".pg_catalog,
CONSTRAINT transactions_pkey PRIMARY KEY (transaction_line, transaction_ref),
        CONSTRAINT transactions_account_item_fkey FOREIGN KEY (account_item)
REFERENCES accounts.account_items (account_item) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE RESTRICT,
        CONSTRAINT transactions_alt_ledger_fkey FOREIGN KEY (alt_ledger)
            REFERENCES accounts.ledgers (ledger) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE RESTRICT
            DEFERRABLE,
        CONSTRAINT transactions_job_fkey FOREIGN KEY (job)
            REFERENCES accounts.jobs (job) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE RESTRICT,
        CONSTRAINT transactions_ref_fkey FOREIGN KEY (transaction_ref)
REFERENCES accounts.transaction_refs (transaction_ref) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE NO ACTION
            DEFERRABLE INITIALLY DEFERRED,
        CONSTRAINT transactions_tax_code_fkey FOREIGN KEY (tax_code)
            REFERENCES accounts.taxcodes (tax_code) MATCH SIMPLE
            ON UPDATE CASCADE
            ON DELETE RESTRICT
    )
    WITH (
        OIDS = FALSE
    )
    TABLESPACE pg_default;


Regards
Gavan Schneider



--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Reply via email to