Search Postgresql Archives

Re: enforce naming convention

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Can I create a trigger that runs when a new object is created and see
> if its name is in an expected format and if not reject it?
  
Sounds like you need a database-wide trigger on DDL. PostgreSQL has nothing
like that at the moment. Your best bet for now is to try and control it
at the application level. You could also run an external program (daemon or
even a cron job) that continually checks for such a violation and reports
it somewhere.

> I had to create a new schema 'zref' storing some of our tables to
> conceptually separate them but I want to make sure that when we create
> new tables we can't have the same table name in 'zref' and 'public'.

Allowing two tables with the same name to exist is a prime feature of schemas,
so working around that is not generally something that is done. :)

- --
Greg Sabino Mullane greg@xxxxxxxxxxxx
PGP Key: 0x14964AC8 200604150915
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFEQPLxvJuQZxSWSsgRAuP8AJ9awH/+0D8Iy6+hc9qDmbrDDgpWHACgkGFS
pQMAGEFJWUbuonyN5+m15wE=
=b825
-----END PGP SIGNATURE-----




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux