pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem with backups and functions.
5+ messages / 4 participants
[nested] [flat]

* Problem with backups and functions.
@ 2005-03-18 19:55  Bruno G. Albuquerque <bga@bug-br.org.br>
  0 siblings, 0 replies; 5+ messages in thread

From: Bruno G. Albuquerque @ 2005-03-18 19:55 UTC (permalink / raw)
  To: pgsql-admin

I am not sure if I am doing something wrong or a hit a bug, so here it goes:

I am running PostgreSQL 8.0.1 under Windows 2000. We have this database 
here which is really small and has a set of 5 functions. All the 
functions are programmed using pgpsql so we used the functionality where 
we can use named parameters in the functions.

The problem is that when we do a backup/restore procedure (using 
pg_dump/pg_restore), the functions are restored without the named 
parameters, which make then fail as inside the function the parameter 
names are mentioned.

For example, the funtion that would originally be:

cubfn002_recuperar_nu_ordem(numero_pessoa int8)

Would be restored as:

cubfn002_recuperar_nu_ordem(int8)

Due to that the function errors out as "numero_pessoa" is used inside it 
but is now an unknow identifier.

Am I missing something?

Thanks in advance.

-Bruno



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Problem with backups and functions.
@ 2005-03-18 20:04  Bruno G. Albuquerque <balbuquerque@dba.com.br>
  0 siblings, 1 reply; 5+ messages in thread

From: Bruno G. Albuquerque @ 2005-03-18 20:04 UTC (permalink / raw)
  To: pgsql-admin


I am not sure if I am doing something wrong or a hit a bug, so here it goes:

I am running PostgreSQL 8.0.1 under Windows 2000. We have this database
here which is really small and has a set of 5 functions. All the
functions are programmed using pgpsql so we used the functionality where
we can use named parameters in the functions.

The problem is that when we do a backup/restore procedure (using
pg_dump/pg_restore), the functions are restored without the named
parameters, which make then fail as inside the function the parameter
names are mentioned.

For example, the funtion that would originally be:

cubfn002_recuperar_nu_ordem(numero_pessoa int8)

Would be restored as:

cubfn002_recuperar_nu_ordem(int8)

Due to that the function errors out as "numero_pessoa" is used inside it
but is now an unknow identifier.

Am I missing something?

Thanks in advance.

-Bruno


**********************************************************************
Informação transmitida destina-se apenas à pessoa a quem foi endereçada e pode conter informação confidencial, legalmente protegida e para conhecimento exclusivo do destinatário. Se o leitor desta advertência não for o seu destinatário, fica ciente de que sua leitura, divulgação ou cópia é estritamente proibida. Caso a mensagem tenha sido recebida por engano, favor comunicar ao remetente e apagar o texto de qualquer computador.


The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by person or entity other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
**********************************************************************



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problem with backups and functions.
@ 2005-03-18 20:24  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bruno G. Albuquerque <balbuquerque@dba.com.br>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2005-03-18 20:24 UTC (permalink / raw)
  To: Bruno G. Albuquerque <balbuquerque@dba.com.br>; +Cc: pgsql-admin

"Bruno G. Albuquerque" <balbuquerque@dba.com.br> writes:
> The problem is that when we do a backup/restore procedure (using
> pg_dump/pg_restore), the functions are restored without the named
> parameters, which make then fail as inside the function the parameter
> names are mentioned.

Perhaps you are using a pre-8.0 pg_dump?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problem with backups and functions.
@ 2005-03-18 20:40  Bruno G. Albuquerque <balbuquerque@dba.com.br>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Bruno G. Albuquerque @ 2005-03-18 20:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin


Hi Tom.

Thanks for the reply. I am sure this is not the case. I am doing test 
dumps on my machine (only PostgreSQL 8.0.1 installed) and the server is 
also running PostgreSQL 8.0.1.

-Bruno

Tom Lane wrote:
> "Bruno G. Albuquerque" <balbuquerque@dba.com.br> writes:
> 
>>The problem is that when we do a backup/restore procedure (using
>>pg_dump/pg_restore), the functions are restored without the named
>>parameters, which make then fail as inside the function the parameter
>>names are mentioned.
> 
> 
> Perhaps you are using a pre-8.0 pg_dump?
> 
> 			regards, tom lane
> 

**********************************************************************
Informação transmitida destina-se apenas à pessoa a quem foi endereçada e pode conter informação confidencial, legalmente protegida e para conhecimento exclusivo do destinatário. Se o leitor desta advertência não for o seu destinatário, fica ciente de que sua leitura, divulgação ou cópia é estritamente proibida. Caso a mensagem tenha sido recebida por engano, favor comunicar ao remetente e apagar o texto de qualquer computador.


The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by person or entity other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
**********************************************************************



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Problem with backups and functions.
@ 2005-03-18 20:54  Joshua D. Drake <jd@commandprompt.com>
  parent: Bruno G. Albuquerque <balbuquerque@dba.com.br>
  0 siblings, 0 replies; 5+ messages in thread

From: Joshua D. Drake @ 2005-03-18 20:54 UTC (permalink / raw)
  To: Bruno G. Albuquerque <balbuquerque@dba.com.br>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin

On Fri, 2005-03-18 at 17:40 -0300, Bruno G. Albuquerque wrote:
> Hi Tom.
> 
> Thanks for the reply. I am sure this is not the case. I am doing test 
> dumps on my machine (only PostgreSQL 8.0.1 installed) and the server is 
> also running PostgreSQL 8.0.1.

Can you describe your exact process?

You dump from Windows creating a file foo.sql
You restore the file where? What OS? What command?

Sincerely,

Joshua D. Drake


> 
> -Bruno
> 
> Tom Lane wrote:
> > "Bruno G. Albuquerque" <balbuquerque@dba.com.br> writes:
> > 
> >>The problem is that when we do a backup/restore procedure (using
> >>pg_dump/pg_restore), the functions are restored without the named
> >>parameters, which make then fail as inside the function the parameter
> >>names are mentioned.
> > 
> > 
> > Perhaps you are using a pre-8.0 pg_dump?
> > 
> > 			regards, tom lane
> > 
> 
> **********************************************************************
> Informação transmitida destina-se apenas à pessoa a quem foi endereçada e pode conter informação confidencial, legalmente protegida e para conhecimento exclusivo do destinatário. Se o leitor desta advertência não for o seu destinatário, fica ciente de que sua leitura, divulgação ou cópia é estritamente proibida. Caso a mensagem tenha sido recebida por engano, favor comunicar ao remetente e apagar o texto de qualquer computador.
> 
> 
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information, by person or entity other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
> **********************************************************************
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
-- 
Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
Custom programming, 24x7 support, managed services, and hosting
Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
Reliable replication, Mammoth Replicator - http://www.commandprompt.com/




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-03-18 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18 19:55 Problem with backups and functions. Bruno G. Albuquerque <bga@bug-br.org.br>
2005-03-18 20:04 Problem with backups and functions. Bruno G. Albuquerque <balbuquerque@dba.com.br>
2005-03-18 20:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-18 20:40   ` Bruno G. Albuquerque <balbuquerque@dba.com.br>
2005-03-18 20:54     ` Joshua D. Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox