Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements |
Дата | |
Msg-id | CAFcNs+qjUBDHibXQS4wujXd3k4wrKnCr=Aq=ML6FbqG-7iKcGA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Patch to add support of "IF NOT EXISTS" to others
"CREATE" statements
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra">On Mon, Mar 31, 2014 at 5:46 PM, Stephen Frost <<a href="mailto:sfrost@snowman.net">sfrost@snowman.net</a>>wrote:<br />><br />> * Fabrízio de Royes Mello (<a href="mailto:fabriziomello@gmail.com">fabriziomello@gmail.com</a>)wrote:<br /> > > Because they maintain user data?<br/>><br />> Eh? You mean like the sequence #? Yes, I'd expect 'CREATE OR REPLACE<br />> SEQUENCE' to wanta minvalue or something on a 'replace' case to ensure<br /> > that it doesn't roll backwards unless explicitly askedfor. Perhaps<br />> the same for any non-default parameters as well, though I'd look at the<br />> other CORcases to see what they do.<br />><br /><br /></div><div class="gmail_extra">You mean if we execute 'CREATE OR REPLACE'must we verify the default values of this statement and compare with the existing ones?<br /></div><div class="gmail_extra"><br/><br />> CREATE OR REPLACE ROLE is actually easier, no? All you'd be updating<br /> > arethe various role attributes, I'd think, since only those are<br />> available at CREATE time today. Any role membershipsor ownership<br />> would be left alone.<br />><br /><br /></div><div class="gmail_extra"> Think about thestatements below:<br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra">CREATE ROLE test NOLOGIN;<br/></div><div class="gmail_extra">CREATE OR REPLACE ROLE test;<br /></div><div class="gmail_extra"><br /></div><divclass="gmail_extra">If we execute the statements above the result should be the role 'test' can login. Correct?<br/></div><div class="gmail_extra"><br /></div><div class="gmail_extra">Regards,<br /><br /></div><div class="gmail_extra">--<br/>Fabrízio de Royes Mello<br />Consultoria/Coaching PostgreSQL<br />>> Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog sobre TI: <a href="http://fabriziomello.blogspot.com">http://fabriziomello.blogspot.com</a><br/> >> Perfil Linkedin: <a href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a></div></div>
В списке pgsql-hackers по дате отправления: