0

In PostgreSQL when I call NUMERIC(10,2) to define a variable type. Which part of the PostgreSQL C code is handling it?

I am interested in knowing where the precision and scale are handled.

1 Answer 1

2

Lots of parts.

The lexer and parser transforms it into a type name and type modifier.

The system catalogs and syscache look up numeric to find the matching type oid.

The numeric.c code handles the actual type input/output and operators, and interprets the type modifier.

The index access methods and index operator classes handle selection of operators for comparisons etc.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.