Re: COPY view
Hans-Juergen Schoenig wrote:
Bruce Momjian wrote:
I don't see why views should be special. Tables clearly should be
because we can open them directly.Ah, I didn't think of that. Good idea. So we don't need this patch?
why do we agree on a patch, implement it and reject it then?
would be easier to reject it before actually implementing it ...
it is quite hard to explain to a customer that something is rejected
after approval - even if things are written properly ...
Agreed. The problem with this patch is that originally we just wanted
views, and later the idea of putting a query in there was agreed on, so
the feature request has changed over time.
--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Import Notes
Reply to msg id not found: 44907CC0.6070100@cybertec.at
On Wed, Jun 14, 2006 at 05:19:44PM -0400, Bruce Momjian wrote:
Hans-Juergen Schoenig wrote:
Bruce Momjian wrote:
I don't see why views should be special. Tables clearly should be
because we can open them directly.Ah, I didn't think of that. Good idea. So we don't need this patch?
why do we agree on a patch, implement it and reject it then?
would be easier to reject it before actually implementing it ...
it is quite hard to explain to a customer that something is rejected
after approval - even if things are written properly ...Agreed. The problem with this patch is that originally we just wanted
views, and later the idea of putting a query in there was agreed on, so
the feature request has changed over time.
BTW, one argument for allowing dumping out of views is that it means
they'd act more like tables; you just COPY viewname TO file.
Also, if copy from select doesn't make it into 8.2, then we should
absolutely put this patch in, so that users at least have something they
can use.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
Jim C. Nasby wrote:
On Wed, Jun 14, 2006 at 05:19:44PM -0400, Bruce Momjian wrote:
Hans-Juergen Schoenig wrote:
Bruce Momjian wrote:
I don't see why views should be special. Tables clearly should be
because we can open them directly.Ah, I didn't think of that. Good idea. So we don't need this patch?
why do we agree on a patch, implement it and reject it then?
would be easier to reject it before actually implementing it ...
it is quite hard to explain to a customer that something is rejected
after approval - even if things are written properly ...Agreed. The problem with this patch is that originally we just wanted
views, and later the idea of putting a query in there was agreed on, so
the feature request has changed over time.BTW, one argument for allowing dumping out of views is that it means
they'd act more like tables; you just COPY viewname TO file.
I think the simple argument is that you can SELECT from a table, why not
COPY from it. Of course copying INTO a view would not work. :-(
--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Wed, Jun 14, 2006 at 05:36:25PM -0400, Bruce Momjian wrote:
Jim C. Nasby wrote:
On Wed, Jun 14, 2006 at 05:19:44PM -0400, Bruce Momjian wrote:
Hans-Juergen Schoenig wrote:
Bruce Momjian wrote:
I don't see why views should be special. Tables clearly should be
because we can open them directly.Ah, I didn't think of that. Good idea. So we don't need this patch?
why do we agree on a patch, implement it and reject it then?
would be easier to reject it before actually implementing it ...
it is quite hard to explain to a customer that something is rejected
after approval - even if things are written properly ...Agreed. The problem with this patch is that originally we just wanted
views, and later the idea of putting a query in there was agreed on, so
the feature request has changed over time.BTW, one argument for allowing dumping out of views is that it means
they'd act more like tables; you just COPY viewname TO file.I think the simple argument is that you can SELECT from a table, why not
COPY from it. Of course copying INTO a view would not work. :-(
Aside from legacy, if you do COPY tablename, you know that it's going to
be a 'high speed' copy, while presumably COPY (SELECT * FROM tablename)
will have additional overhead. Of course, this is also an argument
against the patch.
Granted, if we wanted to we could put the brains in the code to figure
out if a COPY (SELECT) is actually (SELECT * FROM table), which means we
could use the fast code-path, but I don't think it's worth the effort.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
Jim C. Nasby wrote:
On Wed, Jun 14, 2006 at 05:19:44PM -0400, Bruce Momjian wrote:
Hans-Juergen Schoenig wrote:
Bruce Momjian wrote:
I don't see why views should be special. Tables clearly should be
because we can open them directly.Ah, I didn't think of that. Good idea. So we don't need this patch?
why do we agree on a patch, implement it and reject it then?
would be easier to reject it before actually implementing it ...
it is quite hard to explain to a customer that something is rejected
after approval - even if things are written properly ...Agreed. The problem with this patch is that originally we just wanted
views, and later the idea of putting a query in there was agreed on, so
the feature request has changed over time.BTW, one argument for allowing dumping out of views is that it means
they'd act more like tables; you just COPY viewname TO file.Also, if copy from select doesn't make it into 8.2, then we should
absolutely put this patch in, so that users at least have something they
can use.
OK, based on this feedback, I am adding COPY VIEW to the patches queue.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian <bruce@momjian.us> writes:
OK, based on this feedback, I am adding COPY VIEW to the patches queue.
I think we have other things that demand our attention more than a
half-baked feature.
regards, tom lane
Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
OK, based on this feedback, I am adding COPY VIEW to the patches queue.
I think we have other things that demand our attention more than a
half-baked feature.
Well, the patch was submitted in time, and it is a desired feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Bruce Momjian wrote:
Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
OK, based on this feedback, I am adding COPY VIEW to the patches queue.
I think we have other things that demand our attention more than a
half-baked feature.Well, the patch was submitted in time, and it is a desired feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.
well I thought the agreed approach to that was allowing COPY from
arbitrary expressions without the need to go through the extra CREATE
VIEW step?
Stefan
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
Bruce Momjian wrote:
Well, the patch was submitted in time, and it is a desired feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.
well I thought the agreed approach to that was allowing COPY from
arbitrary expressions without the need to go through the extra CREATE
VIEW step?
Exactly. This is not the feature that was agreed to. Just because we
have a patch for it doesn't mean that we have to put it in. If we do
put it in, we'll be stuck carrying that feature forever, even after
someone gets around to doing it right.
regards, tom lane
Stefan Kaltenbrunner wrote:
Bruce Momjian wrote:
Tom Lane wrote:
Bruce Momjian <bruce@momjian.us> writes:
OK, based on this feedback, I am adding COPY VIEW to the patches queue.
I think we have other things that demand our attention more than a
half-baked feature.Well, the patch was submitted in time, and it is a desired feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.well I thought the agreed approach to that was allowing COPY from
arbitrary expressions without the need to go through the extra CREATE
VIEW step?
Well, it's been a bit of a mess, unfortunately, and I can understand
people feeling aggrieved.
I think there is general agreement that we want to be able to do:
COPY (SELECT ... ) TO ...
When we have that it would not be unreasonable to have a special case
for views which would transparently rewrite
COPY VIEWNAME TO
as
COPY (SELECT * FROM VIEWNAME) TO
So we would not necessarily be adopting a feature we don't want in the
long run, from a user visibility angle.
The issue seems to be that in adopting the present patch we would be
incorporating some code we will essentially have to abandon when we get
the feature we all really want, and which we hope will be available for
8.3. On that basis I can certainly appreciate Tom's reluctance to adopt
the patch.
It's a close call. On balance I'd be inclined to accept the patch if it
reviews OK, even though we will throw the code away soon (we hope).
cheers
andrew
Andrew Dunstan <andrew@dunslane.net> writes:
It's a close call. On balance I'd be inclined to accept the patch if it
reviews OK, even though we will throw the code away soon (we hope).
Well, the patch seems pretty ugly code-wise as well. I'd be willing to
clean it up if I thought it wouldn't ultimately get yanked out again,
but I'm not sure that I see the point if we think it's a dead end.
It doesn't come close to applying to CVS HEAD, either :-(
regards, tom lane
Tom Lane wrote:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
Bruce Momjian wrote:
Well, the patch was submitted in time, and it is a desired feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.well I thought the agreed approach to that was allowing COPY from
arbitrary expressions without the need to go through the extra CREATE
VIEW step?Exactly. This is not the feature that was agreed to. Just because we
have a patch for it doesn't mean that we have to put it in. If we do
put it in, we'll be stuck carrying that feature forever, even after
someone gets around to doing it right.regards, tom lane
It has been made as "COPY FROM / TO view" because people wanted it to be
done that way.
My original proposal was in favour of arbitrary SELECTs (just like
proposed by the TODO list) but this was rejected. So, we did it that way
(had to explain to customer why views are better). Now everybody wants
the original select which was proposed.
I can understand if things are not committed because of bad code quality
or whatever but to be honest: It is more of less frustrating if things
are done differently because of community wish and then rejected because
things are not done the original way ...
Things have been submitted months ago and now we are short of time. I
think everybody on the list is going a superior job but after 6 years I
still have no idea how patches are treated ;).
best regards,
hans
--
Cybertec Geschwinde & Sch�nig GmbH
Sch�ngrabern 134; A-2020 Hollabrunn
Tel: +43/1/205 10 35 / 340
www.postgresql.at, www.cybertec.at
Hans-Juergen Schoenig wrote:
Tom Lane wrote:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
Bruce Momjian wrote:
Well, the patch was submitted in time, and it is a desired
feature. If
we want to hold it for 8.3 due to lack of time, we can, but I don't
think we can decide now that it must wait.well I thought the agreed approach to that was allowing COPY from
arbitrary expressions without the need to go through the extra CREATE
VIEW step?Exactly. This is not the feature that was agreed to. Just because we
have a patch for it doesn't mean that we have to put it in. If we do
put it in, we'll be stuck carrying that feature forever, even after
someone gets around to doing it right.regards, tom lane
It has been made as "COPY FROM / TO view" because people wanted it to
be done that way.
My original proposal was in favour of arbitrary SELECTs (just like
proposed by the TODO list) but this was rejected. So, we did it that
way (had to explain to customer why views are better). Now everybody
wants the original select which was proposed.I can understand if things are not committed because of bad code
quality or whatever but to be honest: It is more of less frustrating
if things are done differently because of community wish and then
rejected because things are not done the original way ...Things have been submitted months ago and now we are short of time. I
think everybody on the list is going a superior job but after 6 years
I still have no idea how patches are treated ;).
There's nothing hidden (unless it's also hidden from me ;-) )
I take it that when you talk about "we did this" you are referring to
the patch from Karel Zak.
I have had a quick look at that patch, and apart from not applying
cleanly to the current CVS tree (which isn't your fault as the patch has
been sitting around for so long) it is also missing regression tests and
docs. That's without even looking at code quality. So, how quickly can
you fix those 3 things?
cheers
andrew
Hans-Juergen Schoenig wrote:
It has been made as "COPY FROM / TO view" because people wanted it to be
done that way.
My original proposal was in favour of arbitrary SELECTs (just like
proposed by the TODO list) but this was rejected. So, we did it that way
(had to explain to customer why views are better). Now everybody wants
the original select which was proposed.
This is not the first time this happens. It has happened to Simon Riggs
at least once and to me as well. Sometimes "the community" just doesn't
realize what it wants, until what it think it wants is done and then
realizes it wants something else.
It is frustrating, but I don't see how to do things differently.
Things have been submitted months ago and now we are short of time. I
think everybody on the list is going a superior job but after 6 years I
still have no idea how patches are treated ;).
It sucks that patches are posted and no action is taken on them for
months. I agree with that.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Alvaro Herrera <alvherre@commandprompt.com> writes:
It sucks that patches are posted and no action is taken on them for
months. I agree with that.
This particular patch was originally posted during the 8.1 feature
freeze window (2005-09-29), so it was doomed to a certain amount of
languishing on the to-worry-about-later list in any case. We should
have gotten around to reviewing it sooner than we did (the followup
discussion was around 2006-06-14), but there was still plenty of time
at that point to rework it per the discussion and get it into 8.2.
As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.
regards, tom lane
Tom Lane wrote:
Alvaro Herrera <alvherre@commandprompt.com> writes:
It sucks that patches are posted and no action is taken on them for
months. I agree with that.This particular patch was originally posted during the 8.1 feature
freeze window (2005-09-29), so it was doomed to a certain amount of
languishing on the to-worry-about-later list in any case. We should
have gotten around to reviewing it sooner than we did (the followup
discussion was around 2006-06-14), but there was still plenty of time
at that point to rework it per the discussion and get it into 8.2.As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.
Yea, that pretty much sums it up. Based on the number of people who
wanted it applied, I think we need to have a discussion like this. I can
easily go with rejecting it, but I think the discussion is needed to be
fair to the patch author.
So, what do we want to do with this? Where did we say we didn't want
SELECT? I never remember that being discussed. I remember us saying we
never wanted SELECT or VIEWs because it was going to be slow, but once
the SELECT idea came up, I think we decided we wanted that, and views
could be built on top of that. I certainly never remember us saying we
didn't want SELECT but wanted views.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tuesday 22 August 2006 16:10, Tom Lane wrote:
Alvaro Herrera <alvherre@commandprompt.com> writes:
It sucks that patches are posted and no action is taken on them for
months. I agree with that.This particular patch was originally posted during the 8.1 feature
freeze window (2005-09-29), so it was doomed to a certain amount of
languishing on the to-worry-about-later list in any case. We should
have gotten around to reviewing it sooner than we did (the followup
discussion was around 2006-06-14), but there was still plenty of time
at that point to rework it per the discussion and get it into 8.2.As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.
Well, unless someone is going to commit to doing it the other way, it seems
the guy who actually codes something offers a better solution than
handwaving... people have also had plenty of time to come up with a
replacement if that's what they really wanted.
--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL
Robert Treat <xzilla@users.sourceforge.net> writes:
On Tuesday 22 August 2006 16:10, Tom Lane wrote:
As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.
Well, unless someone is going to commit to doing it the other way, it seems
the guy who actually codes something offers a better solution than
handwaving... people have also had plenty of time to come up with a
replacement if that's what they really wanted.
The patch submitter has neither provided an updated patch nor defended
his original submission as being the right thing. If he doesn't take it
seriously enough to have done any followup, why should the rest of us?
At the moment, with the online-index and updatable-views patches both
pretty seriously broken, and no sign that the bitmap-index people are
awake at all, I might take it on myself to fix this one instead of those
others. But is that what I should be spending my time on in the waning
days of the 8.2 freeze cycle? Speak now or hold your peace.
regards, tom lane
Tom Lane wrote:
Robert Treat <xzilla@users.sourceforge.net> writes:
On Tuesday 22 August 2006 16:10, Tom Lane wrote:
As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.Well, unless someone is going to commit to doing it the other way, it seems
the guy who actually codes something offers a better solution than
handwaving... people have also had plenty of time to come up with a
replacement if that's what they really wanted.The patch submitter has neither provided an updated patch nor defended
his original submission as being the right thing. If he doesn't take it
seriously enough to have done any followup, why should the rest of us?At the moment, with the online-index and updatable-views patches both
pretty seriously broken, and no sign that the bitmap-index people are
awake at all, I might take it on myself to fix this one instead of those
others. But is that what I should be spending my time on in the waning
days of the 8.2 freeze cycle? Speak now or hold your peace.
Your analysis is accurate. You can spend your time on whatever _you_
think is important. If someone wants to take on COPY VIEW and do all
the work to make it 100%, then they are welcome to do it, but if you
don't feel it is worth it, you can just leave it. If it isn't 100% by
the time we start beta, it is kept for a later release.
Alvaro has already indicated some problems with the patch (the objection
email is in the patches queue), so it is up to someone to correct at
least that, and if other objections are found, they have to correct
those too before 8.2 beta starts.
--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Hi,
Robert Treat <xzilla@users.sourceforge.net> writes:
On Tuesday 22 August 2006 16:10, Tom Lane wrote:
As I see it, we've effectively got a patch that was rejected once,
and Bruce wants to apply it anyway because no replacement has been
forthcoming.Well, unless someone is going to commit to doing it the other way, it
seems
the guy who actually codes something offers a better solution than
handwaving... people have also had plenty of time to come up with a
replacement if that's what they really wanted.The patch submitter has neither provided an updated patch nor defended
his original submission as being the right thing. If he doesn't take it
seriously enough to have done any followup, why should the rest of us?At the moment, with the online-index and updatable-views patches both
pretty seriously broken, and no sign that the bitmap-index people are
awake at all, I might take it on myself to fix this one instead of those
others. But is that what I should be spending my time on in the waning
days of the 8.2 freeze cycle? Speak now or hold your peace.regards, tom lane
I am willing to get it up to shape and support
both COPY (select) TO and COPY view TO,
the second is rewritten as SELECT * FROM view.
In fact, I already started.
Best regards,
Zolt�n B�sz�rm�nyi