On Wed, Oct 16, 2013 at 12:04:53PM +1100, James Sewell wrote:
> Let's say I'm running the following SQL script via psql -f
>
> BEGIN
> \set ON_ERROR_STOP
> SELECT myFunction();
> CREATE TABLE x(id int);
> END;
>
> Is there anything I can do in myFunction which will:
>
> a) Stop execution of the
james.sewell wrote
> Hello all,
>
> Let's say I'm running the following SQL script via psql -f
>
> BEGIN
> \set ON_ERROR_STOP
> SELECT myFunction();
> CREATE TABLE x(id int);
> END;
>
> Is there anything I can do in myFunction which will:
>
> a) Stop execution of the script so that x will not b
Hello all,
Let's say I'm running the following SQL script via psql -f
BEGIN
\set ON_ERROR_STOP
SELECT myFunction();
CREATE TABLE x(id int);
END;
Is there anything I can do in myFunction which will:
a) Stop execution of the script so that x will not be created
b) Not throw an error (return value
On 15.10.2013 03:44, Huang, Suya wrote:
> Thanks Tomas!
>
> However, in the example I sent, I already did a vacuum full right
> after deleted the rows causing problem, before created the index and
> got an error even the table is vacuumed. Note, the table is I
> temporarily created using create t
On 16/10/13 01:56, Tom Lane wrote:
David Johnston writes:
chris smith-9 wrote
Using postgres 8.4.13 (latest that redhat provides in rhel6) the query
below returns an extra row compared to running the same thing in later
versions (tried 9.0, 9.1, 9.2 - they don't return the extra row).
Likel
I have quite the same problem.
When I lauch a vacuumdb, I have an error : ERREUR: en-tĂȘte de page invalide
dans le bloc 39639 de la relation base/16384/599662
With a
SELECT * FROM pg_catalog.pg_largeobject
Result is
ERREUR: en-tĂȘte de page invalide dans le bloc 39639 de la relation
base/163
On 10/15/2013 01:38 PM, Quang Thoi wrote:
I want to roll back deletion if there is a reference (FK) in another
table.
Can I explicitly call a rollback inside a function?
No. Transactions are controlled outside the body of any executing
function. You do have have a couple other options, thoug
On Tue, Oct 15, 2013 at 2:38 PM, Quang Thoi wrote:
> I want to roll back deletion if there is a reference (FK) in another table.
>
>
> Can I explicitly call a rollback inside a function?
>
You should RAISE an error. The transaction should roll back due to the
error.
I want to roll back deletion if there is a reference (FK) in another table.
Can I explicitly call a rollback inside a function?
CREATE OR REPLACE FUNCTION pre_del_prod_proc()
returns trigger as $$
begin
if exists (select 1 from host_config where config_id = OLD.id) then
rollba
ginkgo36 wrote
> But I can not write a function :(. please hepl me.
> For example, I have column "data_text" with data like this:
> Row 1: AUTO; BODY; PREDILUTED; ECD FORM; RABBIT; FORMAT; CHROMOGENIC
> Row 2: ECD FORM; BODY; PREDILUTED; CHROMO-GENIC; AUTO; RABBIT; FORMAT
> Row 3: FORMAT; ECD F
Hi everyone,
Please hepl me this function:
1. I want to sort string follow anphabet and I used this query:
select string_agg(x, ';') from (select
trim(unnest(regexp_split_to_array('ECD FORM; BODY; PREDILUTED; CHROMO-GENIC;
AUTO;RABBIT; FORMAT',';'))) x order by x) a;
-- result: AUTO; BODY; CH
David Johnston writes:
> chris smith-9 wrote
>> Using postgres 8.4.13 (latest that redhat provides in rhel6) the query
>> below returns an extra row compared to running the same thing in later
>> versions (tried 9.0, 9.1, 9.2 - they don't return the extra row).
> Likely this is a bug that was f
Hi Tomas,
Thanks for your response.
Regarding using BYTEA instead of TEXT for binary content, I did a google
search prior sending my first email.
Also, in my first email, I mentioned that I am not convinced this query,
updating a field with pdf content in a table, causing this core dump. The
rea
On 15 October 2013 14:48, Laurentius Purba wrote:
> Kevin,
>
> Thanks for the response. I will look into it based on your suggestion.
I seem to recall there was an optimization issue in llvm that could
cause such behaviour with virtual machines. What I don't recall is
whether the solution was to
chris smith-9 wrote
> Hi all,
>
> Using postgres 8.4.13 (latest that redhat provides in rhel6) the query
> below returns an extra row compared to running the same thing in later
> versions (tried 9.0, 9.1, 9.2 - they don't return the extra row).
>
>
> SELECT *
> FROM numbers
> ORDER BY iterati
Kevin,
Thanks for the response. I will look into it based on your suggestion.
-Laurent
On Mon, Oct 14, 2013 at 8:29 PM, Kevin Grittner wrote:
> Laurentius Purba wrote:
>
> > I did google this error message, "...signal 10: Bus error.." and
> > found the issue with hardware problem, memory.
>
Hi everyone
I'm looking for a way to let a role which created a new database (the
database owner) change (remove) the default access privileges of the
public schema, which allows everyone to use and create objects within
this schema. I do not want to give the role the SUPERUSER option.
17 matches
Mail list logo