pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedhi all......................!!
6+ messages / 6 participants
[nested] [flat]
* hi all......................!!
@ 2006-01-25 06:27 AKHILESH GUPTA <akhilesh.davim@gmail.com>
0 siblings, 3 replies; 6+ messages in thread
From: AKHILESH GUPTA @ 2006-01-25 06:27 UTC (permalink / raw)
To: pgsql-sql@postgresql.org; pgsql-general
hello everybody
i am new to this mailing list. this is my first mail to this group.
i jussst want to confirm that whether is it possible to update a view or
not??
i think you all help me in solving my queries in future...................!!
--
Thanks & Regards,
Akhilesh
DAV Institute of Management
Faridabad(Haryana)
GSM:-(+919891606064)
(+911744293789)
"FAILURES CAN BE FORGIVEN BUT AIMING LOW IS A CRIME"
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: hi all......................!!
@ 2006-01-25 06:50 Tino Wildenhain <tino@wildenhain.de>
parent: AKHILESH GUPTA <akhilesh.davim@gmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Tino Wildenhain @ 2006-01-25 06:50 UTC (permalink / raw)
To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql@postgresql.org; pgsql-general
AKHILESH GUPTA schrieb:
> hello everybody
> i am new to this mailing list. this is my first mail to this group.
> i jussst want to confirm that whether is it possible to update a view or
> not??
> i think you all help me in solving my queries in future...................!!
Yes it is. All you have to do is to add a rule for updating in the way
you want it to work. When you use pgadmin3 or such tools, you see that
a view is basically a table with one rule for select. For Insert, update
you can add a rule any time.
HTH
Tino Wildenhain
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] hi all......................!!
@ 2006-01-25 09:24 Richard Huxton <dev@archonet.com>
parent: AKHILESH GUPTA <akhilesh.davim@gmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Richard Huxton @ 2006-01-25 09:24 UTC (permalink / raw)
To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql@postgresql.org; pgsql-general
AKHILESH GUPTA wrote:
> hello everybody
> i am new to this mailing list. this is my first mail to this group.
> i jussst want to confirm that whether is it possible to update a view or
> not??
There is no automatic updating of views at present.
You can write your own RULES though to do updates - see the manuals for
details.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] hi all......................!!
@ 2006-01-25 09:27 Markus Schaber <schabi@logix-tt.com>
parent: AKHILESH GUPTA <akhilesh.davim@gmail.com>
2 siblings, 0 replies; 6+ messages in thread
From: Markus Schaber @ 2006-01-25 09:27 UTC (permalink / raw)
To: AKHILESH GUPTA <akhilesh.davim@gmail.com>; +Cc: pgsql-sql@postgresql.org; pgsql-general
Hi, Akilesh,
AKHILESH GUPTA wrote:
> i am new to this mailing list. this is my first mail to this group.
> i jussst want to confirm that whether is it possible to update a view or
> not??
> i think you all help me in solving my queries in future...................!!
Do you think about issuing UPDATE commands on a view, or do you think
about updating the view definition itsself?
The former is possible if you add the appropriate 'ON UPDATE DO INSTEAD'
Rules to the view, see
http://www.postgresql.org/docs/8.1/static/rules.html and
http://www.postgresql.org/docs/8.1/static/sql-createrule.html
The latter is easily possible if the updated view definition has equal
column definitions, just use "CREATE OR UPDATE VIEW ..." instead of
"CREATE VIEW ..." to update the view.
If your column definitions change, then you'll have to DROP the view
before reCREATEing it, maybe it's best to encapsulate this inside a
transaction or use a scheduled downtime.
Btw, it seems that your '.'-key is broken and chatters. :-)
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
^ permalink raw reply [nested|flat] 6+ messages in thread
* Hi All,
@ 2023-02-18 00:00 Ryan MYJ <ryanmyj@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Ryan MYJ @ 2023-02-18 00:00 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Currently I'm working on upgrading a postgresql version from 9.3 to 12. The
database size is around 700G.
I finished the pg_upgrade process but when I ran 'analyze_new_cluster.sh'
it stucked at the first log 'vacuumdb: processing database "otdb":
Generating minimal optimizer statistics (1 target)'.
Then I checked the active query, the following query has been running for
several hours:
pid | db | start | lap |
query
---------+-----------+-------------------------------+-----------------+------------------------------
1822933 | otdb | 2023-02-18 03:02:36.035755+08 | 04:56:41.408329 |
ANALYZE pg_catalog.pg_class;
Do you know what I can do to speed up this process? Because on another
Testing environment(around 300G data), this 'analyze_new_cluster.sh' only
took several minutes to complete.
Thanks a lot.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Hi All,
@ 2023-02-21 14:51 Tom Lane <tgl@sss.pgh.pa.us>
parent: Ryan MYJ <ryanmyj@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2023-02-21 14:51 UTC (permalink / raw)
To: Ryan MYJ <ryanmyj@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
Ryan MYJ <ryanmyj@gmail.com> writes:
> Currently I'm working on upgrading a postgresql version from 9.3 to 12. The
> database size is around 700G.
> I finished the pg_upgrade process but when I ran 'analyze_new_cluster.sh'
> it stucked at the first log 'vacuumdb: processing database "otdb":
> Generating minimal optimizer statistics (1 target)'.
> Then I checked the active query, the following query has been running for
> several hours:
> pid | db | start | lap |
> query
> ---------+-----------+-------------------------------+-----------------+------------------------------
> 1822933 | otdb | 2023-02-18 03:02:36.035755+08 | 04:56:41.408329 |
> ANALYZE pg_catalog.pg_class;
You omitted the pg_stat_activity columns that could give some insight
into why this is waiting. The first thing I'd think of though is that
it's blocked waiting for a lock, in which case looking into pg_locks
to see what is blocking it could help.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2023-02-21 14:51 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 06:27 hi all......................!! AKHILESH GUPTA <akhilesh.davim@gmail.com>
2006-01-25 06:50 ` Tino Wildenhain <tino@wildenhain.de>
2006-01-25 09:24 ` Richard Huxton <dev@archonet.com>
2006-01-25 09:27 ` Markus Schaber <schabi@logix-tt.com>
2023-02-18 00:00 Hi All, Ryan MYJ <ryanmyj@gmail.com>
2023-02-21 14:51 ` Re: Hi All, Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox