Hi,
What is the best practice for following case:
In my database I have a set (~10) of schemas; my database periodically
is being backed up and restored at another machine. I have set up
search_path via "ALTER DATABASE ... SET search_path TO ..." to make
all needed schemas visible to any user who
In postgresql privileges on colums is not possible,
but is there a reason why not?
For my application I want the option to hide some
columns for some users. So I use functions that make views for each user.
Another solution may be to make a new table with a foreign key and an 1 to
1 relati
Hi,
this is sort of a silly question, but: what's the proper way to
intentionally generate an error? I'm writing tests for pyPgSQL and want
to check it's error handling. Currently, I'm using:
SELECT "THIS PRODUCES AN SQL ERROR";
Is there any better way to generate errors? Probably even gener
In PL/pgSQL you could use the RAISE command:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-errors-and-messages.h
tml
Best regards,
Matthias
> -Original Message-
>
> Hi,
>
> this is sort of a silly question, but: what's the proper way to
> intentionally generate an error? I'm w
Hello Matthias,
[EMAIL PROTECTED] wrote:
In PL/pgSQL you could use the RAISE command:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-errors-and-messages.h
tml
Thank you, good to know. Unfortunately I'm not in a PL/PgSQL function,
just a plain query. Some standard functions which invok
On Fri, Oct 06, 2006 at 12:44:43PM +0300, Martins Mihailovs wrote:
> I would be a glad to hear your solutions, experience in web application
> with multi languages (searching with indexing, sorting and others
> problems with multi byte encoding).
>
> For developers: what are your future plans ab
Markus Schiltknecht writes:
> [EMAIL PROTECTED] wrote:
>> In PL/pgSQL you could use the RAISE command:
>> http://www.postgresql.org/docs/8.1/interactive/plpgsql-errors-and-messages.h
>> tml
>
> Thank you, good to know. Unfortunately I'm not in a PL/PgSQL function,
> just a plain query. Some standa
On Sun, Oct 08, 2006 at 12:04:01PM -0700, Matthew Peter wrote:
> Is it possible to automatically detect the language encoding of
> incoming data? For instance if Japanese is used, is there a way to
> know it is Japanese from a bit in the charset, a dictionary-based
> evaluation or otherwise?
While
Matthew Peter wrote:
Is it possible to automatically detect the language encoding of incoming
data? For instance if Japanese is used, is there a way to know it is
Japanese from a bit in the charset, a dictionary-based evaluation or
otherwise?
Have a look at http://www.mozilla.org/projects/i
On 10/8/06, Jean-Gerard Pailloncy <[EMAIL PROTECTED]> wrote:
I want to create a function in PL/SQL as
CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS
double precision AS '
DECLARE
f text := $1;
p double precision[] := $2;
res double precision;
BEGIN
SELECT
On Sun, Oct 08, 2006 at 05:49:11PM +0200, Jean-Gerard Pailloncy wrote:
> I try EXECUTE f || ' ( ' || p || ' );' INTO res
> But is does not work too.
> There is no function to convert double precision[] to text.
You could use the types' input and output functions or perhaps
array_to_string().
stmt
On Oct 9, 2006, at 5:51 AM, Tjibbe Rijpma wrote:
In postgresql privileges on colums is not possible, but is there a
reason why not?
No one has volunteered to implement it? I don't think it is a
technical reason.
For my application I want the option to hide some columns for some
users
Hi,
you may try;
execute 'select ' ||
f || '(' || p || ')' into res;
Merlin Moncure wrote, On 09.10.2006 16:35:
On 10/8/06, Jean-Gerard Pailloncy <[EMAIL PROTECTED]>
wrote:
I want to create a function in PL/SQL as
CREATE OR REPLACE FUNCTION "f_do" (text, double precision[]) RETURNS
John DeSoi <[EMAIL PROTECTED]> writes:
> On Oct 9, 2006, at 5:51 AM, Tjibbe Rijpma wrote:
>> In postgresql privileges on colums is not possible, but is there a
>> reason why not?
> No one has volunteered to implement it?
There is/was someone working on it, but we've not seen results yet.
Check
On 10/9/06, Michael Fuhr <[EMAIL PROTECTED]> wrote:
On Sun, Oct 08, 2006 at 05:49:11PM +0200, Jean-Gerard Pailloncy wrote:
> I try EXECUTE f || ' ( ' || p || ' );' INTO res
> But is does not work too.
> There is no function to convert double precision[] to text.
You could use the types' input an
What do you all use for query log analysis for Postgres. I feel/hope
like there must be something that I am missing.
I have tried PQA (http://pqa.projects.postgresql.org/) and it is very
problematic, at least with the kind of application we have. Some of the
problems:
* not aware of prepared sta
George Pavlov wrote:
> What do you all use for query log analysis for Postgres. I feel/hope
> like there must be something that I am missing.
>
> I have tried PQA (http://pqa.projects.postgresql.org/) and it is very
> problematic, at least with the kind of application we have. Some of
> the pro
Title: Determining caller of a function (due to a cascaded FK constraint?)
Greetings,
For reasons a little too complicated to get into off the bat, I am wondering what the most effective way is to determine by whom or how a particular action or function call was initiated. To shed more light
I am writing a plpgsql (PostgreSQL 8.x) trigger function that should do
something on a number of records. The records are in a very simple table
with two columns - 'parent_id' and 'child_id'. A 'child' can be as well
a 'parent' to one or more children - in this case its ID appears as many
times
"Lenorovitz, Joel" <[EMAIL PROTECTED]> writes:
> I want to have a trigger that will copy some data from a table in one
> schema to an analogous table in another schema every time a record is
> modified UNLESS the modification is the result of a cascaded foreign key
> constraint.
Sorry, there isn't
On Mon, 09 Oct 2006 16:34:09 -0400
Tom Lane <[EMAIL PROTECTED]> wrote:
> "Lenorovitz, Joel" <[EMAIL PROTECTED]> writes:
> > I want to have a trigger that will copy some data from a table in
> > one schema to an analogous table in another schema every time a
> > record is modified UNLESS the modifi
This is causing a headache for us, if that is indeed true.
So we have code that goes like
begin;
lock table t1;
lock table t2;
...
...
Of course within our own code, we do make sure things are always locked
in the same order (so we wouldn't create deadlocks). We do, however, end
up in deadloc
On 10/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I am writing a plpgsql (PostgreSQL 8.x) trigger function that should do
something on a number of records. The records are in a very simple table
with two columns - 'parent_id' and 'child_id'. A 'child' can be as well
a 'parent' to one or mo
Merlin Moncure wrote:
> it's not exactly clear if you are asking about handling children
> recursively or not (meaning, you have to find the children's children,
> and so on). If so, I'd suggest taking a look here:
>
http://people.planetpostgresql.org/merlin/index.php?/archives/2-Dealing-With-Re
Hari Bhaskaran <[EMAIL PROTECTED]> writes:
> Why does pg_autovacuum need locks on more than one table at a time?
It doesn't --- unless maybe you are considering system catalogs, in
which case I'd wonder why you need exclusive lock on a catalog.
If you can prove the contrary, let's see a test cas
I have a table whose definition is basicallycreate table foo (a int,b int,c int,d date);and when fully populated, select relpages*8192::long/reltuples from pg_class where relname='foo';
gives around 52. Why is it so wide when there are only 4*4=16 bytes of actual data?The table was populated in on
> Look into pgfouine on pgFoundry.
> http://pgfoundry.org/projects/pgfouine/
thanks! definitely much better, but still not entirely believable, at
least on first try. e.g. i have a query with 4 conditions in the ORDER
BY. pgfouine reports show the query as having the last 3 of those
repeated 18 t
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/09/06 19:10, Alex Turner wrote:
> I have a table whose definition is basically
>
> create table foo (
> a int,
> b int,
> c int,
> d date
> );
>
> and when fully populated, select relpages*8192::long/reltuples from
> pg_class
> where relname='f
Hello Everybody,
I have a question about optimization of queries which includes UDFs.
Does anybody know what the Postgres does for optimizing the queries with UDFs?
Does the Postgres query optimizer do anything special with UDFs?
Thanks,
Jungmin Shin
George Pavlov wrote:
Look into pgfouine on pgFoundry.
http://pgfoundry.org/projects/pgfouine/
thanks! definitely much better, but still not entirely believable, at
least on first try. e.g. i have a query with 4 conditions in the ORDER
BY. pgfouine reports show the query as having the last 3 of
Hi all,
2006/10/5, Tom Lane <[EMAIL PROTECTED]>:
"Peter Bauer" <[EMAIL PROTECTED]> writes:
> tps = 50.703609 (including connections establishing)
> tps = 50.709265 (excluding connections establishing)
That's about what you ought to expect for a single transaction stream
running on honest disk h
So I've been looking at the documentation for COPY, and I'm curious about a
number of features which do not appear to be included, and whether these
functions are found someplace else:
1) How do I skip an arbitrary # of "header" lines (e.g. > 1 header line) to
begin reading in data?
2) Is it possi
On 10/7/06, Tomi NA <[EMAIL PROTECTED]> wrote:
I was just reading http://www.opencrx.org/faq.htm where RDBMS engines
are one of the questions and see pgsql bashed sentence after sentence.
Can anyone offer any insight as to weather it's fact or FUD?
FUD
postgresql in particular is an enormous f
On 10/10/06, Jonathan Greenberg <[EMAIL PROTECTED]> wrote:
So I've been looking at the documentation for COPY, and I'm curious about a
number of features which do not appear to be included, and whether these
functions are found someplace else:
1) How do I skip an arbitrary # of "header" lines
34 matches
Mail list logo