Maus
03/03/2022, 8:51 AMinformation_schema.sequences
schema. Anybody got any ideas?
Column definition:
SELECT
table_name,
column_name,
data_type
FROM
information_schema.columns
WHERE
table_name = 'booking' AND column_name = 'sequential_id';
>
| table_catalog | table_schema | table_name | column_name | column_default | is_nullable | data_type | is_identity | identity_generation | identity_cycle | is_generated | generation_expression |
| ------------- | ------------ | ---------- | ------------- | -------------- | ----------- | --------- | ----------- | ------------------- | -------------- | ------------ | --------------------- |
| postgres | public | booking | sequential_id | | NO | integer | YES | ALWAYS | NO | NEVER | |
`information_schema.sequences`:
SELECT * FROM information_schema.sequences WHERE sequence_schema = 'public';
> Success. No rows returned
SELECT currval(pg_get_serial_sequence('booking','sequential_id'));
> currval of sequence "Booking_sequential_id_seq" is not yet defined in this session
silentworks
03/03/2022, 8:58 AMMaus
03/03/2022, 9:11 AMcurrval of sequence "Booking_sequential_id_seq" is not yet defined in this session
message in the last query. So it seems there is indeed a sequence postgres knows of, but i'm still trying to figure out what the is not yet defined in this session
part comes from.Maus
03/03/2022, 9:31 AM