[SQL] cross-database references are not implemented

2008-06-03 Thread Paul Dam
Hoi,

 

I have a database with 2 schemas:

- public

- export

 

In the export schema I have tables that are filled during an export
process.

There is some data I want to have in a table in the public schema as
well.

I wrote a trigger function that after insert in the export table does an
export in the public table.

 

If I do an insert I get the error message: "ERROR:  cross-database
references are not implemented".

 

How can I solve this?

 

Met vriendelijke groet,

 

Paul Dam



Re: [SQL] cross-database references are not implemented

2008-06-03 Thread Paul Dam
Thanks Adrian,

I casted a column to a type with "value::..%type"
That was the problem.

Met vriendelijke groet,
Paul Dam

-Oorspronkelijk bericht-
Van: Adrian Klaver [mailto:[EMAIL PROTECTED] 
Verzonden: dinsdag 3 juni 2008 15:57
Aan: [email protected]
CC: Paul Dam
Onderwerp: Re: [SQL] cross-database references are not implemented

On Tuesday 03 June 2008 6:12 am, Paul Dam wrote:
> Hoi,
>
>
>
> I have a database with 2 schemas:
>
> - public
>
> - export
>
>
>
> In the export schema I have tables that are filled during an export
> process.
>
> There is some data I want to have in a table in the public schema as
> well.
>
> I wrote a trigger function that after insert in the export table does
an
> export in the public table.
>
>
>
> If I do an insert I get the error message: "ERROR:  cross-database
> references are not implemented".
>
>
>
> How can I solve this?
>
>
>
> Met vriendelijke groet,
>
>
>
> Paul Dam

You will need to show the actual query, but I suspect you have an extra
period 
in your table name. Instead of public.table_name you have something like

public.table.name.
-- 
Adrian Klaver
[EMAIL PROTECTED]

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] BULK COLLECT

2008-11-21 Thread Paul Dam
Hoi,

 

Is there an equivalent in PL/pgSQL for BULK COLLECT in PL/SQL of Oracle?

 

Met vriendelijke groet,

 

Paul Dam

Informatieanalist

 

 

  


Amyyon
Bijsterhuizen 11.58

6546 AS Nijmegen

050 - 311 5686

www.amyyon.nl <http://www.amyyon.nl/> 

 

<>

Re: [SQL] BULK COLLECT

2008-11-24 Thread Paul Dam
Scott and others,

The following article by Steven Feuerstein from 2004 explains it quite
clear, I think.

http://www.oracle.com/technology/oramag/oracle/04-jan/o14tech_plsql.html

Paul Dam

-Oorspronkelijk bericht-
Van: Scott Marlowe [mailto:[EMAIL PROTECTED] 
Verzonden: vrijdag 21 november 2008 17:46
Aan: Paul Dam
CC: [email protected]
Onderwerp: Re: [SQL] BULK COLLECT

2008/11/21 Paul Dam <[EMAIL PROTECTED]>:
> Hoi,
>
>
>
> Is there an equivalent in PL/pgSQL for BULK COLLECT in PL/SQL of
Oracle?

I'm not that familiar with BULK COLLECT in oracle.  What does it do?

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] wired behaviour

2008-11-28 Thread Paul Dam
NULL values?

Met vriendelijke groet,
 
Paul Dam
Informatieanalist
 
 


Amyyon
Bijsterhuizen 11.58
6546 AS Nijmegen
050 - 311 5686
www.amyyon.nl
-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Lutz Steinborn
Verzonden: vrijdag 28 november 2008 14:52
Aan: [email protected]
Onderwerp: [SQL] wired behaviour

Hello,

I have an problem understanding a simple query:

For example I have the following:
select count(*) from foo;
gives me 1000

select count(*) from foo where bar = 'Mr Spock';
gives me 5

select count(*) from foo where NOT bar = 'Mr Spock';
gives me 857

Why I'm not getting 955 for the last query ?


Any idea ?

Kindly regards


Lutz

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] Convert text from UTF8 to ASCII

2009-03-11 Thread Paul Dam
Hoi,

 

I store content of an .txt file in a text column in the database.

server_encoding is UTF8.

 

If the .txt file is in ASCII this is correctly stored in the database.

If the .txt file is in UTF8 this is NOT correctly stored in the database.

 

Examples:

In Dutch the term for patient is 'patiënt'.

It is stored as 'patiënt'.

 

The first line of the .txt file is ''.

It is stored as ''.

 

How can I convert patiënt into patiënt?

Or more precise: How can I convert the text column to the correct format, 
before insert or when selecting?

 

Met vriendelijke groet,

 

Paul Dam

Informatieanalist

 

 

  


Amyyon
Bijsterhuizen 11.58

