Postgresql table naming convention

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Postgresql table naming convention

Thirumal
Hi,

I am new to anchor modeling.

While generating SQL code for Postgresql database, table names are begin with underscore "_"Eg: __pa_party. How to avoid underscore "_" at the beginning of table name.
Reply | Threaded
Open this post in threaded view
|

Re: Postgresql table naming convention

delostilos
Hi,

I've just checked the PostgreSQL code and I see that there are views generated on top of the _... tables. I think it has to do with the fact that you cannot write instead of triggers on tables in PG.
So it creates the _... tables and also views with the 'original' name on top of the _... tables. The views have the triggers needed to let everything work correctly.

I hope this clarifies it a bit.

Regards,
JJ.