Go To View:  CLOSE Metadata REPORTS WINDOW

Helpful PostgreSQL Information



PostgreSQL Documentation

PostgreSQL Queries Quick Reference

Description SQL
List of Views with View Definition by Schema SELECT schemaname, viewname, viewowner, pg_get_viewdef(viewname) as view_def
FROM pg_views
WHERE schemaname = 'odslov'
ORDER BY 1;
List of Functions with Definition by Schema SELECT n.nspname AS function_schema,
p.proname AS function_name,
pg_get_functiondef(p.oid) as function_def
FROM
pg_proc p
LEFT JOIN pg_namespace n ON p.pronamespace = n.oid
WHERE
n.nspname = 'odsmgr'
ORDER BY 1, 2
List of tables by Schema SELECT schemaname, tablename
FROM pg_tables
WHERE schemaname = 'odsmgr'
ORDER BY 1
List of Indexes with Definition by Schema SELECT schemaname, tablename, indexname, indexdef FROM pg_indexes WHERE schemaname = 'odsmgr' ORDER BY 2, 3


What you should know: Oracle to PostgreSQL Dialect Differences

Oracle and PostgreSQL both conform to standard SQL. However, they contain several dialectical differences.
  1. All Postgres Schemas and Objects are referred to in all lowercase.

  2. PostgreSQL’s PL/pgSQL is similar to Oracle PL/SQL and can be used to write stored functions. PostgreSQL doesn’t have packages or procedures (only functions).
    When converting them to PosgreSQL the name of the function has been "translated" from {package/procedure}.{function/codeblock} to the new reference {package/procedure}${function/codeblock}.
    The "." is replaced with "$". They will be referred to as functions versus packages or procedures.

  3. Creating functions uses PL/pgSQL which also includes several dialectical differences.

  4. The set of operators and SQL functions is very similar but there are differences. For example, both have the concatenation operator “||”, as well as substr, upper, to_char and other functions with the same syntax. However, any Oracle function that is being used must have its syntax compared to the equivalent function in PostgreSQL, if such exists. 

SQL Dialect Quick Reference









Data Types and JDBC