Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE foo
- (name TEXT,
- sql_type regtype);
- INSERT INTO foo
- VALUES('my_field_1', 'character varying'::regtype);
- INSERT INTO foo
- VALUES('my_field_2', 'VARCHAR(50)'::regtype);
- INSERT INTO foo
- VALUES('my_field_3', 'NUMERIC(32,16)'::regtype);
- SELECT * from foo;
- name sql_type
- text regtype
- -------------------------------------
- my_field_1 character varying
- my_field_2 character varying
- my_field_3 numeric
- name sql_type
- text regtype
- -------------------------------------
- my_field_1 character varying <-- I won't need such cases
- my_field_2 character varying(50)
- my_field_3 numeric(32,16)
Add Comment
Please, Sign In to add comment