On 10/03/2014 05:38 AM, Fabrízio de Royes Mello wrote:
On Thu, Oct 2, 2014 at 9:38 PM, Marti Raudsepp wrote:
The documentation claims:
CREATE [ IF NOT EXISTS ] SEQUENCE name
But grammar implements it the other way around:
CREATE SEQUENCE IF NOT EXISTS name;
You are correct. Fix attached.
Th
On 10/3/14, 4:38 AM, Fabrízio de Royes Mello wrote:
On Thu, Oct 2, 2014 at 9:38 PM, Marti Raudsepp wrote:
On Tue, Aug 26, 2014 at 4:20 PM, Heikki Linnakangas
wrote:
On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote:
The attached patch contains CINE for sequences.
I just strip this code
On Thu, Oct 2, 2014 at 9:38 PM, Marti Raudsepp wrote:
>
> On Tue, Aug 26, 2014 at 4:20 PM, Heikki Linnakangas
> wrote:
> > On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote:
> >> The attached patch contains CINE for sequences.
> >>
> >> I just strip this code from the patch rejected before.
>
On Tue, Aug 26, 2014 at 4:20 PM, Heikki Linnakangas
wrote:
> On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote:
>> The attached patch contains CINE for sequences.
>>
>> I just strip this code from the patch rejected before.
>
> Committed with minor changes
Hmm, the CommitFest app lists Marko
On Tue, Aug 26, 2014 at 10:20 AM, Heikki Linnakangas <
hlinnakan...@vmware.com> wrote:
> On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote:
>
>> On Tue, Apr 1, 2014 at 2:46 PM, Robert Haas
>> wrote:
>>
>>>
>>> Where this is a bit more interesting is in the case of sequences, where
> rese
On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote:
On Tue, Apr 1, 2014 at 2:46 PM, Robert Haas wrote:
Where this is a bit more interesting is in the case of sequences, where
resetting the sequence to zero may cause further inserts into an
existing table to fail.
Yeah. Sequences do have
On Tue, Apr 1, 2014 at 2:46 PM, Robert Haas wrote:
>
> >> Where this is a bit more interesting is in the case of sequences, where
> >> resetting the sequence to zero may cause further inserts into an
> >> existing table to fail.
> >
> > Yeah. Sequences do have contained data, which makes COR hard
On Tue, Apr 1, 2014 at 2:46 PM, Robert Haas wrote:
> On Tue, Apr 1, 2014 at 10:03 AM, Tom Lane wrote:
> > I'm willing to bend that to the extent of saying that COR leaves in place
> > subsidiary properties that you might add *with additional statements* ---
> > for example, foreign keys for a ta
On Tue, Apr 1, 2014 at 10:03 AM, Tom Lane wrote:
> I'm willing to bend that to the extent of saying that COR leaves in place
> subsidiary properties that you might add *with additional statements* ---
> for example, foreign keys for a table, or privilege grants for a role.
> But the properties of
Stephen Frost writes:
> * Michael Paquier (michael.paqu...@gmail.com) wrote:
>> Except if I am missing something, the second query means that it is
>> going to replace the existing user test with a new one, with the
>> settings specified in the 2nd query, all being default values. As the
>> defaul
On Tue, Apr 1, 2014 at 1:34 PM, Stephen Frost wrote:
> * Michael Paquier (michael.paqu...@gmail.com) wrote:
>> On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello
>> wrote:
>> > Think about the statements below:
>> >
>> > CREATE ROLE test NOLOGIN;
>> > CREATE OR REPLACE ROLE test;
>> >
>> > I
On Tue, Apr 1, 2014 at 1:14 AM, Michael Paquier
wrote:
>
> On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello
> wrote:
> > Think about the statements below:
> >
> > CREATE ROLE test NOLOGIN;
> > CREATE OR REPLACE ROLE test;
> >
> > If we execute the statements above the result should be the
* Michael Paquier (michael.paqu...@gmail.com) wrote:
> On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello
> wrote:
> > Think about the statements below:
> >
> > CREATE ROLE test NOLOGIN;
> > CREATE OR REPLACE ROLE test;
> >
> > If we execute the statements above the result should be the role
On Tue, Apr 1, 2014 at 7:28 AM, Fabrízio de Royes Mello
wrote:
> Think about the statements below:
>
> CREATE ROLE test NOLOGIN;
> CREATE OR REPLACE ROLE test;
>
> If we execute the statements above the result should be the role 'test' can
> login. Correct?
Except if I am missing something, the se
On Mon, Mar 31, 2014 at 5:46 PM, Stephen Frost wrote:
>
> * Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> > Because they maintain user data?
>
> Eh? You mean like the sequence #? Yes, I'd expect 'CREATE OR REPLACE
> SEQUENCE' to want a minvalue or something on a 'replace' case to en
* Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> Because they maintain user data?
Eh? You mean like the sequence #? Yes, I'd expect 'CREATE OR REPLACE
SEQUENCE' to want a minvalue or something on a 'replace' case to ensure
that it doesn't roll backwards unless explicitly asked for.
On Mon, Mar 31, 2014 at 5:00 PM, Stephen Frost wrote:
>
> * Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> > On Mon, Mar 31, 2014 at 4:52 PM, Stephen Frost
wrote:
> > >
> > > * Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> > > > - CREATE SEQUENCE [ IF NOT EXISTS ]
> > > >
* Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> On Mon, Mar 31, 2014 at 4:52 PM, Stephen Frost wrote:
> >
> > * Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> > > - CREATE SEQUENCE [ IF NOT EXISTS ]
> > > - CREATE DOMAIN [ IF NOT EXISTS ]
> > > - CREATE EVENT TRIGGER [ IF
On Mon, Mar 31, 2014 at 4:52 PM, Stephen Frost wrote:
>
> * Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> > - CREATE SEQUENCE [ IF NOT EXISTS ]
> > - CREATE DOMAIN [ IF NOT EXISTS ]
> > - CREATE EVENT TRIGGER [ IF NOT EXISTS ]
> > - CREATE ROLE [ IF NOT EXISTS ]
> >
> > Seems that no
* Fabrízio de Royes Mello (fabriziome...@gmail.com) wrote:
> - CREATE SEQUENCE [ IF NOT EXISTS ]
> - CREATE DOMAIN [ IF NOT EXISTS ]
> - CREATE EVENT TRIGGER [ IF NOT EXISTS ]
> - CREATE ROLE [ IF NOT EXISTS ]
>
> Seems that no one reviewed this part or was rejected with others?
Why don't those f
On Sun, Mar 2, 2014 at 1:04 AM, Fabrízio de Royes Mello <
fabriziome...@gmail.com> wrote:
>
> On Sat, Mar 1, 2014 at 7:39 PM, Tom Lane wrote:
> >
> > =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?=
writes:
> > > On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane wrote:
> > >> [ re schema upgrade scenarios ]
>
On Sat, Mar 1, 2014 at 7:39 PM, Tom Lane wrote:
>
> =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?=
writes:
> > On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane wrote:
> >> [ re schema upgrade scenarios ]
> >> Why wouldn't COR semantics answer that requirement just as well, if not
> >> better?
>
> > Just bec
On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane wrote:
>
> =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?=
writes:
> > On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost
wrote:
> >> Fabrízio, can you clarify the use-case for things like CREATE AGGREGATE
> >> to have IF NOT EXISTS rather than OR REPLACE, or if
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= writes:
> On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane wrote:
>> [ re schema upgrade scenarios ]
>> Why wouldn't COR semantics answer that requirement just as well, if not
>> better?
> Just because it will replace the object content... and in some cases thi
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= writes:
> On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost wrote:
>> Fabrízio, can you clarify the use-case for things like CREATE AGGREGATE
>> to have IF NOT EXISTS rather than OR REPLACE, or if there is a reason
>> why both should exist? Complicating o
On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost wrote:
>
> Fabrízio, can you clarify the use-case for things like CREATE AGGREGATE
> to have IF NOT EXISTS rather than OR REPLACE, or if there is a reason
> why both should exist? Complicating our CREATE options is not something
> we really wish to
I tested this patch and it is not patchable now. Please, can you fix patch?
Regards
Pavel
W dniu 26.07.2013 02:44, Fabrízio de Royes Mello pisze:
> Should be... I fix that in attached patch.
Hello, as I can see there are more inconsistent places.
First style:
OperatorCreate
---
Second style:
ProcedureCreate
TypeCreate
DefineTSParser
DefineType
DefineEnum
---
Third style:
CreateCast
Defi
Hello,
patch works fine but is there any reason to comparing each ifNotExists
in different way?
i.e.
ProcedureCreate
if (!ifNotExists)
...
else
{
...
return
}
TypeCreate
if (ifNotExists)
{
...
return
}
...
---
Shouldn't it be more consistent?
Regards,
Karol
--
Sent via pgsql-hackers mailing
On Sun, Jul 14, 2013 at 03:36:09AM -0300, Fabrízio de Royes Mello wrote:
> > Next, changes in src/backend, starting with parser changes: the patch
> > adds "IF_P NOT EXISTS" variants for various productions. For example:
> > I think opt_if_not_exists should be used for the others as well.
> >
>
On Mon, Jun 24, 2013 at 8:05 AM, Andres Freund
wrote:
>
>
> I'd argue if we go that way - which seems to be a good idea - we really
> ought to make a complete pass and add it to all commands where it's
> currently missing.
>
Yeah... this is my purpose, but I decide do that in two steps. First wit
On Thu, Jun 20, 2013 at 1:24 PM, Peter Eisentraut wrote:
> On 6/20/13 11:04 AM, Robert Haas wrote:
> > I kind of don't see the point of having IF NOT EXISTS for things that
> > have OR REPLACE, and am generally in favor of implementing OR REPLACE
> > rather than IF NOT EXISTS where possible.
>
>
On 2013-06-12 14:29:59 -0300, Fabrízio de Royes Mello wrote:
> On Fri, May 24, 2013 at 12:22 PM, Fabrízio de Royes Mello <
> fabriziome...@gmail.com> wrote:
>
> > Hi all,
> >
> > I working in a patch to include support of "IF NOT EXISTS" into "CREATE"
> > statements that not have it yet.
> >
> > I
On 6/20/13 11:04 AM, Robert Haas wrote:
> I kind of don't see the point of having IF NOT EXISTS for things that
> have OR REPLACE, and am generally in favor of implementing OR REPLACE
> rather than IF NOT EXISTS where possible.
I tend to agree.
>> > Btw., I also want REPLACE BUT DO NOT CREATE.
>
On Wed, Jun 12, 2013 at 3:00 PM, Peter Eisentraut wrote:
> On 6/12/13 1:29 PM, Fabrízio de Royes Mello wrote:
>> The attached patch add support to "IF NOT EXISTS" to "CREATE" statements
>> listed below:
>>
>> - CREATE AGGREGATE [ IF NOT EXISTS ] ...
>> - CREATE CAST [ IF NOT EXISTS ] ...
>> - CREA
On Thu, Jun 20, 2013 at 9:48 PM, Fabrízio de Royes Mello
wrote:
>
> On Thu, Jun 20, 2013 at 1:52 AM, Amit Langote
> wrote:
>>
>> Is it possible to:
>>
>> CREATE [ OR REPLACE | IF NOT EXISTS ] OPERATOR CLASS
>>
>> I am in a situation where I need to conditionally create an operator
>> class (that
On Thu, Jun 20, 2013 at 1:52 AM, Amit Langote
wrote:
>
> Is it possible to:
>
> CREATE [ OR REPLACE | IF NOT EXISTS ] OPERATOR CLASS
>
> I am in a situation where I need to conditionally create an operator
> class (that is, create only if already does not exist).
>
> [...]
>
The intention is cove
On Wed, Jun 19, 2013 at 12:45 PM, Fabrízio de Royes Mello
wrote:
> On Mon, Jun 17, 2013 at 11:33 PM, Peter Eisentraut wrote:
>>
>> Replace/alter the object if it already exists, but fail if it does not
>> exist.
>>
>> The complete set of variants is:
>>
>> - object does not exist:
>>
>> - pro
On Mon, Jun 17, 2013 at 11:33 PM, Peter Eisentraut wrote:
>
> Replace/alter the object if it already exists, but fail if it does not
> exist.
>
> The complete set of variants is:
>
> - object does not exist:
>
> - proceed (normal CREATE)
> - error (my above description)
>
> - object exists
On Mon, Jun 17, 2013 at 12:36 AM, Robins Tharakan wrote:
> Hi,
>
> Did some basic checks on this patch. List-wise feedback below.
>
> [...]
>
>
Dear Robins,
Thanks for your review. I attach your considerations to Commit Fest [1].
Regards,
[1] https://commitfest.postgresql.org/action/patch_view
On Wed, 2013-06-12 at 16:31 -0300, Fabrízio de Royes Mello wrote:
> > Btw., I also want REPLACE BUT DO NOT CREATE.
>
> Can you explain more about it?
>
Replace/alter the object if it already exists, but fail if it does not
exist.
The complete set of variants is:
- object does not exist:
-
Hi,
Did some basic checks on this patch. List-wise feedback below.
- Removed unnecessary extra-lines: Yes
- Cleanly applies to Git-Head: Yes
- Documentation Updated: Yes
- Tests Updated: Yes
- All tests pass: Yes. (But see Note below)
- Does it Work (CREATE AGGREGATE): Yes
- Does it Work (CREATE
On 13 June 2013 04:30, Peter Eisentraut wrote:
> I'm wondering where "IF NOT EXISTS" and "OR REPLACE" will meet.
>
CREATE OR REPLACE (or ALTER / UPDATE ?) would definitely be useful for
enums, where it would be nice if we could teach an ORM to generate DDL
based on the current values of the enum
On Wed, Jun 12, 2013 at 4:00 PM, Peter Eisentraut wrote:
>
>
> I'm wondering where "IF NOT EXISTS" and "OR REPLACE" will meet.
>
> For example, why doesn't your list include CREATE FUNCTION?
>
> I have on my personal todo list to add "OR REPLACE" support to CREATE
> AGGREGATE and CREATE OPERATOR.
On 6/12/13 1:29 PM, Fabrízio de Royes Mello wrote:
> The attached patch add support to "IF NOT EXISTS" to "CREATE" statements
> listed below:
>
> - CREATE AGGREGATE [ IF NOT EXISTS ] ...
> - CREATE CAST [ IF NOT EXISTS ] ...
> - CREATE COLLATION [ IF NOT EXISTS ] ...
> - CREATE OPERATOR [ IF NOT E
Hi all,
I working in a patch to include support of "IF NOT EXISTS" into "CREATE"
statements that not have it yet.
I started with "DefineStmt" section from "src/backend/parser/gram.y":
- CREATE AGGREGATE [ IF NOT EXISTS ] ...
- CREATE OPERATOR [ IF NOT EXISTS ] ...
- CREATE TYPE [ IF NOT EXISTS ]
46 matches
Mail list logo