Skip to content

Instantly share code, notes, and snippets.

@jmayaalv
Created September 23, 2015 22:32
Show Gist options
  • Save jmayaalv/2ae1203707b10ec865bc to your computer and use it in GitHub Desktop.
Save jmayaalv/2ae1203707b10ec865bc to your computer and use it in GitHub Desktop.
stguatdb=> \d trd_product_configuration
Table "ims.trd_product_configuration"
Column | Type | Modifiers
-----------------+--------+-----------
productid | bigint | not null
configurationid | bigint | not null
Indexes:
"trd_product_configuration_pkey" PRIMARY KEY, btree (productid, configurationid)
Foreign-key constraints:
"trd_product_configuration_configurationid_fk" FOREIGN KEY (configurationid) REFERENCES trd_configuration(configurationid)
"trd_product_configuration_productid_fk" FOREIGN KEY (productid) REFERENCES trd_product(productid)
stguatdb=> \d trd_contract_configuration
Table "ims.trd_contract_configuration"
Column | Type | Modifiers
-----------------+--------+-----------
contractid | bigint | not null
configurationid | bigint | not null
Indexes:
"trd_contract_configuration_pkey" PRIMARY KEY, btree (contractid, configurationid)
Foreign-key constraints:
"trd_contract_configuration_configurationid_fk" FOREIGN KEY (configurationid) REFERENCES trd_configuration(configurationid)
"trd_contract_configuration_contractid_fk" FOREIGN KEY (contractid) REFERENCES trd_contract(contractid)
stguatdb=> select * trd_product_configuration limit 5;;
ERROR: syntax error at or near "trd_product_configuration"
LINE 1: select * trd_product_configuration limit 5;
^
stguatdb=> select * trd_product_configuration ;
ERROR: syntax error at or near "trd_product_configuration"
LINE 1: select * trd_product_configuration ;
^
stguatdb=> select * From trd_product
trd_product trd_product_aud trd_product_configuration trd_product_configuration_aud trd_product_fund trd_product_fund_aud
stguatdb=> select * From trd_product_configuration;
productid | configurationid
-----------+-----------------
300 | 1
301 | 1
100 | 317
(3 rows)
stguatdb=> select * From trd_configuration where configurationid = 1;
fund_type | configurationid | creation_date | sequence_type | valid_from | valid_until
-----------+-----------------+---------------------+----------------+---------------------+-------------
20 | 1 | 2006-01-01 00:00:00 | INTEREST_FIRST | 2006-01-01 00:00:00 |
(1 row)
stguatdb=> select * From trd_configuration_
trd_configuration_aud trd_configuration_instruction trd_configuration_instruction_aud trd_configuration_rate trd_configuration_rate_aud
stguatdb=> select * From trd_configuration_instruction
trd_configuration_instruction trd_configuration_instruction_aud
stguatdb=> select * From trd_configuration_instruction where configurationid = 1;
configurationid | instructionid
-----------------+---------------
1 | 1
1 | 2
1 | 3
1 | 4
(4 rows)
stguatdb=> select * From trd_instruction_
trd_instruction_aud trd_instruction_execution_configuration trd_instruction_execution_configuration_aud
stguatdb=> select * From trd_instruction_execution_configuration where id <= 4;
id | instruction_type | transaction_factory_type
----+------------------+--------------------------
1 | INVESTMENT | DEFAULT_FIXED_INVESTMENT
2 | SURRENDER | STG_PARTIAL_SURRENDER
3 | INTEREST | DEFAULT_INTEREST_RATE
4 | DEATH_CLAIM | DEFAULT_DEATH_BENEFIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment