Jorge Godoy wrote:
Jorge Godoy [EMAIL PROTECTED] writes:
Is there a better way to guarantee that there will be no gaps in my sequence
if something goes wrong with my transaction?
From the overwhelming feedback I assume there isn't a better way yet...
Thanks. I'll see how I can improve
Michelle Konzack wrote:
Hello *,
I am searching for a weired error... Since all users are working fine,
I was now root and done a 'su - postgresql' to create a new user with
createuser --password devel.debian
Shall the new user be allowed to create databases? (y/n) n
Shall the new user be
[EMAIL PROTECTED] wrote:
How can I migrate a PostgreSQL database to MySQL or MS
Access? Are there any tools available?
Hi,
Can we know maybe why you want to do this?
---
Philippe Lang
Attik System
smime.p7s
Description: S/MIME cryptographic signature
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other transactions
updated the table (see
http://www.postgresql.org/docs/8.1/interactive/sql-lock.html) but in theory
something like this should work:
begin;
select id from table order by id desc
On Mon, Aug 14, 2006 at 09:09:51AM -0300, Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
P.S. I'm sure in older versions this query wouldn't use an index:
select max(id) from table;
It doesn't. You'd have to do what you did: order by x desc limit 1 to
have it using indexes...
I'm
Michael Fuhr [EMAIL PROTECTED] writes:
Automatically use indexes for MIN() and MAX() (Tom)
In previous releases, the only way to use an index for MIN()
or MAX() was to rewrite the query as SELECT col FROM tab ORDER
BY col LIMIT 1. Index usage now happens automatically.
Hi,
I need your help!
I vacuumed an entire database because it was having a transaction wraparound problem.
Then I dropped the database.
After running ANALYZE, the entry of the database is gone as I expected.
But when I try to connect to other databases I get the same transaction wraparound
Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other transactions
updated the table (see
http://www.postgresql.org/docs/8.1/interactive/sql-lock.html) but in
theory
something like this should work:
begin;
select id
Hi! In a function to insert rows into a table, I keep
getting ERROR: prepared statement updateplan already
exists. If any ideas; thanks.
CREATE OR REPLACE FUNCTION testPreparedStatement()
RETURNS SETOF FLOAT AS $$
DECLARE
tryint1 int4:=1 ;
tryint2 int4:=2 ;
BEGIN
PREPARE updatePlan (
Hi,
I have a database with a lot of schemas; now one schema has been added,
re-integrating a former separate database (of course, there are good reasons to
do so). This new schema contains very much data which is rarely changed;
thus, it would be sufficient to save it much less often than the
for an excellent book on keeping things where they should be go buy:
The ART of SQL by Stephane Faroult. Sample chapter online.
http://www.oreilly.com/catalog/artofsql/
It's an excellent read, and provides ample arguments for keeping
constraint management with the database and not in each of the
Since the gapless numbers are purely for the benefit of the tax
people, you could build your db with regular sequences as primary
keys and then regularly (or just before tax-time) insert into a table
which maps the gapless sequence to the real primary key.
-M
On Sun, Aug 13, 2006 at 10:48:37AM -0700, Jim Bryan wrote:
Hi! In a function to insert rows into a table, I keep
getting ERROR: prepared statement updateplan already
exists. If any ideas; thanks.
As the error says, you already have a prepared statement named
updateplan. To reuse that name
AgentM [EMAIL PROTECTED] writes:
Since the gapless numbers are purely for the benefit of the tax people, you
could build your db with regular sequences as primary keys and then regularly
(or just before tax-time) insert into a table which maps the gapless sequence
to the real primary key.
On Sat, 2006-08-12 at 08:08 -0700, RPK wrote:
How can I migrate a PostgreSQL database to MySQL or MS Access? Are there any
tools available?
Although migrating away from PostgreSQL is not a popular idea on this
list, it can be done.
If you're using any PostgreSQL-specific features, plan how you
In article [EMAIL PROTECTED],
Jorge Godoy [EMAIL PROTECTED] writes:
AgentM [EMAIL PROTECTED] writes:
Since the gapless numbers are purely for the benefit of the tax people, you
could build your db with regular sequences as primary keys and then
regularly
(or just before tax-time) insert
AgentM [EMAIL PROTECTED] writes:
Since the gapless numbers are purely for the benefit of the tax people, you
could build your db with regular sequences as primary keys and then
regularly
(or just before tax-time) insert into a table which maps the gapless
sequence
to the real
Harald Fuchs [EMAIL PROTECTED] writes:
Why putting gapless numbers into the database at all? Just calculate them at
query time.
And how would you retrieve the record that corresponds to invoice number
#16355, for example? Recalculating few records is fine, but millions of them
everytime you
On 8/14/06, Lee A Reum [EMAIL PROTECTED] wrote:
Hi,
I need your help!
I vacuumed an entire database because it was having a transaction wraparound
problem.
Then I dropped the database.
After running ANALYZE, the entry of the database is gone as I expected.
But when I try to connect to other
Michael Enke recently asked in pgsql-bugs about VARDATA and C strings
(BUG #2574: C function: arg TEXT data corrupt). Since that's not a bug,
I've moved this follow-up to pgsql-general.
On Mon, 2006-08-14 at 11:27 -0400, Tom Lane wrote:
The usual way to get a C string from a TEXT datum is to
Why putting gapless numbers into the database at all? Just calculate them at
query time.
There is ABSOLUTELY NO WAY that would be acceptable for accounting or legal
purposes. It would be the same as fabricating the numbers during an audit.
--
Scott Ribe
[EMAIL PROTECTED]
I have noticed that all SELECT queries alone in a transaction also
update pg_stat_database (I know it's just a view that calls
pg_stat_get_db_xact_commit()).
Does that mean that SELECTs by themselves require a disk write? If so,
is that a synchronous disk write? Is it due to something else
Reece Hart [EMAIL PROTECTED] writes:
On Mon, 2006-08-14 at 11:27 -0400, Tom Lane wrote:
The usual way to get a C string from a TEXT datum is to call textout,
eg
str = DatumGetCString(DirectFunctionCall1(textout, datumval));
Yikes! I've been accessing VARDATA text data like Michael for years
Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other transactions
updated the table (see
http://www.postgresql.org/docs/8.1/interactive/sql-lock.html) but in theory
something like this should work:
begin;
select id from table
In article [EMAIL PROTECTED],
Richard Broersma Jr [EMAIL PROTECTED] writes:
I am curious, can you calculate something like this using only sql? Or you
you need to employee a
procedural language like plpsgql?
You could use something like
SELECT (SELECT count(*) FROM tbl t2 WHERE t2.id
In article [EMAIL PROTECTED],
Jorge Godoy [EMAIL PROTECTED] writes:
Harald Fuchs [EMAIL PROTECTED] writes:
Why putting gapless numbers into the database at all? Just calculate them at
query time.
And how would you retrieve the record that corresponds to invoice number
#16355, for example?
In article [EMAIL PROTECTED],
Scott Ribe [EMAIL PROTECTED] writes:
Why putting gapless numbers into the database at all? Just
calculate them at query time.
There is ABSOLUTELY NO WAY that would be acceptable for accounting or legal
purposes. It would be the same as fabricating the numbers
Harald Fuchs [EMAIL PROTECTED] writes:
In article [EMAIL PROTECTED],
Jorge Godoy [EMAIL PROTECTED] writes:
Harald Fuchs [EMAIL PROTECTED] writes:
Why putting gapless numbers into the database at all? Just calculate them
at
query time.
And how would you retrieve the record that
folks
I have a asp application connected with postgres.
The postgres temporary tables is useless because i
need remain this tables between sessions, perfomance
reasons.
This tables are created on the fly and remain between
session but asp server finalize connection and
temporary table are
On Mon, 2006-08-14 at 16:08 -0400, Berend Tober wrote:
Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other transactions
updated the table (see
http://www.postgresql.org/docs/8.1/interactive/sql-lock.html) but in
theory
Jeff Davis wrote:
I have noticed that all SELECT queries alone in a transaction also
update pg_stat_database (I know it's just a view that calls
pg_stat_get_db_xact_commit()).
The stuff in the stats collector is not stored on disk. Or, rather, it
is, but not in the same way as regular tables;
On Mon, Aug 14, 2006 at 05:32:41PM -0300, marcelo Cortez wrote:
folks
Hi,
I have a asp application connected with postgres. The postgres
temporary tables is useless because i need remain this tables between
sessions, perfomance reasons. This tables are created on the fly and
remain
marcelo Cortez [EMAIL PROTECTED] writes:
Then i've created normal tables but the wal file
generated by this tables grows and grows.
The WAL files shouldn't grow indefinitely unless you've got some
fairly serious problem that is preventing checkpoints from occurring.
Look in the server log file
On Monday 14 August 2006 01:59 pm, Brad Nicholson wrote:
On Mon, 2006-08-14 at 16:08 -0400, Berend Tober wrote:
Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other
transactions updated the table (see
Brad Nicholson wrote:
On Mon, 2006-08-14 at 16:08 -0400, Berend Tober wrote:
Jorge Godoy wrote:
Chris [EMAIL PROTECTED] writes:
I'm not sure what type of lock you'd need to make sure no other transactions
updated the table (see
On Monday 14 August 2006 02:46 pm, Adrian Klaver wrote:
Let current max id = x
Transaction 1 (t1) does a select max(id) for update, gets a lock on the
last tuple at the time of the select, and gets x as a value for max id
Transaction 2 (t2) does a select max(id) for update, has to wait
On Mon, 2006-08-14 at 15:51 -0400, Tom Lane wrote:
Whose 7.x manual? This stuff has been there since we invented the
version 1 function call convention, which was 7.3 or before. There
is some documentation in the SGML docs, but really we kind of expect you
to look at the standard built-in
Tom
thanks for to respond quickly, see more below
marcelo Cortez [EMAIL PROTECTED] writes:
Then i've created normal tables but the wal
file
generated by this tables grows and grows.
The WAL files shouldn't grow indefinitely unless
you've got some
fairly serious problem that is
38 matches
Mail list logo