Dmitri,
Thanks !! I got exactly what I wanted :)
In fact, I used your query like this:
SELECT
cl.relname AS FK_table_name,
a.attname AS FK_column_name,
clf.relname AS PK_table_name,
af.attname AS PK_column_name
FROM pg_catalog.pg_attribute a
JOIN pg_catalog.pg_
Premsun Choltanwanich wrote:
Dear All,
I need to distribute my application that use PostgreSQL as
database to my customer. But I still have some questions in my mind on
database security. I understand that everybody who get my application
database will be have a full control permissio
On Thursday 18 Aug 2005 8:26 am, Premsun Choltanwanich wrote:
> Dear All,
>
> I need to distribute my application that use PostgreSQL as
> database to my customer. But I still have some questions in my mind
> on database security. I understand that everybody who get my
> application database
On 8/17/05, Premsun Choltanwanich <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
> I need to distribute my application that use PostgreSQL as database to
> my customer. But I still have some questions in my mind on database
> security. I understand that everybody who get my application data
Dear All,
I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody who get my application database will be have a full control permission on my database in case that Pos
The Subject says it all. (author beats a hasty retreat).
Quoting Dmitri Bichko <[EMAIL PROTECTED]>:
> I don't see what the problem is.
> Did you mean to insert (3,'C3') into table c, rather than b?
> > create temp table a(keyf int, val text);
> > create temp table b(keyf int, val text);
> > crea
Mischa Sandberg <[EMAIL PROTECTED]> writes:
> Anyone care to comment on the third row of output?
I think you mistyped the last INSERT:
> insert into c values(2, 'C2');
> insert into b values(3, 'C3');
I suppose you meant insert into c ...
regards, tom lane
-
Quoting Dmitri Bichko <[EMAIL PROTECTED]>:
> How about:
>
> SELECT a.keyfld, a.foo1, b.foo2, c.foo3
> FROM a
> LEFT JOIN b USING(keyfld)
> LEFT JOIN c USING(keyfld)
((( See response at end )))
> > -Original Message-
> > [mailto:[EMAIL PROTECTED] On Behalf Of Lane Van
> Ingen
> > Sent: W
I have a couple of views I always add to 'information_schema' to help
with these sorts of things.
Here's the one for foreign keys:
CREATE VIEW information_schema.foreign_key_tables AS SELECT
n.nspname AS schema,
cl.relname AS table_name,
a.attname AS column_name,
c
I don't see what the problem is.
Did you mean to insert (3,'C3') into table c, rather than b?
Dmitri
> -Original Message-
> From: Mischa Sandberg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 17, 2005 3:31 PM
> To: Dmitri Bichko
> Cc: Lane Van Ingen; pgsql-sql@postgresql.org
> Sub
Hi to all,
Is there any means by which one can get all Foreign Keys (References) that
'point' to a certain Primary Key for a given table ?
For instance, let's consider those three tables:
(NOTE: table contents here are not deeply thought of...)
// employees table
create table emp
(id serial pr
On Wed, Aug 17, 2005 at 12:54:50PM -0400, Lane Van Ingen wrote:
> Given three tables: a, b, c ; each consist of a 'keyfld' and a field called
> 'foo':
> tbl a tbl b tbl c
>- - -
>a.keyfldb.keyfld c.keyfld
>a.foo1 b.foo2
am 17.08.2005, um 12:46:01 -0400 mailte Frank Bax folgendes:
> >>1) check the value in it is an integer
> >>2) get the integer value (as integer)
> >test=# update foo set n = substring(t , '[0-9]')::int;
>
>
> I think you meant:
> update foo set n = substring(t , '[0-9]+')::int;
On Wed, Aug 17, 2005 at 12:54:50PM -0400, Lane Van Ingen wrote:
> Given three tables: a, b, c ; each consist of a 'keyfld' and a field called
> 'foo':
> tbl a tbl b tbl c
>- - -
>a.keyfldb.keyfld c.keyfld
>a.foo1 b.foo2
How about:
SELECT a.keyfld, a.foo1, b.foo2, c.foo3
FROM a
LEFT JOIN b USING(keyfld)
LEFT JOIN c USING(keyfld)
Dmitri
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Lane Van Ingen
> Sent: Wednesday, August 17, 2005 12:55 PM
> To: pgsql-sql@postgre
Given three tables: a, b, c ; each consist of a 'keyfld' and a field called
'foo':
tbl a tbl b tbl c
- - -
a.keyfldb.keyfld c.keyfld
a.foo1 b.foo2 c.foo3
I want to always return all of tbl a; and I want to return b.fo
At 05:30 AM 8/17/05, Kretschmer Andreas wrote:
[EMAIL PROTECTED] <[EMAIL PROTECTED]> schrieb:
> Hi,
>
>I have a varchar column, and I need to
>
>1) check the value in it is an integer
>2) get the integer value (as integer)
test=# update foo set n = substring(t , '[0-9]')::int;
I
Using CASE to avoid '':
CREATE TABLE test (number TEXT);
INSERT INTO test VALUES('123');
INSERT INTO test VALUES('a123b');
INSERT INTO test VALUES('');
teste=> SELECT CASE number WHEN '' THEN NULL ELSE
to_number(number,'990') END AS
number FROM test;;
number
123
123
[EMAIL PROTECTED] <[EMAIL PROTECTED]> schrieb:
> Hi,
>
>I have a varchar column, and I need to
>
>1) check the value in it is an integer
>2) get the integer value (as integer)
>
>The problem is I can't suppose the're only correct
>values - ie there can be something like 'xss
19 matches
Mail list logo