[SQL] Dynamic Query

2009-10-19 Thread Andrew Hall
Hi, I'm a novice PostgreSQL developer from an Oracle background and am trying to replicate some Oracle functionality in PostgreSQL / plpgSQL. I'm trying to write a stored function to implement a search: the function has several parameters - the value of any could be 'null' on any given invocat

[SQL] Table Valued Parameters

2009-10-23 Thread Andrew Hall
Hi, I was wondering whether anybody would be able to advise me on how (if it is possible) to port some functionality from Oracle? This is just an example - in Oracle, I am able to do the following -- -- Create a data type which replicates the data structure of a single user in my application

FW: [SQL] Table Valued Parameters

2009-10-23 Thread Andrew Hall
question more clear. Thanks, Andrew. > Date: Fri, 23 Oct 2009 20:10:48 +0200 > Subject: Re: [SQL] Table Valued Parameters > From: pavel.steh...@gmail.com > To: andre...@hotmail.com > CC: pgsql-sql@postgresql.org > > Hello > > 2009/10/23 Andrew Hall : > > Hi, > &

Re: [SQL] Table Valued Parameters

2009-10-24 Thread Andrew Hall
e to express my thanks to you for taking the time to suggest an approach. Cheers, Andrew. > Date: Fri, 23 Oct 2009 20:32:37 +0200 > Subject: Re: FW: [SQL] Table Valued Parameters > From: br...@zwartberg.com > To: andre...@hotmail.com > CC: pgsql-sql@postgresql.org > > 2

[SQL] PostgreSQL Security/Roles/Grants

2009-11-01 Thread Andrew Hall
Hi, I come from an Oracle background and wonder if anyone could provide some background information on how best to implement an application security scheme in PostgreSQL using roles / grants. I'd just like to outline first how I'd approach security in Oracle: There is a notion of both: 1. De

[SQL] Foreign key - Indexing & Deadlocking.

2009-12-29 Thread Andrew Hall
Hi, I'm porting some Oracle software to PostgreSQL, & have a question about best practices with foreign keys. In the Oracle environment, you're basically obliged to index all foreign keys (more specifically foreign key columns should appear on the leading edge of an index) due to the way that