I try to duplicate a tables of certain columns by using
CREATE TABLE backup_table AS SELECT * FROM unit_11 WHERE status = 1;
I realize the above command will duplicate content of table unit_11 to
backup_table. However, the index is not being carried over. Hence, I change my
command to
create t
On Feb 21, 2011, at 1:39 PM, Yan Cheng CHEOK wrote:
> INSERT INTO backup_table SELECT * FROM unit_11 WHERE status = 1;
You can try something like,
INSERT INTO backup_table select unit_id, 99, status, value from unit_11 where
status=1;
Thanks & Regards,
Vibhor Kumar
EnterpriseDB Corporation
On Feb 18, 2011, at 9:10 PM, trex005 wrote:
> I am trying to archive a schema, however there is a certain table that
> gets skipped with pd_dump
>
> The table's name is 'servers'. I checked to see if it is a reserved
> word, and it does not appear to be...
>
> Thinking I was missing something
Sorry. The table visualize display doesn't look right in the message, as I am
using tab instead of space. I fix them.
Table unit_11
=
unit_id [PK]fk_lot_id status value
1 11 1 100
2 11 1 101
3 1
On 21/02/2011 3:44 PM, Allan Kamau wrote:
Are there other problems we may expect. Can they run any OS programs
or install any such tools, induce buffer overflows and so on.?
So long as your webapp user and database owner is a regular user
(non-superuser) without CREATE ROLE or CREATE DATABASE
On 20/02/2011 2:13 PM, wrote:
Thanks for your replying. But actually there are some difference
database now, and I really want to define the user-defined function or
type one time so that they can be accessed as system-defined function or
type, how can I do?
It sounds like you want som
On 02/19/11 10:13 PM, wrote:
Thanks for your replying. But actually there are some difference
database now, and I really want to define the user-defined function or
type one time so that they can be accessed as system-defined function
or type, how can I do? Thanks!
an alternative m
I was wondering, is there any good way to drop a constraint? Currently, I am
making assumption on the check constraint name.
Although it works at current moment, I do not feel comfortable with it in long
run.
For example :
ALTER TABLE backup_table ADD CHECK (fk_lot_id = 99);
If I want to dr
* Yan Cheng CHEOK wrote:
I was wondering, is there any good way to drop a constraint? Currently, I am
making assumption on the check constraint name.
ALTER TABLE backup_table ADD CHECK (fk_lot_id = 99);
If I want to drop the above CHECK constraint, I will do
ALTER TABLE backup_table DROP C
On 02/21/2011 12:40 AM, matty jones wrote:
I am not sure if this is possible but is there a way that I can have
multiple columns from different tables be a foreign key to a single
column in another table, or do I need to write a check function and if
so how could I set up a relation?
CREATE
On Sun, 20 Feb 2011 21:44:22 -0800, pie...@hogranch.com (John R
Pierce) wrote, quoted or indirectly quoted someone who said :
>when you initially connect to postgres wtih psql or pgadmin-III, specify
>the user as `postgres` and then once connected,
It would not let me in even once.
--
Roedy Gre
On Mon, 21 Feb 2011 10:45:14 +0530, sachin.srivast...@enterprisedb.com
(Sachin Srivastava) wrote, quoted or indirectly quoted someone who
said :
>Hello,
>
>Installation of postgresql requires you to enter a password for the user
>'postgres'.
>
> i) If the user 'postgres' is not there, it will cre
On Mon, Feb 21, 2011 at 10:44:05AM +0300, Allan Kamau wrote:
> A web application requires a dedicated PostgreSQL database in which to
> create tables and other database objects and manipulate data within
> this single database.
Why does the web application need to create tables?
I usually prefer
Greg Sabino Mullane wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I'm not sure how to address this. I'm not exactly sure where to place
session_replication_role. It's very close to the top of the file:
Is this a pg_dumpall? A \connect later on will reset the
session_replicatio
Hi all
I have a hot standby replication setup.
But for no apparent reason, it stops the recovery. Here is a part of the
log:
2011-02-21 11:07:03 BRT LOG: restored log file
"00010009001B" from archive
2011-02-21 11:07:33 BRT LOG: restored log file
"00010009001C" from a
Hello,
I am trying to drop deprecated tables, views, procedures from an existing
database, I am checking the pg_stat_user_tables view to check if the tables are
accessed recently also to check live tuples. For deprecated views and
procedures, I am wondering How can I do that, for example suppos
Greg Sabino Mullane wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I'm not sure how to address this. I'm not exactly sure where to place
session_replication_role. It's very close to the top of the file:
Is this a pg_dumpall? A \connect later on will reset the
session_replicatio
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> The saga continues. I've reverted to a multi-step process to try and
> figure this out. I create the initial database, then load it from the
> command line psql as follows:
>
> pro-# \set session_replication_role replica;
> pro-# \o db.ou
Hi,
I have problem with deadlocks and don't know why it happens. Below is
the log (postgres 9.0, debian):
[11882]DETAIL: Process 11882 waits for ShareLock on transaction
44324308; blocked by process 11884.
Process 11884 waits for ShareLock on transaction 44324307;
blocked by process 11882
In response to Roman :
> Hi,
> I have problem with deadlocks and don't know why it happens. Below is
> the log (postgres 9.0, debian):
>
> [11882]DETAIL: Process 11882 waits for ShareLock on transaction
> 44324308; blocked by process 11884.
> Process 11884 waits for ShareLock on transact
Other than "It's currently not available", can anyone provide a logical
explanation of why triggers cannot be implemented for SELECT statements, or
rules for SELECT must be DO INSTEAD SELECT?
PostgreSQL was derived from Ingres, and Ingres had a nice auditing feature that
also handled SELECT.
> What about upgrades that can't be derived directly from an inspection
> of the schema? Some examples:
>
> - Adding a NOT NULL constraint (without adding a DEFAULT). You often
> want to precede this with filling in any existing NULL values, so the
> new constraint doesn't fail.
This is an imp
On Fri, 2011-02-11 at 08:35 -0500, Daniel Popowich wrote:
> think no software process can make anyone happy. It's a human
> process: declare someone the owner of the database schema, let them
> own the long term development of the schema, and if anyone needs a
> change, they have to communicat
Hoping someone will be kind enough to share how to write a query that
uses 9.0's string_agg with a subselect, something like...
select
m.id,m.subject,m.from_address,m.date_sent,m.size,string_agg((select
address as to_address from recipient r inner join message_recipient mr
on r.id=mr.recipien
Hi!
I trying to create rule for update notifing:
CREATE OR REPLACE RULE "ttt_NotifyU" AS
ON UPDATE TO "ttt" DO
NOTIFY "ttt", '88';
this work.
But this
CREATE OR REPLACE RULE "ttt_NotifyU" AS
ON UPDATE TO "ttt" DO
NOTIFY "ttt", NEW."id";
don't (syntax error),
NOTIFY "ttt", CAST(NEW."id"
Hello
these queries are different. I checked a string_agg and it working
with me. So I am expecting, so your query has a performance problem
when aggregate function is used.
please, recheck so indexes are used
you can try "set enable_seqscan" to off, maybe set hashagg to off
please, send a execu
26 matches
Mail list logo