Lists: | pgsql-hackers |
---|
From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-10-01 12:17:13 |
Message-ID: | CAFcNs+o+FWQpaOTBGdo5NaF5P2GkWnQhyfj3w9WQr=wysfr19w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi all,
We already have IF NOT EXISTS for CREATE TABLE. There are some reason to
don't have to CREATE TABLE AS and CREATE MATERIALIZED VIEW??
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-10-14 16:58:45 |
Message-ID: | CAFcNs+rh=SR1Nneft2maRMNXZCbiXx2UmCyOFtMcji8uBB8bKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Wed, Oct 1, 2014 at 9:17 AM, Fabrízio de Royes Mello <
fabriziomello(at)gmail(dot)com> wrote:
>
> Hi all,
>
> We already have IF NOT EXISTS for CREATE TABLE. There are some reason to
don't have to CREATE TABLE AS and CREATE MATERIALIZED VIEW??
>
Patch attached to add CINE support to:
- CREATE TABLE AS
- CREATE MATERIALIZED VIEW
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
Attachment | Content-Type | Size |
---|---|---|
create_matview_if_not_exists_v1.patch | text/x-diff | 14.9 KB |
From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | fabriziomello(at)gmail(dot)com |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-10-27 06:15:40 |
Message-ID: | CAGPqQf1bNadmHUE=O0jLZtkwYLqfkbA3PGsffXu5BVZWmovcZw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi All,
- Patch got applied cleanly.
- Regression make check run fine.
- Patch covered the documentation changes
Here are few comments:
1) What the need of following change:
diff --git a/src/backend/storage/lmgr/lwlock.c
b/src/backend/storage/lmgr/lwlock.c
index bcec173..9fe6855 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -1005,12 +1005,6 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr,
uint64 oldval, uint64 *newval)
lock->tail = proc;
lock->head = proc;
- /*
- * Set releaseOK, to make sure we get woken up as soon as the lock
is
- * released.
- */
- lock->releaseOK = true;
-
/* Can release the mutex now */
SpinLockRelease(&lock->mutex);
It doesn't look like related to this patch.
2)
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index ae5fe88..4d11952 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
fprintf(output, _(" \\f [STRING] show or set field
separator for unaligned query output\n"));
fprintf(output, _(" \\H toggle HTML output mode
(currently %s)\n"),
ON(pset.popt.topt.format == PRINT_HTML));
- fprintf(output, _(" \\pset [NAME [VALUE]] set table output option\n"
+ fprintf(output, _(" \\pset [NAME [VALUE]] set table output
option\n"
" (NAME :=
{format|border|expanded|fieldsep|fieldsep_zero|footer|null|\n"
"
numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager|\n"
"
unicode_border_linestyle|unicode_column_linestyle|unicode_header_linestyle})\n"));
Why above changes reqired ?
3) This patch adding IF NOT EXIST_S for CREATE TABLE AS and CREATE
MATERIALIZED
TABLE, but testcase coverage for CREATE MATERIALIZED TABLE is missing.
Apart from this changes looks good to me.
On Tue, Oct 14, 2014 at 10:28 PM, Fabrízio de Royes Mello <
fabriziomello(at)gmail(dot)com> wrote:
> On Wed, Oct 1, 2014 at 9:17 AM, Fabrízio de Royes Mello <
> fabriziomello(at)gmail(dot)com> wrote:
> >
> > Hi all,
> >
> > We already have IF NOT EXISTS for CREATE TABLE. There are some reason to
> don't have to CREATE TABLE AS and CREATE MATERIALIZED VIEW??
> >
>
> Patch attached to add CINE support to:
>
> - CREATE TABLE AS
> - CREATE MATERIALIZED VIEW
>
> Regards,
>
> --
> Fabrízio de Royes Mello
> Consultoria/Coaching PostgreSQL
> >> Timbira: http://www.timbira.com.br
> >> Blog: http://fabriziomello.github.io
> >> Linkedin: http://br.linkedin.com/in/fabriziomello
> >> Twitter: http://twitter.com/fabriziomello
> >> Github: http://github.com/fabriziomello
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>
--
Rushabh Lathia
From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-10-31 03:06:12 |
Message-ID: | CAFcNs+rp9WhER1dr2XmGuhmfvmaGv7orF3VYc2ZK=t+rPrW6gw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Oct 27, 2014 at 4:15 AM, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
wrote:
>
> Hi All,
>
> - Patch got applied cleanly.
> - Regression make check run fine.
> - Patch covered the documentation changes
>
> Here are few comments:
>
> 1) What the need of following change:
>
> diff --git a/src/backend/storage/lmgr/lwlock.c
b/src/backend/storage/lmgr/lwlock.c
> index bcec173..9fe6855 100644
> --- a/src/backend/storage/lmgr/lwlock.c
> +++ b/src/backend/storage/lmgr/lwlock.c
> @@ -1005,12 +1005,6 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr,
uint64 oldval, uint64 *newval)
> lock->tail = proc;
> lock->head = proc;
>
> - /*
> - * Set releaseOK, to make sure we get woken up as soon as the
lock is
> - * released.
> - */
> - lock->releaseOK = true;
> -
> /* Can release the mutex now */
> SpinLockRelease(&lock->mutex);
>
>
> It doesn't look like related to this patch.
>
Sorry... my mistake when diff to master (more updated than my branch).
Fixed.
> 2)
>
> diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
> index ae5fe88..4d11952 100644
> --- a/src/bin/psql/help.c
> +++ b/src/bin/psql/help.c
> @@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
> fprintf(output, _(" \\f [STRING] show or set field
separator for unaligned query output\n"));
> fprintf(output, _(" \\H toggle HTML output mode
(currently %s)\n"),
> ON(pset.popt.topt.format == PRINT_HTML));
> - fprintf(output, _(" \\pset [NAME [VALUE]] set table output
option\n"
> + fprintf(output, _(" \\pset [NAME [VALUE]] set table output
option\n"
> " (NAME :=
{format|border|expanded|fieldsep|fieldsep_zero|footer|null|\n"
> "
numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager|\n"
> "
unicode_border_linestyle|unicode_column_linestyle|unicode_header_linestyle})\n"));
>
>
> Why above changes reqired ?
>
Same previous mistake.
Fixed.
> 3) This patch adding IF NOT EXIST_S for CREATE TABLE AS and CREATE
MATERIALIZED
> TABLE, but testcase coverage for CREATE MATERIALIZED TABLE is missing.
>
> Apart from this changes looks good to me.
>
Fixed.
Thanks for your review.
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
Attachment | Content-Type | Size |
---|---|---|
create_matview_if_not_exists_v2.patch | text/x-diff | 9.6 KB |
From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | fabriziomello(at)gmail(dot)com |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-11-03 05:12:45 |
Message-ID: | CAGPqQf33QnFaX4026Yp8CYpM7FK3wqBN9qpE4ariwZzCcsrNWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Patch looks good, assigning to committer.
On Fri, Oct 31, 2014 at 8:36 AM, Fabrízio de Royes Mello <
fabriziomello(at)gmail(dot)com> wrote:
>
>
> On Mon, Oct 27, 2014 at 4:15 AM, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
> wrote:
> >
> > Hi All,
> >
> > - Patch got applied cleanly.
> > - Regression make check run fine.
> > - Patch covered the documentation changes
> >
> > Here are few comments:
> >
> > 1) What the need of following change:
> >
> > diff --git a/src/backend/storage/lmgr/lwlock.c
> b/src/backend/storage/lmgr/lwlock.c
> > index bcec173..9fe6855 100644
> > --- a/src/backend/storage/lmgr/lwlock.c
> > +++ b/src/backend/storage/lmgr/lwlock.c
> > @@ -1005,12 +1005,6 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr,
> uint64 oldval, uint64 *newval)
> > lock->tail = proc;
> > lock->head = proc;
> >
> > - /*
> > - * Set releaseOK, to make sure we get woken up as soon as the
> lock is
> > - * released.
> > - */
> > - lock->releaseOK = true;
> > -
> > /* Can release the mutex now */
> > SpinLockRelease(&lock->mutex);
> >
> >
> > It doesn't look like related to this patch.
> >
>
> Sorry... my mistake when diff to master (more updated than my branch).
>
> Fixed.
>
>
> > 2)
> >
> > diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
> > index ae5fe88..4d11952 100644
> > --- a/src/bin/psql/help.c
> > +++ b/src/bin/psql/help.c
> > @@ -247,7 +247,7 @@ slashUsage(unsigned short int pager)
> > fprintf(output, _(" \\f [STRING] show or set field
> separator for unaligned query output\n"));
> > fprintf(output, _(" \\H toggle HTML output
> mode (currently %s)\n"),
> > ON(pset.popt.topt.format == PRINT_HTML));
> > - fprintf(output, _(" \\pset [NAME [VALUE]] set table output
> option\n"
> > + fprintf(output, _(" \\pset [NAME [VALUE]] set table output
> option\n"
> > " (NAME :=
> {format|border|expanded|fieldsep|fieldsep_zero|footer|null|\n"
> > "
> numericlocale|recordsep|recordsep_zero|tuples_only|title|tableattr|pager|\n"
> > "
> unicode_border_linestyle|unicode_column_linestyle|unicode_header_linestyle})\n"));
> >
> >
> > Why above changes reqired ?
> >
>
> Same previous mistake.
>
> Fixed.
>
>
> > 3) This patch adding IF NOT EXIST_S for CREATE TABLE AS and CREATE
> MATERIALIZED
> > TABLE, but testcase coverage for CREATE MATERIALIZED TABLE is missing.
> >
> > Apart from this changes looks good to me.
> >
>
> Fixed.
>
> Thanks for your review.
>
> Regards,
>
> --
> Fabrízio de Royes Mello
> Consultoria/Coaching PostgreSQL
> >> Timbira: http://www.timbira.com.br
> >> Blog: http://fabriziomello.github.io
> >> Linkedin: http://br.linkedin.com/in/fabriziomello
> >> Twitter: http://twitter.com/fabriziomello
> >> Github: http://github.com/fabriziomello
>
--
Rushabh Lathia
From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-11-03 12:35:59 |
Message-ID: | CAFcNs+oEWhnArcDZZKzPa-2kBcPMoYQ2f+iFyVFiMi0gFcCT6w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Mon, Nov 3, 2014 at 3:12 AM, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>
wrote:
>
> Patch looks good, assigning to committer.
>
Thanks for your review!
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | fabriziomello(at)gmail(dot)com, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-12-13 19:04:59 |
Message-ID: | 548C8DDB.9010104@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On 11/03/2014 07:35 AM, Fabrízio de Royes Mello wrote:
> On Mon, Nov 3, 2014 at 3:12 AM, Rushabh Lathia
> <rushabh(dot)lathia(at)gmail(dot)com <mailto:rushabh(dot)lathia(at)gmail(dot)com>> wrote:
> >
> > Patch looks good, assigning to committer.
> >
>
> Thanks for your review!
>
Committed.
cheers
andrew
From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ... |
Date: | 2014-12-13 23:16:29 |
Message-ID: | CAFcNs+rA+0zLT_Vw+qcWDahDKDiOx6eUtrxZ_ydBfEmK7G76GA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Em sábado, 13 de dezembro de 2014, Andrew Dunstan <andrew(at)dunslane(dot)net>
escreveu:
>
> On 11/03/2014 07:35 AM, Fabrízio de Royes Mello wrote:
>
>> On Mon, Nov 3, 2014 at 3:12 AM, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com
>> <mailto:rushabh(dot)lathia(at)gmail(dot)com>> wrote:
>> >
>> > Patch looks good, assigning to committer.
>> >
>>
>> Thanks for your review!
>>
>>
>
> Committed.
>
>
Thanks.
Fabrízio
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello