On Fri, Jan 16, 2009 at 9:32 PM, Vincent Predoehl
wrote:
> Does postgresql have a system table that has the table structure of user
> tables, like systables and sysobjects in MS SQL Server?
There's the pg_* views and tables that have all of that, and to see
how they work, you can run psql -E and
Hi,
Can anyone comment on the practicality of using the code for array_agg
from the dev repos, file src/backend/utils/adt/array_userfuncs.c in 8.3 as
a user defined function? It looks like this code was recently added, Nov
13th/14th. There are two functions, array_agg_transfn and
array_agg_f
I'm using python and can execute standard "select,update,delete,functions".
What I'd like to do is execute a sql script (a text file). But I don't know
how?
Some thing like:
import psycopg2
import psycopg2.extensions
conn = psycopg2.connect("host=%s dbname=%s user =%s password
=%s "
Does postgresql have a system table that has the table structure of
user tables, like systables and sysobjects in MS SQL Server?
--
Vincent
Tom Lane wrote:
> What is happening is that autovacuum_do_vac_analyze contains
>
> old_cxt = MemoryContextSwitchTo(AutovacMemCxt);
> ...
> vacuum(vacstmt, relids);
> ...
> MemoryContextSwitchTo(old_cxt);
>
> and at the time it is called by process_whole_db, CurrentM
That is almost too simple ;-)
Thanks for the suggestion,
Leif
- "Christopher Browne" wrote:
> On Fri, Jan 16, 2009 at 9:18 PM, Leif Jensen
> wrote:
> > You are perfectly right, master is 32bit and slave is 64bit. I
> didn't even consider that that would matter when "just" copying
On Fri, Jan 16, 2009 at 9:18 PM, Leif Jensen wrote:
> You are perfectly right, master is 32bit and slave is 64bit. I didn't even
> consider that that would matter when "just" copying the data. First I was
> using different versions on the two boxes, but ended up installing 8.3.5 on
> both of t
You are perfectly right, master is 32bit and slave is 64bit. I didn't even
consider that that would matter when "just" copying the data. First I was using
different versions on the two boxes, but ended up installing 8.3.5 on both of
them.
How do I install a 32bit PostgreSql on my 64bit (lin
Hi,
I'm looking for a trigger (any language) that can clone the inserted
row and insert it in another postgres server elsewhere. Is this
possible? Practical? Thoughts?
I know there are some replication systems out there, but I'm hoping a
simple trigger will suffice since I only need to clone one
Hello,
seems like the usenet gateway is down again (my last successful
contact to news.postgresql.org dates back 10 days).
Is this a known problem?
Rainer
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mail
On Jan 16, 2009, at 9:49 AM, Glyn Astill wrote:
Hi chaps,
I've got a question about inheritance here, and I think I may have
gotten the wrong end of the stick as to how it works, or at least
when to use it.
What I intended to do was have a schema "audit" with an empty set of
tables in
I wrote:
> ... and you've seemingly not managed to install the debug symbols where
> gdb can find them.
But never mind that --- it turns out to be trivial to reproduce the
crash. Just create a database, set its datfrozenxid and datvacuumxid
far in the past (via a manual update of pg_database), en
Tom Lane wrote:
#1 0xb7c37811 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7c38fb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0x0828cdf3 in ExceptionalCondition ()
#4 0x082a8cd2 in MemoryContextAlloc ()
#5 0x082a8d67 in MemoryContextStrdup ()
#6 0x0829749c in database_getflat
Justin Pasher wrote:
> Dang it. I wonder why the --enable-debug option doesn't seem to actually
> be enabling debug. :( For reference, here is the configure command that
> the package uses according to the config.log (in case you spot anything
> wrong).
Maybe the executable is getting strip
Tom Lane wrote:
Justin Pasher writes:
I recompiled from the Debian source package and added --enable-cassert
(--enable-debug was already there). I replaced the Debian standard
packages with the recompiled versions and started up the cluster. Now it
is hitting a failure on one of the assert
Leif Jensen writes:
>So far I don't get any errors, but when I start postgres on the slave (I'm
> using pg_ctl), I get the error 'FATAL: incorrect checksum in control file'.
>Both servers are running PostgreSQL-8.3.5, configured with exactly the
> same options (just prefix and ssl).
M
Justin Pasher writes:
> I recompiled from the Debian source package and added --enable-cassert
> (--enable-debug was already there). I replaced the Debian standard
> packages with the recompiled versions and started up the cluster. Now it
> is hitting a failure on one of the assert lines, and t
David Wilson wrote:
On Fri, Jan 16, 2009 at 3:27 PM, Jason Long
wrote:
I just tried it by sending text only instead of text and html. We will see
if it goes through this time.
Other than that do you see anything weird about my email?
Still nothing. Do you have webspace you could pla
Hi Guys,
I'm trying to set up a warm standby server, but have problems with running
it on the backup. I feel that I have done like the documentation says:
The WAL is being copied to the slave using rsync.
Doing SELECT pg_start_backup(); (in psql)
Copying the data directory to the
Tom Lane wrote:
I read it like this:
#0 0x0827441d in MemoryContextAlloc () <-- real
#1 0x08274467 in MemoryContextStrdup ()<-- real
#2 0x0826501c in database_getflatfilename () <-- real
#3 0x0826504e in database_getflatfilename () <-- must be write_database_file
#4 0x08
You're not going to get anywhere using Postgres for this kind of task.
Especially if you have millions of products like we do in our database.
We switched to using Solr for our search indexing and querying. It's
way faster than Postgres for obtaining counts like you need. We still
fetch the
On Fri, Jan 16, 2009 at 3:27 PM, Jason Long
wrote:
> I just tried it by sending text only instead of text and html. We will see
> if it goes through this time.
> Other than that do you see anything weird about my email?
Still nothing. Do you have webspace you could place it on? If not, you
coul
Scott Marlowe wrote:
On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote:
On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote:
I have not looked into the detail of the explain, and I do see visually
that very different plans are being chosen.
It would help to share these pl
Scott Marlowe wrote:
Weird. I wonder if the attachment is too big and the mailing list
server is chopping it off of the email.
I just tried it by sending text only instead of text and html. We will
see if it goes through this time.
Other than that do you see anything weird about my email?
Weird. I wonder if the attachment is too big and the mailing list
server is chopping it off of the email.
On Fri, Jan 16, 2009 at 1:19 PM, Jason Long
wrote:
> Scott Marlowe wrote:
>
> On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote:
>
>
> On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote:
"Scott Marlowe" writes:
> The order doesn't matter. Analyze doesn't know anything about the
> indexes, it knows about the fields / tables. I.e. if you run analyze,
> then create the index, you get the same basic result as if you create
> the index then run analyze.
There is an exception to that
On Fri, Jan 16, 2009 at 8:47 AM, Bruno Lavoie wrote:
> Hello,
>
> are these statements true:
Got interrupted by a coworker... The other two questions:
> «Create an index if you frequently want to retrieve less than about ~15% of
> the rows in a large table»
PostgreSQL tends to switch to seq sc
On Fri, Jan 16, 2009 at 8:47 AM, Bruno Lavoie wrote:
> Hello,
>
> are these statements true:
>
> «You should always index fks. The only exception is when the matching unique
> or primary key is never updated or deleted» ?
No. If the table that fks to another table has 10 rows and will never
have
On Thu, Jan 15, 2009 at 11:04 PM, Jeff Davis wrote:
> On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote:
>> >
>> > > I have not looked into the detail of the explain, and I do see visually
>> > > that very different plans are being chosen.
>> > >
>> >
>> > It would help to share these plans with
On Fri, 2009-01-16 at 13:37 -0500, Martin Gainty wrote:
> good idea although tweaks to geqo_pool_size, geqo_generations, and
> geqo_selection_bias will affect all queries
Only queries that invoke GEQO.
Regards,
Jeff Davis
--
Sent via pgsql-general mailing list (pgsql-general@postgresql
On Fri, 2009-01-16 at 12:35 -0600, Jason Long wrote:
> The schema is not auto generated. It evolved as I created my
> inventory system.
> It is relatively easy for humans to understand. Or at least for me
> since I wrote it.
On second look, there aren't that many tables. There are just a lot o
Jeff Davis wrote:
On Fri, 2009-01-16 at 08:43 -0600, Jason Long wrote:
The numbers in the table names are due to hibernate generating the
query.
Well, that's what auto-generated schemas and queries do, I guess.
The schema is not auto generated. It evolved as I created my inventor
good idea although tweaks to geqo_pool_size, geqo_generations, and
geqo_selection_bias will affect all queries
For larger and unwieldy queries you might want to look at breaking the queries
down to smaller pieces e.g.
Break each statement to 2 tables with 1 join (preferrably inner join with
US
On Fri, 2009-01-16 at 08:43 -0600, Jason Long wrote:
> The numbers in the table names are due to hibernate generating the
> query.
Well, that's what auto-generated schemas and queries do, I guess.
> Now we are getting somewhere.
> Someone suggested tweaking the genetic algorithm parameters.
> H
David Fetter writes:
> Basically, there is no way I've found so far to qualify any window
> function in the target list, which makes a giant POLA violation.
The FM points out in at least two places that window functions logically
execute on the output of the WHERE/GROUP BY/HAVING steps. It's
co
On Fri, Jan 16, 2009 at 12:41:59PM -0500, Tom Lane wrote:
> David Fetter writes:
> > We don't appear to be able to use the actual thing in the target list
> > either.
>
> Would you translate that into English? Or at least an example without
> trivial syntax errors?
This works:
SELECT
typ,
Hi chaps,
I've got a question about inheritance here, and I think I may have gotten the
wrong end of the stick as to how it works, or at least when to use it.
What I intended to do was have a schema "audit" with an empty set of tables in
it, then each quarter restore our audit data into schemas
David Fetter writes:
> We don't appear to be able to use the actual thing in the target list
> either.
Would you translate that into English? Or at least an example without
trivial syntax errors?
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@p
Hi, this is basically what I would like to improve :
1) A user searches for a product on category and location.
a) The query is run and the result (limit 30) are returned and shown.
b) The same query is ran again but now I return the count on how many
matches there was totally. (This has to be pos
On Fri, Jan 16, 2009 at 12:34:34PM -0500, Tom Lane wrote:
> David Fetter writes:
> > I tried this:
>
> > SELECT
> > typ,
> > ts,
> > rank() over w AS foo_rank
> > FROM
> > foo
> > WINDOW w AS (partition by typ order by ts desc)
> > WHERE
> > foo_rank < 4;
>
> > ERROR
David Fetter writes:
> I tried this:
> SELECT
> typ,
> ts,
> rank() over w AS foo_rank
> FROM
> foo
> WINDOW w AS (partition by typ order by ts desc)
> WHERE
> foo_rank < 4;
> ERROR: syntax error at or near "WHERE"
> LINE 8: WHERE
> ^
RTFM ... WINDOW goes a
On Fri, Jan 16, 2009 at 12:23:16PM -0500, Jaime Casanova wrote:
> On Fri, Jan 16, 2009 at 12:07 PM, David Fetter wrote:
> >>
> >> Now i want only 3 records for every typ:
> >>
> >> test=# select typ, ts, rank() over (partition by typ order by ts desc )
> >> from foo where rank <= 3;
> >> ERROR:
On Fri, Jan 16, 2009 at 12:07 PM, David Fetter wrote:
>>
>> Now i want only 3 records for every typ:
>>
>> test=# select typ, ts, rank() over (partition by typ order by ts desc )
>> from foo where rank <= 3;
>> ERROR: column "rank" does not exist
>> LINE 1: ...rtition by typ order by ts desc )
On Thu, Jan 15, 2009 at 03:06:47PM +0100, A. Kretschmer wrote:
> Hi,
>
> first, many thanks to all for the great work, i'm waiting for 8.4.
>
>
> I have played with the new possibilities:
>
> test=# select typ, ts, rank() over (partition by typ order by ts desc ) from
> foo;
> typ |
Hello,
are these statements true:
* «You should always index fks. The only exception is when the
matching unique or primary key is never updated or deleted» ?
* «Small tables do not require indexes» ?
* «Create an index if you frequently want to retrieve less than
about ~15% o
you can also look at:
http://www.sqlmanager.net/en/products/postgresql/dbcomparer
Not free but it's a nice product, with nice support give it a try.
You can also check at other products from EMS, very nice! Especially the
SQL Manager: http://www.sqlmanager.net/en/products/postgresql/manager
dbwrench has this option, afair - called 'reverse synchronize'.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Anyone know of a decent diff tool for comparing two schemas?
I Had a go with
http://apgdiff.sourceforge.net/
but it appears it doesn't quote it's sql properly. A shame, otherwise it'd be
just what I need.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make change
Dhaval Shah wrote:
> I am setting up Postgres for OpenSSL + FIPs.
>
> I am compiling Postgres with OpenSSL FIPS library using the
> "-with-openssl" option. The question I have is, just doing that
> suffice? Or do I have to modify the postgres source code?
>
> Since I read through the OpenSSL FIP
49 matches
Mail list logo