6546 AS Nijmegen

050 - 311 5686

www.amyyon.nl <http://www.amyyon.nl/> 

 



<>

Re: [SQL] Convert text from UTF8 to ASCII

2009-03-11 Thread Paul Dam
UNICODE.

Met vriendelijke groet,
 
Paul Dam
Informatieanalist
 
 


Amyyon
Bijsterhuizen 11.58
6546 AS Nijmegen
050 - 311 5686
www.amyyon.nl

-Oorspronkelijk bericht-
Van: [email protected] [mailto:[email protected]] 
Namens Leif B. Kristensen
Verzonden: woensdag 11 maart 2009 16:46
Aan: [email protected]
CC: Paul Dam
Onderwerp: Re: [SQL] Convert text from UTF8 to ASCII

On Wednesday 11. March 2009, Paul Dam wrote:
>Hoi,
>
>
>
>I store content of an .txt file in a text column in the database.
>
>server_encoding is UTF8.
>
>
>
>If the .txt file is in ASCII this is correctly stored in the database.
>
>If the .txt file is in UTF8 this is NOT correctly stored in the
> database.
>
>
>
>Examples:
>
>In Dutch the term for patient is 'patiënt'.
>
>It is stored as 'patiënt'.

That looks a lot like UTF-8 to me. What is your client-encoding?

-- 
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql





-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] Convert text from UTF8 to ASCII

2009-03-13 Thread Paul Dam
UTF8

Met vriendelijke groet,
 
Paul Dam
Informatieanalist
 
 


Amyyon
Bijsterhuizen 11.58
6546 AS Nijmegen
050 - 311 5686
www.amyyon.nl
-Oorspronkelijk bericht-
Van: [email protected]
[mailto:[email protected]] Namens Claus Guttesen
Verzonden: woensdag 11 maart 2009 16:43
Aan: Paul Dam
CC: [email protected]
Onderwerp: Re: [SQL] Convert text from UTF8 to ASCII

> I store content of an .txt file in a text column in the database.
>
> server_encoding is UTF8.

What does 'psql -l' say?

-- 
regards
Claus

When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.

Shakespeare

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql





-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] RE: [SQL] RE : [SQL] Convert text from U TF8 to ASCII

2009-03-16 Thread Paul Dam
Sebastien,

 

I know by looking at the data using PgAdmin.

 

Met vriendelijke groet,

 

Paul Dam

Informatieanalist

 

 

  


Amyyon
Bijsterhuizen 11.58

6546 AS Nijmegen

050 - 311 5686

www.amyyon.nl <http://www.amyyon.nl/> 



Van: [email protected] [mailto:[email protected]] 
Namens seb JACK
Verzonden: vrijdag 13 maart 2009 13:49
Aan: [email protected]
Onderwerp: [SQL] RE : [SQL] Convert text from UTF8 to ASCII

 

Hi

 

Perhaps you should try to set your db client_encoding to UTF8.

 

How do you know you have 'patiënt' instead of 'patiënt'?

I mean i also deals with UTF8 databases and all i store is correctly stored. 
But i can't check it with command line psql as my shell is configured with 
iso-8859-1 charset.

So with psql i will also see 'patiënt' even if 'patiënt' is correctly stored!

Perhaps your problem is as simple as that!?

 

Sebastien.

 

 



De: [email protected] de la part de Paul Dam
Date: mer. 11/03/2009 16:51
À: Leif B. Kristensen; [email protected]
Objet : Re: [SQL] Convert text from UTF8 to ASCII

UNICODE.

Met vriendelijke groet,

Paul Dam
Informatieanalist




Amyyon
Bijsterhuizen 11.58
6546 AS Nijmegen
050 - 311 5686
www.amyyon.nl

-Oorspronkelijk bericht-
Van: [email protected] [mailto:[email protected]] 
Namens Leif B. Kristensen
Verzonden: woensdag 11 maart 2009 16:46
Aan: [email protected]
CC: Paul Dam
Onderwerp: Re: [SQL] Convert text from UTF8 to ASCII

On Wednesday 11. March 2009, Paul Dam wrote:
>Hoi,
>
>
>
>I store content of an .txt file in a text column in the database.
>
>server_encoding is UTF8.
>
>
>
>If the .txt file is in ASCII this is correctly stored in the database.
>
>If the .txt file is in UTF8 this is NOT correctly stored in the
> database.
>
>
>
>Examples:
>
>In Dutch the term for patient is 'patiënt'.
>
>It is stored as 'patiënt'.

That looks a lot like UTF-8 to me. What is your client-encoding?

--
Leif Biberg Kristensen | Registered Linux User #338009
Me And My Database: http://solumslekt.org/blog/

--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql





--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



<>