Hello,
I'm creating a database and I have got a table with a "version" field.
Can I update on structure changes (DDL) like create / update table
increment this field automatically?
I would like to create a versionizing for my database which counts the changes.
IMHO I need a trigger, which is r
Il 10/06/2013 04:19, Jeff Janes ha scritto:
On further thought, that is not strange at all. You have two very
selective join conditions, and the planner assumes they are independent, so
that it can multiply the selectivities. But in reality they are completely
(or almost completely) dependent.
高健 wrote:
> CREATE OR REPLACE Function ...
> BEGIN
> BEGIN
> UPDATE ...
> COMMIT;
> EXCEPTION
> WHEN OTHERS THEN
> END;
> END;
> But when I select the table again, I found it not changed.
> Anybody know the reason, maybe there are some wrong way by
> which I use the cursor.
Gustavo Amarilla Santacruz wrote:
> In the PostgreSQL documentation I found "currval: Return the value most
> recently obtained by nextval
> for this sequence in the current session "
>
> In other documentations (pgpool, for example), I found "Connection Pooling
> pgpool-II saves connections
From: Michael Paquier [mailto:michael.paqu...@gmail.com]
Sent: Thursday, June 06, 2013 7:01 PM
To: David Greco
Cc: John R Pierce; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Trouble with replication
On Thu, Jun 6, 2013 at 9:19 PM, David Greco
mailto:david_gr...@harte-hanks.com>> wrote
On Sun, Jun 9, 2013 at 10:59 AM, Gustavo Amarilla Santacruz
wrote:
> Hello, all.
>
> In the PostgreSQL documentation I found "currval: Return the value most
> recently obtained by nextval for this sequence in the current session "
>
> In other documentations (pgpool, for example), I found "Con
Thank you very much, Laurenz Albe.
On Mon, Jun 10, 2013 at 9:21 AM, Albe Laurenz wrote:
> Gustavo Amarilla Santacruz wrote:
> > In the PostgreSQL documentation I found "currval: Return the value most
> recently obtained by nextval
> > for this sequence in the current session "
> >
> > In oth
Thank you, Merlin Moncure.
On Mon, Jun 10, 2013 at 10:13 AM, Merlin Moncure wrote:
> On Sun, Jun 9, 2013 at 10:59 AM, Gustavo Amarilla Santacruz
> wrote:
> > Hello, all.
> >
> > In the PostgreSQL documentation I found "currval: Return the value most
> > recently obtained by nextval for this se
On Mon, Jun 10, 2013 at 11:24 AM, Gustavo Amarilla Santacruz <
gusama...@gmail.com> wrote:
> Thank you, Merlin Moncure.
>
>
> On Mon, Jun 10, 2013 at 10:13 AM, Merlin Moncure wrote:
>
>> On Sun, Jun 9, 2013 at 10:59 AM, Gustavo Amarilla Santacruz
>> wrote:
>> > Hello, all.
>> >
>> > In the Postgr
Kevin Grittner wrote on 10.06.2013 15:19:
It has nothing to do with the way you are using the cursor; your
problem is that you are causing an error by attempting to COMMIT
inside a function (which is not allowed). This rolls back the
subtransaction defined by the BEGIN/EXCEPTION block. You then
Thomas Kellerer wrote:
> Kevin Grittner wrote on 10.06.2013 15:19:
> >It has nothing to do with the way you are using the cursor; your
> >problem is that you are causing an error by attempting to COMMIT
> >inside a function (which is not allowed). This rolls back the
> >subtransaction defined by t
pg 9.2:
delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www
Scott Ribe writes:
> pg 9.2:
> delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';
"11825657and" is not any more lexically ambiguous than "11825657+".
It has to be two separate tokens, and that's how it's read.
regards, tom lane
--
Sent via pgsql-gene
Scott Ribe writes:
> On Jun 10, 2013, at 12:52 PM, Tom Lane wrote:
>> "11825657and" is not any more lexically ambiguous than "11825657+".
>> It has to be two separate tokens, and that's how it's read.
> But it's not read correctly.
[ shrug... ] Works for me. You want to put together a self-con
On Jun 10, 2013, at 12:52 PM, Tom Lane wrote:
> Scott Ribe writes:
>> pg 9.2:
>> delete from "ExternalDocument" where id = 11825657and "Billed" = 'f';
>
> "11825657and" is not any more lexically ambiguous than "11825657+".
> It has to be two separate tokens, and that's how it's read.
But it's n
Hi,
I am using 9.2. The documentation says that there is no support for updatable
view. It suggesting to use the triggers or rule. Can somebody paste the sample
code for the same.
Thanks,
Sajeev
On 06/10/2013 12:52 AM, Philipp Kraus wrote:
Hello,
I'm creating a database and I have got a table with a "version" field.
Can I update on structure changes (DDL) like create / update table
increment this field automatically?
I would like to create a versionizing for my database which counts the
On 6/10/2013 12:52 AM, Philipp Kraus wrote:
I'm creating a database and I have got a table with a "version" field.
Can I update on structure changes (DDL) like create / update table
increment this field automatically?
I would like to create a versionizing for my database which counts the
change
Hello,
I want to insert new values into target table 'a' from source table 'b', and
then update table 'b' with ids from table 'a', somewhat like:
CREATE TABLE a(id SERIAL, name TEXT);
INSERT INTO a (name) VALUES('Jason');
INSERT INTO a (name) VALUES('Peter');
CREATE TABLE b(row_id serial, id INT
If you're just replicating the data from table A into table B, why does it need
its own ID number? Wouldn't the table A ID suffice?
I'd recommend using the following:
CREATE TABLE b AS ( SELECT * FROM a );
This way, you only define the columns and insert the data once, then let
Postgres do the
Thanks,
However I am not just replicating data from 'a' to 'b', I provided simplified
example, in reality table 'b' keeps data which are going to be merged into 'a',
some rows will be updated, some added. There is some other work has to be done
on 'b' before merging into 'a' and that work relies
We use this system for versioning:
http://pyrseas.wordpress.com/2011/02/18/sql-database-version-control-%E2%80%93-depesz-versioning/
Works like a champ.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpre
On Tue, Jun 11, 2013 at 3:32 AM, Sajeev Mayandi wrote:
> Hi,
>
> I am using 9.2. The documentation says that there is no support for
> updatable view. It suggesting to use the triggers or rule. Can somebody
> paste the sample code for the same.
>
> Very well summarized by Craig on SO with links
Hi,
I have some Oracle Packages and some standalone procedure in Oracle schema. As
we are converting our application as PostgreSQL compliant we are looking at
these Oracle objects. These packages have no variables declared and consist of
a few stored procedures. Please suggest a good approach to
Hello
2013/6/11 Panneerselvam Posangu :
> Hi,
>
> I have some Oracle Packages and some standalone procedure in Oracle schema.
> As we are converting our application as PostgreSQL compliant we are looking
> at these Oracle objects. These packages have no variables declared and
> consist of a few st
Perhaps someone with a spare server floating around could install Ubuntu
LTS and run some pg-bench benchmarks with the various kernel options?
Like you, I'd have to stick to official updates for production systems.
-Toby
On 07/06/13 15:36, Nikhil G Daddikar wrote:
Folks,
This is bad news as
26 matches
Mail list logo