I've got Solaris 10 11/06 on my PC. I removed the static keyword in
src/backend/access/transam/xact.c. for the AbortTransaction and
CommitTransaction functions declarations and compiled 8.2.3.
Everything works nicely.
I was wondering if DTrace could tell me how many inserts are being
done in a
CREATE RULE ins_productionlog AS ON INSERT TO vwProductionlog DO
INSTEAD
(
INSERT INTO PRODUCTIONLOG
(machine_name,product_serial_id,production_time,product_number,id)
VALUES
(new.machine_name, new.product_serial_id,
new.production_time,new.product_number, DEFAULT) RETURNING
I'm doing some testing on a larger dataset, and I've started getting a
57014 error message when I catch an NpgsqlException. I thought it
might be timing out on me, so in the connection string I've set the
time out settings to the maximum of 1024 seconds before timeout.
Has anyone else
On Jan 29, 11:06 pm, [EMAIL PROTECTED] (Dawid Kuroczko) wrote:
* updatable views [ or am I missing something? ] -- it seems to me
they were close to be completed, but I don't remember if they were
completed and committed or not.
PostgreSQL has updatable views via the rules system. I use
Is it possible to have a pl/pgsql function take another pl/pgsql
function as one of the parameters?
regards,
karen
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your
I was just looking at all the upcoming features scheduled to make it
into 8.3, and with all those goodies, wouldn't it make sense for this
to be a 9.0 release instead of an 8.3? It looks like postgresql is
rapidly catching up to oracle if 8.3 branch gets every feature
scheduled for it.
About
I was just looking at all the upcoming features scheduled to make it
into 8.3, and with all those goodies, wouldn't it make sense for this
to be a 9.0 release instead of an 8.3? It looks like postgresql is
rapidly catching up to oracle if 8.3 branch gets every feature
scheduled for it.
About
Windows doesn't support symlinks. Is it possible instead for there to
be a config file that lets one set where the pg_xlog directory will sit?
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On Jan 26, 9:45 am, [EMAIL PROTECTED] (Tom Lane) wrote:
Florian Weimer [EMAIL PROTECTED] writes:
In theory, this should be possible (especially if you haven't switched
off full page writes).Not really --- the WAL records are not designed to
carry full
information about the preceding
Alan Hodgson wrote:
On Thursday 18 January 2007 15:54, Steve Atkins [EMAIL PROTECTED] wrote:
Anyone else get spam from EnterpriseDB today, talking about
Postgresql Support Services?
yep. You really would think that even the marketing weenies might know
better by now.
I do think that
Chris Mair wrote:
I have OS X tiger with all the updates:
uname -r
8.8.0
Here is what I get when I try to initdb on a freshly compiled 8.2:
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/2
creating configuration files ...
Tom Lane wrote:
Karen Hill [EMAIL PROTECTED] writes:
I still get the error when I initdb. OS X and PostgreSQL has worked
before for me, compiled from the source.
Works for me. What do you get from sysctl -a | grep sysv ?
sysctl -a | grep sysv
kern.sysv.shmmax: 4194304
kern.sysv.shmmin
I have OS X tiger with all the updates:
uname -r
8.8.0
Here is what I get when I try to initdb on a freshly compiled 8.2:
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ... 400kB/2
creating configuration files ... ok
creating template1 database in
I was looking through the various contrib packages and pgfoundry
projects. I noticed that many of them are GPL like PostGIS or LGPL
like Npgsql. I have questions.
If you make create a PostgreSQL database that uses PostGIS and you
distribute that database, than your database (tables, stored
Bernard Grosperrin wrote:
I wants to make a view giving me some statistics.
I am not sure to understand why something like this
SELECT location_id, (sold_parts_amount_dly + sold_labor_amount_dly) /
(sold_parts_amount_dly + sold_labor_amount_dly) from sales
give me a division by zero
Merlin Moncure wrote:
SELECT * FROM TABLE ORDER BY pk LIMIT 10 OFFSET N;
using offset to walk a table is extremely poor form because of:
* poor performance
* single user mentality
* flat file mentality
databases are lousy at this becuase they inheritly do not support
abolute
Karen Hill wrote:
Tom Lane wrote:
Karen Hill [EMAIL PROTECTED] writes:
-- Is there a way to know the total number of rows the cursor is
capable of traversing without using --count?
If you want an accurate count, the only way is to traverse the cursor.
Consider using MOVE FORWARD ALL
Karen Hill wrote:
What is the best way to find out the total number of rows returned by
an refcursor? This would allow the client user to know the total
amount of rows as they are using FETCH FORWARD/BACKWARD.
For example let's say that an refcursor has 300 rows. The user fetches
20
Tom Lane wrote:
Karen Hill [EMAIL PROTECTED] writes:
-- Is there a way to know the total number of rows the cursor is
capable of traversing without using --count?
If you want an accurate count, the only way is to traverse the cursor.
Consider using MOVE FORWARD ALL and noting the rowcount
What is the best way to find out the total number of rows returned by
an refcursor? This would allow the client user to know the total
amount of rows as they are using FETCH FORWARD/BACKWARD.
For example let's say that an refcursor has 300 rows. The user fetches
20 at a time. I would like the
I get an error message 55000 when I try to traverse backwards in an
refcursor. Works fine going forward. The hint says I need to use
scroll. What is the syntax for using scroll in a stored procedure that
returns an refcursor? Or do refcursors only support traversing forward?
I just finished reading one of Ralph Kimball's books. In it he
mentions something called a cyclical redundancy checksum (crc)
function. A crc function is a hash function that generates a checksum.
I am wondering a few things. A crc function would be extremely useful
and time saving in
Gene Wirchenko wrote:
I just finished reading one of Ralph Kimball's books. In it he
mentions something called a cyclical redundancy checksum (crc)
function. A crc function is a hash function that generates a checksum.
I am wondering a few things. A crc function would be extremely
Tom Lane wrote:
Karen Hill [EMAIL PROTECTED] writes:
Ralph Kimball states that this is a way to check for changes. You just
have an extra column for the crc checksum. When you go to update data,
generate a crc checksum and compare it to the one in the crc column.
If they are same, your
Looks like the PHP vs Postgresql argument is on slashdot.org's front
page. Just giving everyone a heads up so they can go and defend
postgresql.
---(end of broadcast)---
TIP 6: explain analyze is your friend
x-no-archive:yes
Hello.
I have a stored procedure which returns a setof record. The function
takes a few arguments, and if a couple of specific input values are
null, it is required that the stored procedure perform different
actions.
I know that the planner does not store the plan when
Merlin Moncure wrote:
On 8 Sep 2006 11:57:54 -0700, Karen Hill [EMAIL PROTECTED] wrote:
I know that the planner does not store the plan when EXECUTE is used in
a function, but the function looks better when the sql is created
dynamically.
my general rule is use static when you can
Don't forget that one can create a DO NOTHING rules for DELETE and
UPDATE in addition to the INSERT only privilege. This will prevent
even the owner of the table from doing any accidental updating or
deleting.
Brandon Aiken wrote:
Sure. Any RDBMS can do that. Just create a user account
Andrew Baerg wrote:
Hi,
I am getting strange results from the sum function as follows:
corp=# select amount from acc_trans where trans_id=19721 and chart_id=10019;
amount
-
4.88
117.1
-121.98
(3 rows)
corp=# select sum(amount) from acc_trans where trans_id=19721 and
Alvaro Herrera wrote:
Karen Hill wrote:
It would be really great if PostgreSQL supported SQL:2003 Window
functions. I know that oracle and sql server have them already, so it
would make postgres competitive in that area. I know there is a
feature freeze for 8.2, is it doable for 8.3
I know that in pgsql.hackers they are discussing what to market the
upcoming 8.2 release as. They mention updatable views, but
realistically, PostgreSQL has had them via rules forever. I consider
myself a database novice , and even I've created updatable views using
rules quite easily.
It
I read in the documentation that the money type is depreciated. It
says to use the to_char function and NUMERIC/decimal instead. Why was
the money type depreciated when it was so useful? How would be the
best way to use to_char and numeric to replace that type since I don't
want to be using a
How many tables and rows can PostgreSQL theoretically and then
practically handle? What is the largest database size possible? What
was the biggest database you've ever had on PostgreSQL? What were the
challenges and what kind of hardware and OS works best?
What is an effective way to predict
How many tables can PostgreSQL theoretically and then practically
handle? What is the largest database size possible? What was the
biggest database you've ever had on PostgreSQL? What were the
challenges and what kind of hardware and OS works best?
What is an effective way to predict database
I have an sql file that doesn' t work properly when I do: psql
mysql.sql . I cannot get it to connect to the database.
Here what I'd like it to do:
CREATE DATABASE testdb;
\c testdb;
CREATE TABLE tableTest(var varchar);
But I get an error on the second line about an invalid character. Is
it
Roy Souther wrote:
I would like to know if there is anyway to move a section of some tables
into RAM to work on them.
I have large table, about 700MB or so and growing. I also have a bizarre
collection of queries that run hundreds of queries on a small section of
this table. These queries
Hello,
How would one go about creating a US telephone type in the format of
(555)-555- ? I am at a loss on how it could be accomplished in
the most correct way possible while not going into the various
different country styles e.g. +01 (555) 555-.
Is the difficulty of creating a
Tom Lane wrote:
It doesn't seem particularly hard to make a type that stores just the
digits (applying whatever amount of error-checking seems appropriate
on the non-digit stuff it's throwing away) and on output regurgitates
a standardized format. Minimum support would just be an input
How do I make this function work? I am trying to get all the rolnames
from pg_roles.
CREATE OR REPLACE FUNCTION test() SETOF name AS $$
DECLARE
rrol name;
BEGIN
SELECT rolname INTO rrol FROM pg_roles;
RETURN setof rrol;
END;
$$ LANGUAGE plpgsql;
regards,
---(end of
Michael Fuhr wrote:
On Wed, Jul 05, 2006 at 02:27:19PM -0700, Karen Hill wrote:
I would like for one role to be able to login, and execute a couple of
functions and nothing else. I've tried to revoke access to CREATE on
the database, schema, and tablespace but when I tested it, the user
Hello.
I have client software that I wrote which uses parameters in function
calls to postgresql. I use quote_literal in postgresql functions.
That means I get data that is quoted when it finally ends up in the
tables which I don't want.
I know that you shouldn't trust data sent from the
I would like for one role to be able to login, and execute a couple of
functions and nothing else. I've tried to revoke access to CREATE on
the database, schema, and tablespace but when I tested it, the user was
still allowed to create tables.
regards,
---(end of
I have an insert/update/delete trigger on all my tables which add data
to a log table.
I would like to be able to disable them when the tables are called from
one stored proceedure I have. Yet I would still like those triggers to
fire on any other operation that is happening concurrently. Is
I'm having a bit of mystery in solving a postgresql puzzle. I have a
table that when it gets inserted or updated or deleted it is logged
into a log table. The log table contains who (current_user) did the
insert/update/delete the CURRENT_TIMESTAMP. Everything works great
except the INSERT
It seems PostgreSQL doesn't have a TOP Predicate. Why is that? Here
is an example:
SELECT TOP 10 products from sales;
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Tom Lane wrote:
Karen Hill [EMAIL PROTECTED] writes:
It seems PostgreSQL doesn't have a TOP Predicate. Why is that?
It's not in the SQL standard. If we were to implement something like
what I think you're asking for (your example is way underspecified),
it'd probably look like SQL2003's
Jan de Visser wrote:
On Thursday 11 May 2006 16:34, Karen Hill wrote:
It seems PostgreSQL doesn't have a TOP Predicate. Why is that? Here
is an example:
SELECT TOP 10 products from sales;
Just for my understanding: This would return the 10 products with the most
matching sales rows
Is my understanding correct that the following is vulnerable to SQL
injection in psql:
CREATE OR REPLACE FUNCTION fx ( my_var bchar)
RETURNS void AS
$$
BEGIN
INSERT INTO fx VALUES ( my_var ) ;
END;
$$
LANGUAGE 'plpgsql' VOLATILE
Where this is NOT subject to SQL injection:
CREATE OR REPLACE
What is your favorite front end for end users to interact with your
postgresql db? Is it java, .net, web apache + php, MS-Access, ruby on
rails? Why is it your favorite? Which would you recommend for end
users on multiple OSes?
Also, what do you think of having the database management system
Hello.
I have an MS - Access front end which connects to PostgreSQL 8.1.3.
Almost everything is working great, I especially love how I can use
rules in PostgreSQL to be able to update and insert into views, which
is awesome.
Now my only issue, and I'm not sure this is even possible but here it
Tom Lane wrote:
I hope it said rules, because you can't put a trigger on a view.
regression=# create table t(f1 int, f2 text);
CREATE TABLE
regression=# create view v as select * from t;
CREATE VIEW
regression=# insert into v values(22, 'foo');
ERROR: cannot insert into a view
HINT:
Tried it but didn't work. It gave me a hint though to try triggers.
Can anyone show me how to do an insert into a view using triggers?
Thanks. :-)
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
Cool. I knew ADO could do transactions on Access's JET database
engine, but didn't know they could do so on another RDBMS like
PostgreSQL. So basically I can use the BeginTrans and CommitTrans to
do the work of PostgreSQL's BEGIN; and COMMIT;
On a adjacent topic, how does PostgreSQL know that
From Access I'd like to run pass the following from MS Access to
PostgreSQL 8.1 using VBA:
BEGIN;
UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
COMMIT;
It won't let me. Any ideas solutions?
Bruce Momjian wrote:
Karen Hill wrote:
From Access I'd like to run pass the following from MS Access to
PostgreSQL 8.1 using VBA:
BEGIN;
UPDATE accounts SET balance = balance + 100.00 WHERE acctnum = 12345;
UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 7534;
COMMIT
55 matches
Mail list logo