10 Matching Annotations
- Jan 2023
- Dec 2022
-
www.postgresql.org www.postgresql.org
-
interval values can be written using the following verbose syntax: [@] quantity unit [quantity unit...] [direction] where quantity is a number (possibly signed); unit is microsecond, millisecond, second, minute, hour, day, week, month, year, decade, century, millennium, or abbreviations or plurals of these units
-
- Nov 2022
-
www.benpickles.com www.benpickles.com
-
scale: 3 means 3 of those digits come after the decimal point (surely it should be the other way round, scale for how big the number is and precision for its decimal places?):
-
- Jun 2021
-
stackoverflow.com stackoverflow.com
-
You can use the pg_typeof() function, which also works well for arbitrary values. SELECT pg_typeof("stu_id"), pg_typeof(100)
pg_typeof
-
-
www.postgresql.org www.postgresql.org
-
In this case it's probably better to have the function return a tabletype, RETURNS table, or define the output with OUT variables. Therecord defining syntax at time of query: SELECT foo() AS (a int, b text);
-
-
dba.stackexchange.com dba.stackexchange.com
-
Also, In PostgreSQL, all tables already have a type created by the same name.
-
-
stackoverflow.com stackoverflow.com
-
I personaly prefer the types approach. it assures that if the function is edited, all the queries will return correct results.
-
- Jun 2020
-
stackoverflow.com stackoverflow.com
-
If anyone else wonders How to just get data type of a varible (not column) you can use the pg_typeof(any) function.
-
- Nov 2019