WHERE id % 16 = slice
or:
WHERE hashtext(id::text) % 16 = slice
...
and then call your function with the values 1..15 (when using 16 slices)
Use a power of 2 for the number of slices.
It may be faster to use many slices and
this allows to do the job in parallel on a few threads.
oops,
> and then call your function with the values 1..15 (when using 16
it should of course be 0..15
Marc Mamin
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Marc Mamin
> Sent: Donnerstag,
Original message:
De : pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] De la part de Marc Watson
Envoyé : June-11-12 8:36 AM
À : Craig Ringer
Cc : pgsql-general@postgresql.org; dp...@pgadmin.org;
sachin.srivast...@enterprisedb.com
Objet : Re: [GENERAL] Postgres
Hello,
I had a similar question some time ago, with an answer by Tom lane:
http://archives.postgresql.org/pgsql-general/2012-03/msg00023.php
best regards,
Marc Mamin
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sahagian
ew
this may be seen as a nice hint, but in my own opinion
DROP ... IF EXISTS should not throw an error for objects that do not
exist.
A warning would be better here.
This would allow such a code to be error proof:
...
drop table if exists foo;
drop view if exists foo;
...
best regards,
Marc Mamin
the clause "WHERE sid IS NOT NULL and ua IS NULL"
It is quite evident that the second index is better as it allows to
resolve the 2 conditions of the queries,
but this seems to be an issue for the planner that prefers the first
index
beat regards,
Marc Mamin
create table ptes
I've rechecked it on Postgres 9.2 and the issue seems to be fixed by now
:-)
sorry for the spam.
Marc
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Marc Mamin
> Sent: Montag, 1. Oktober 2012
2
> (3 rows)
>
> and
> ## select id from tmpx where id > 0.51119 and id < 0.51120;
> id
> ---
> 0.511193082667887
> 0.511194097343832
> (2 rows)
The range in your second query does not include any of the duplicated
values from your first query.
If you are interested in this technique, then my project, veil:
http://veil.projects.postgresql.org/ , provides tools for building
virtual private databases in Postgres.
Be warned though, this is a difficult thing to do, may have unacceptable
overhead, and may still leave channels open for
Arnold, Sandra osti.gov> writes:
>
> Is anyone using
> NeXpose Rapid 7 to scan your PostgreSQL databases for vulnerbilities? If
> so, what authentication are you using to allow it to connect to your
> database? Or, how are you configuring the software to allow it to connect
> to the databas
,
Marc Balmer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
definitions) causes a server reset.
I will happily provide more information to anyone who wants it and
intend to attach a gdb session to it tomorrow when I will have more time
to investigate the cause.
Thanks.
__
Marc
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
"select * from pg_catalog.pg_settings;")
at postgres.c:986
#14 0x082000c6 in PostgresMain (argc=4, argv=0x83cad18,
username=0x83cacf0 "marc") at postgres.c:3572
#15 0x081d51fc in ServerLoop () at postmaster.c:3207
#16 0x081d5eaa in PostmasterMain (argc=5, argv=0x83c7120) at
p
ramExec 0
:scanrelid 1
}
Seq Scan on file (cost=0.00..707683.30 rows=207562 width=110) (actual
time=103215.145..161153.664 rows=1 loops=1)
Filter: (jobid = 2792)
Total runtime: 161154.734 ms
--
Best regards,
Marc
--
Sent via pgsql-general mailing list (pgsql-general@postgresql
Hi Pavel,
Isn't the text for the Verbose Explain analyze not enough?
Is not, how can i generate it?
--
Best regards,
Marc
Pavel Stehule schreef:
Hello
please, send EXPLAIN ANALYZE output.
regards
Pavel Stehule
2008/8/1 Marc Cuypers <[EMAIL PROTECTED]>:
Hi,
I'm using
Hi Pavel,
Pavel Stehule schreef:
2008/8/1 Marc Cuypers <[EMAIL PROTECTED]>:
Hi Pavel,
Isn't the text for the Verbose Explain analyze not enough?
Is not, how can i generate it?
--
no, I am missing statistics info
try
EXPLAIN ANALYZE SELECT .
regards
I entered the comma
* Ivan Sergio Borgonovo wrote:
> On Fri, 22 Aug 2008 18:34:53 -0600
> "Scott Marlowe" <[EMAIL PROTECTED]> wrote:
>
> > Glad you got your problem resolved. I have to admit I tend to
> > mostly use psql to interact with postgres. Nothing against
> > PGAdmin III, it's good software. I just tend to
Ah, ok. I somehow missed the first line of the message an the rest of it
left the impression that "something" must be wrong with replication.
I guess one of my colleagues might have shut down the database by
accident and forgot to tell me.
Anyway, thanks for your reply.
Marc
Alva
Yes, 'warm standby' was what I intended to write. This must have been
some kind of wishful thinking. ;)
But I'd really appreciate 'hot standby' in a future version of postgres.
Marc
Merlin Moncure wrote:
> On Tue, Nov 4, 2008 at 5:50 AM, Marc Schablewski <[EMAI
o new WAL for a couple of days, but
that would seem a bit strange. I'd expect postgres to wait forever if it
is not told to wake up from recovery mode manually. The manual's
"Recovery Settings" section didn't help either. I'm not sure if it is a
bug, at least it's
Due to a server issue we needed a reinstallation of Ubuntu along with a
downgrade to Ubuntu Hardy.
So this is what we did:
- copied all from /var/lib/postgresql/8.4/main/ to the new server
/var/lib/postgresql/8.3/main/
- edited /var/lib/postgresql/8.3/main/postmaster.opts to correct the path
Hi,
can we safely put the data from /var/lib/postgresql/8.4/main/ of server x to
/var/lib/postgresql/8.3/main/ of server y, considering that the new target
machine is running 8.3 whereas the old one ran 8.4 ?
Rgards
Marc
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
I managed to install again postgresql-8.4 from hardy-backports.
Now the installation is identical with the previous one.
With the fresh database, the server starts up fine.
Now I copied all from the backup to
/usr/lib/postgresql/8.4
/var/lib/postgresql/8.4
The the startup fails like this:
* S
Hi,
can we safely put the data from /var/lib/postgresql/8.4/main/ of server x to
/var/lib/postgresql/8.3/main/ of server y, considering that the new target
machine is running 8.3 whereas the old one ran 8.4 ?
Rgards
Marc
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
Hello,
Looking at the TODO List, I feel that only some aspects of the COPY FROM
command are adressed.
Could a discussion trigger some activity on this topic :o) ?
Best regards,
Marc Mamin
Here my wish list:
COPY tablename [ ( column [, ...] ) ]
FROM { 'filename' | STDIN }
EATE TABLE a1 (CONSTRAINT a1_a_check CHECK ((a = 1))
)
INHERITS (test);
CREATE TABLE a2 (CONSTRAINT a2_a_check CHECK ((a = 2))
)
INHERITS (test);
CREATE TABLE a3 (CONSTRAINT a3_a_check CHECK ((a = 3))
)
INHERITS (test);
Everything is empty…
marc=# SHOW constraint_exclusio
RETURNS refcursor AS $$
BEGIN
OPEN outputcursor FOR
select * from factordata where groupid = groupid_in;
RETURN outputcursor;
END;
$$ LANGUAGE plpgsql;
cheers.
Marc
or my
problem, so will definitely study the docs.
cheers
marc
On Wed, Apr 7, 2010 at 3:43 PM, Merlin Moncure wrote:
> On Tue, Apr 6, 2010 at 9:58 PM, Marc Menem wrote:
> > Hi all,
> >
> > I'm trying to use a cursor returned by a function from another function.
> But
Hello,
SET default_tablespace is not really usefull for cases where data and
indexes should be splitted on different tablespaces.
Having an additional default_index_tablespace parameter would hence be
nice.
best regards,
Marc Mamin
.
I've evaluated it to implement a clustered Postgres environment, but
gave it up due to the poor performances.
Still waiting for the binary transfer before the next try ;-)
reagrds,
Marc Mamin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
;t really understand where all the time get lost in the
example I posted a few weeks ago:
http://archives.postgresql.org/pgsql-general/2011-09/msg00436.php
Marc Mamin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Le Thu, 8 Dec 2011 12:27:22 +,
Simon Riggs a écrit :
> On Thu, Dec 8, 2011 at 11:24 AM, Craig Ringer
> wrote:
>
> > Areas in which Pg seems significantly less capable include:
>
> Please can you explain the features Oracle has in these area, I'm not
> clear. Thanks.
Maybe I can answer fro
Le Thu, 8 Dec 2011 09:29:28 -0600,
Merlin Moncure a écrit :
> On Thu, Dec 8, 2011 at 9:11 AM, Marc Cousin
> wrote:
> > Le Thu, 8 Dec 2011 12:27:22 +,
> > Simon Riggs a écrit :
> >
> >> On Thu, Dec 8, 2011 at 11:24 AM, Craig Ringer
> >>
Le Thu, 8 Dec 2011 16:27:56 +,
"Nicholson, Brad (Toronto, ON, CA)" a écrit :
> On Thu, Dec 8, 2011 at 9:11 AM, Marc Cousin
> > > wrote:
> >
> > I wish it was the same (I use and like both pgbouncer and pgpool
> > too, and they do a good job, I'
Le Thu, 8 Dec 2011 17:54:20 +0100,
"Tomas Vondra" a écrit :
> On 8 Prosinec 2011, 16:11, Marc Cousin wrote:
> >> > - admission control, queuing and resource limiting to optimally
> >> > load a machine. Some limited level is possible with external
> >&
Le Thu, 8 Dec 2011 18:02:51 +0100,
"Tomas Vondra" a écrit :
> On 8 Prosinec 2011, 17:11, Marc Cousin wrote:
> > Le Thu, 8 Dec 2011 09:29:28 -0600,
> >> >> > - admission control, queuing and resource limiting to
> >> >> > optima
Le Thu, 8 Dec 2011 10:56:39 -0600,
Merlin Moncure a écrit :
> On Thu, Dec 8, 2011 at 10:11 AM, Marc Cousin
> wrote:
> > Le Thu, 8 Dec 2011 09:29:28 -0600,
> > Merlin Moncure a écrit :
> >
> >> On Thu, Dec 8, 2011 at 9:11 AM, Marc Cousin
> >> wrote
On Thursday 08 December 2011 18:34:35 Tomas Vondra wrote:
> On 8 Prosinec 2011, 18:14, Marc Cousin wrote:
> >> > It means you keep your session variables, your prepared
> >> > statements,
> >> > your running transaction, etc… in each individual sessi
ain the features Oracle has in these area, I'm
> > not clear. Thanks.
> >
> Marc has, as I was hoping, done so much better than I could. Most of
> what I know is 2nd hand from Oracle users - I'm not one myself.
>
> It's interesting to see the view that the reso
Hello,
If I call analyze 2 times, e.g.
analyze mytable (column_a, column_b);
analyze mytable (column_a, column_c);
then I will loose statisics on column_b.
correct ?
many thanks,
Marc Mamin
PDATEs (hence with a
non unique index on id).
Then regularily flush table C content to table A, in order to only have
recent changes in C.
Your query should then query both tables:
SELECT A. table_b_rowcount + coalesce(sum(C.table_b_delta_rowcount))
FROM A LEFT OUTER JOIN B on (A.id=B.id)
WHERE A
t
annoying noise ?
For the case when this simplification is fine, I'd suggest to add a
description on this possible tsvector representation to the doc.
best regards,
Marc Mamin
at once to a temp table using
regexp_split_to_table,
then update with your IDs, and aggregate back to the desired form.
regards,
Marc Mamin
> Thanks in advance
> Doug
>
> I'm currently cursoring thru the input rows, and then converting the string
> to rows using 1st array_
7;))foo
$$
language sql;
select trim(r,'\\(\\)') from get_record () r;
regards,
Marc Mamin
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Misa Simic
Sent: Montag, 6. Februar 2012 19:52
To: Andrus
Cc: pgsql-general@postgr
lways about the primary key.
Can I rely on that or should I expect the exception order being random ?
Thanks,
Marc Mamin
f you didn't install to the system drive. You can
work around both issues, though, by doing the setup without running
initdb and calling initdb manually afterwards.
Marc
Raymond O'Donnell wrote:
> On 15/12/2008 13:03, Grzegorz Jaśkiewicz wrote:
>
>> unless you want to do it
= COALESCE( b.actual_target_network_id,
b.requested_target_network_id )
depending on the fraction of rows that are already up to date, the might
fasten your process quite a lot...
Hope To Help,
Marc Mamin
From: pgsql-general-ow...@postgresql.org
ns do not reduce
the number of updated rows significantly...
cheers,
Marc
From: Herouth Maoz [mailto:hero...@unicell.co.il]
Sent: Wednesday, January 21, 2009 12:50 PM
To: Marc Mamin
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Slow update
Marc
...
HTH,
Marc Mamin
-Original Message-
From: pgsql-general-ow...@postgresql.org on behalf of Scara Maccai
Sent: Fri 1/30/2009 1:45 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] complex custom aggregate function
Gregory Stark wrote:
> From what I read of your
> descr
Oops,
I meant
group by floor(h_q-x)
instead of
group by (h_q-x)/1
Marc Mamin
> select H,A
> FROM
> (
> select min(h_q) as H, avg(x) as A
> group by h_q/1
> union all
> select min(h_q), avg(x)
> group by (h_q-0.25)/1
> union all
> select min(h_q), avg(x)
&
You are using old-style function declaration where the function body is
given as a string enclosed in '. You have to escape all ' inside the
body by doubling them. As an alternative, you can use $$ as the begin
and end markers of your function body instead of the ' then you don't
need to escape.
E
Hello,
you can first pipe the output of pg_dump to a compression tool:
pg_dump. | gzip > file.
instead of gzip, I'm using pigz which is faster thanks multithreading.
HTH,
Marc Mamin
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql
eplies with:
ERROR: encoding UTF8 does not match server's locale en_US
DETAIL: The server's LC_CTYPE setting requires encoding LATIN1.
** Error **
ERROR: encoding UTF8 does not match server's locale en_US
SQL state: XX000
Detail: The server's LC_CTYPE setting re
Thanks Tom,
Tom Lane schreef:
Marc Cuypers writes:
Databases in 7.4 were encoded as utf-8. Now when importing postgresql
gives the following error:
ERROR: encoding UTF8 does not match server's locale en_US
DETAIL: The server's LC_CTYPE setting requires encoding LATIN1.
It
Thanks Clemens,
Schwaighofer Clemens schreef:
On Wed, Mar 11, 2009 at 19:01, Marc Cuypers wrote:
Thanks Tom,
Only...
One database was in LATIN9. When creating this database i got the same
error.
Command:
CREATE DATABASE "hardsoft" WITH OWNER = postgres TEMPLATE = template
Gregory Stark schreef:
Marc Cuypers writes:
Error:
ERROR: encoding LATIN9 does not match server's locale nl_BE.utf8
SQL state: XX000
Detail: The server's LC_CTYPE setting requires encoding UTF8.
Can i only use nl_BE and UTF-8 now?
Why can't i use LATIN9 anymore?
Is bacula
USING gin(to_tsvector('ltitem',
ltree2text(path)));
Finally using both ltree and full text search would provides a very
powerfull framework for path analysis where a node is not only a single
reference,
but a combination of some pieces of information :-)
And a last question: the alias b
Hello,
There is also a funny approach here with custom operators and variables
that could be adapted to build a rownum functioanlity in functions
(look for Vladimir)
http://archives.postgresql.org/pgsql-hackers/2008-11/msg00048.php
not very clean, but apparently fast
Marc Mamin
o the given error. After some requests, your webserver will spawn new
child processes while others die and those new processes connect to the
new database. To solve this, you should restart your application as well.
Marc
Iv Ray wrote:
> We are using PostgreSQL for more than 5 years by now and at l
t the number of dead tuples without actually doing a
vacuum?
Thanks.
__
Marc Munro
signature.asc
Description: This is a digitally signed message part
Thanks to both Elein and Tom. pgstattuple (and dbsize) from contrib
gave me exactly what I wanted. The statistics views give me something
extra.
__
Marc
signature.asc
Description: This is a digitally signed message part
pg_autovacuum -I -N .\winUsr -W winPwd U postgresUsr P postgresPwd
Anybody has experienced something similar?
I've tried with version 8.0.1 and above.
Marc Soleda
Correo Yahoo!Comprueba qué es nuevo, aquíhttp://correo.yahoo.es
| 9422 | 5987 | ExclusiveLock |5754
(55 rows)
All responses will be welcomed.
__
Marc
signature.asc
Description: This is a digitally signed message part
It's doing something in slony. Part of the initial sync operation I
guess. I guess it must be doing an alter table or reindex or something.
I don't understand why though.
I'll repeat my question on the slony mailing list. Thanks for the
response.
__
Marc
On Fri, 2005-06-10
8856359, 938856359
"template0",427, 427
All responses welcomed.
__
Marc Munro
signature.asc
Description: This is a digitally signed message part
hanks.
__
Marc Munro
signature.asc
Description: This is a digitally signed message part
here and don't expect definitive answers.
That's why I was a little vague.
Am I right though, in thinking that a reload shuold be pretty much
invisible to the client, or will certain operations fail and require a
re-try?
__
Marc
On Fri, 2005-09-16 at 14:40 -0600, Michael Fuhr wrote:
&
Michael,
Many thanks for your response; it is much appreciated. My responses are
embedded below:
On Fri, 2005-09-16 at 17:10 -0600, Michael Fuhr wrote:
> On Fri, Sep 16, 2005 at 02:16:29PM -0700, Marc Munro wrote:
> > It is Postgres 7.3.6. The client is a multi-threaded C++ cli
Tom,
Thanks for this. I am going to push for reproducing the problem in a
test environment. If I have any success, I will follow up with results
and more details.
__
Marc
On Sat, 2005-09-17 at 01:23 -0400, Tom Lane wrote:
> Michael Fuhr <[EMAIL PROTECTED]> writes:
> > On Fri,
Brew,
Yep we tried that. It did nothing. The same pg_hba.conf change worked
when we later tried it with the client disconnected.
__
Marc
> Date: Fri, 16 Sep 2005 21:36:01 -0400 (EDT)
> From: [EMAIL PROTECTED]
> To: pgsql-general@postgresql.org
> Subject: Re: pg_ctl reload break
://veil.projects.postgresql.org/
__
Marc
> Date: Thu, 29 Sep 2005 10:36:23 +0700
> From: David Garamond <[EMAIL PROTECTED]>
> To: pgsql-general@postgresql.org
> Subject: Setting up a fine-grained permission system
> Message-ID: <[EMAIL PROTECTED]>
>
> Hi,
>
&
changing part-way through a transaction. Veil goes
to considerable trouble to deal with this. If this is not a concern for
you, you may be able to do something simpler but you would have to
perform extra locking on assignment.
Feel free to take whatever you can from Veil.
__
Marc
> Date: Sun,
d
would like to hear your response to the above.
Thanks.
__
Marc
On Mon, 2005-10-17 at 20:38 +0400, Nikolay Samokhvalov wrote:
> IMHO, Veil is very strange project. Instead of concentrating on good
> support of updatable views, developers are trying to reinvent the
> wheel. Actually,
don't have to
reconstruct the original tuple from rollback in order to retrieve it,
making selects faster, and you don't have to write rollback data, making
writes faster.
> I have not a good knowledge of PG internal mechanism, I hope that my
> questions are clear enough...
>
Yep. I hope the answers were too.
> Florian
>
__
Marc
signature.asc
Description: This is a digitally signed message part
t a better solution. I have seen talk of
disabling the standard slony triggers to allow this sort of thing but
whether that is more or less nasty is questionable.
Good luck
__
Marc
On Wed, 2005-11-02 at 12:18 -0400, [EMAIL PROTECTED]
wrote:
> Date: Wed, 2 Nov 2005 12:06:36 + (GMT)
&
On Wed, 02 Nov 2005 19:29:10 -0800, you wrote:
>It's a migration thing - MySQL prevented this
>situation due to the way it handles auto_increment (it will never assign
>you an id that already exists).
AFAIK, in mysql, if you modify a serial by setting it to the max value for
this type, mysql wi
e case with recent versions of mysql, but that's
what I discovered while testing a web application.
Just to say that even mysql has its problems when a user plays with serial PK.
--
Marc
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
As we're talking about fsm, I've got a question I've been asking myself for
some time :
If a cluster is restarted, is the fsm forgotten ? (so does it mean one should
run a vacuum as soon as the database is restarted ?)
Le Dimanche 06 Novembre 2005 03:44, Carlos Oliva a écrit :
> Should I set the
p_id_fkey" FOREIGN KEY (sdp_id) REFERENCES sdps(id) ON DELETE
RESTRICT
Triggers:
audit_log_delete_trigger BEFORE DELETE ON audit_logs FOR EACH ROW EXECUTE
PROCEDURE audit_log_delete_restrict()
Does anybody have a suggestion about how to debug this?
Thanks in advance - Marc
--
On Tue, 19 Sep 2006, Tom Lane wrote:
Marc Evans <[EMAIL PROTECTED]> writes:
... I have a table with about 15000 records in it, which I
would like to add a new column to. The alter command shows success.
However, testing inserts reveals that the data for the new column is never
stored.
On Tue, 19 Sep 2006, Tom Lane wrote:
Marc Evans <[EMAIL PROTECTED]> writes:
On Tue, 19 Sep 2006, Tom Lane wrote:
What do you mean by that exactly? The example you showed seems to be
doing just what it's supposed to.
In the failure mode, the source_record column always has the
On Tue, 19 Sep 2006, Tom Lane wrote:
Marc Evans <[EMAIL PROTECTED]> writes:
On Tue, 19 Sep 2006, Tom Lane wrote:
What insert command is being issued exactly, and from what source? I'm
speculating about issues like stale plans or metadata caches, but you're
not providing
On Tue, 19 Sep 2006, Tom Lane wrote:
Marc Evans <[EMAIL PROTECTED]> writes:
On Tue, 19 Sep 2006, Tom Lane wrote:
Hmph. You got any ON INSERT triggers or rules on that table? I can't
think of anything else that would interfere with data getting stored.
No INSERT triggers.
On Tue, 19 Sep 2006, Tom Lane wrote:
Marc Evans <[EMAIL PROTECTED]> writes:
Any suggested tricks for seeing additional debug information or even
roaming through gdb, to try to figure this out?
Is the problem reproducible enough that you can watch it under gdb?
In that case it should
ion of the
application programmers, which I'd ideally like to avoid.
Any suggestions?
- Marc
---(end of broadcast)---
TIP 6: explain analyze is your friend
the TODO list?
__
Marc
signature.asc
Description: This is a digitally signed message part
ssion memory and so determining whether the connected
user can see row x requires no extra fetches from the database.
__
Marc
signature.asc
Description: This is a digitally signed message part
On Mon, 2006-06-11 at 22:27 +0100, Alexander Staubo wrote:
> On Nov 6, 2006, at 21:00 , Marc Munro wrote:
>
> > For an alternative approach, you might want to check out Veil:
> > http://pgfoundry.org/projects/veil
>
> Addendum: I took Veil to be undocumented since the
, routine maintenance tasks, etc. The work location is San Jose, CA,
though tele-commuting may be arranged for the right person. If you or
someone that you know would be interested, I would be happy to make
introductions.
- Marc
---(end of broadcast
so consider whether
access to the underlying catalogs is allowed (making it impossible for
one client to infer the existence of another may be important to you).
__
Marc
signature.asc
Description: This is a digitally signed message part
of many ON INSERT TO foobars WHERE xxx
constructs, but am trying to be a bit more maintainable than having each
of the where clauses hard-defined. Any suggestions?
Thanks in advance - Marc
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On Thu, 7 Dec 2006, Marc Evans wrote:
Hello -
I find myself trying to find a way to have the table name used with the
insert command be generated on the fly in a rule. For example, consider the
following:
create table foobars (
id bigserial,
created_at timestamp not null,
name
end;
$$ language plpgsql;
create rule foobars_insert as on insert to foobars
do instead select foo_insert(NEW);
The key to my success for the above is to find a way for NEW to be used
something like the pseudo code shown. Suggestions?
- Marc
---(end of broadcast)--
> t4 134 nullnull True
> 3
>
> but this extra column would be redundant with the nulls bitmap. Is
> there a way to avoid this duplication of information ?
>
>
> - is there a performance gain at all when columns that are seldom used
> are placed at the end of the rows ?
>
>
> - I 'll also be thankful for any comments and critics on my model.
>
>
>
> cheers,
>
> Marc
h '||rec.m;
End loop;
END;
Return 0;
...
Cheers,
marc
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, December 12, 2006 5:39 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] resetting sequence to cur max value
from
(select distinct on (f.ownerid, p.factory_id)
f.ownerid,factory,atime
from factories f,products p
where p.factory_id=f.id
order by f.ownerid, p.factory_id, atime
)foo
order by foo.ownerid, foo.atime
Cheers,
Marc
---(end of broadcast)--
RROR: NEW used in query that is not in a rule
CONTEXT: SQL statement "SELECT NEW.magic"
How can I get the value of NEW.{column_name} (aka NEW.magic in this
specific test case) into the variable data?
For completeness, I am using version 8.2.0.
Thanks in advance - Marc
On Wed, 13 Dec 2006, Erik Jones wrote:
Marc Evans wrote:
Hi -
I am struggling with a trigger function in plpgsql, and am hoping that
someone on this list can't show me a way to do what I need.
In the trigger, TG_ARGV[0] is the name of a column that I want to evaluate.
This code show
On Wed, 13 Dec 2006, Erik Jones wrote:
Marc Evans wrote:
On Wed, 13 Dec 2006, Erik Jones wrote:
Marc Evans wrote:
Hi -
I am struggling with a trigger function in plpgsql, and am hoping that
someone on this list can't show me a way to do what I need.
In the trigger, TG_ARGV[0] i
27;t catch exceptions, is
there a language that can be used?
Thanks in advance - Marc
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
201 - 300 of 797 matches
Mail list logo