How can I get a listing of foreign key constraints in Babelfish?

0

In SQL Server, you can run

select * from information_schema.table_constraints where constraint_type = 'FOREIGN KEY'

However, in Babelfish, the constraint name listed in the output is actually the underlying PostgreSQL constraint name (rather than the name that the constraint was created with), which Babelfish changes. Therefore, any DDL generated based on the table_constraints view will fail.

demandé il y a 2 mois111 vues
1 réponse
0

Please let me inform you that Foreign key constraints that reference the database name aren't supported in Babelfish[+]

[+] https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-compatibility.tsql.limitations-unsupported.html#babelfish-compatibility.tsql.limitations-unsupported-table

PostgreSQL has a maximum identifier length of 63 characters, while SQL Server supports up to 128. In addition to this, PostgreSQL has stricter uniqueness requirements for index names. Babelfish handles these restrictions by internally appending or replacing part of such identifiers with a 32-character string representing a hash of the identifier. While this is transparent from T-SQL, the identifier-with-hash is the object name when seen from PostgreSQL.

This is a expected behavior however, please let us know the SQL statements, error messages via support ticket so that we will investigate the issue further.

AWS
INGÉNIEUR EN ASSISTANCE TECHNIQUE
répondu il y a 2 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions