Rabu, 15 April 2015

Bristol Digest, Vol 596, Issue 1

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Perl/postgres problem (Martin Moore)
2. Re: Perl/postgres problem (Amias Channer)
3. Re: Perl/postgres problem (Martin Moore)
4. Re: Perl/postgres problem (Shane McEwan)


----------------------------------------------------------------------

Message: 1
Date: Wed, 15 Apr 2015 11:29:21 +0100
From: "Martin Moore" <martinm@it-helps.co.uk>
To: "'Bristol and Bath Linux User Group'" <bristol@mailman.lug.org.uk>
Subject: [bristol] Perl/postgres problem
Message-ID:
<!&!AAAAAAAAAAAYAAAAAAAAAFLxZtQqo65Oo+1jhlUB9DvCgAAAEAAAAOG65SA91/dEn/hil5ESTiMBAAAAAA==@it-helps.co.uk>

Content-Type: text/plain; charset="us-ascii"

Debian Jessie, Postgres 9.3

I dumped 2 tables and a seq from one server (postgres 8.4) and loaded into
another server. All looks OK, but when I try and insert new records I get an
error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR: schema "me" does not exist [for Statement "SELECT
me.nextval('aixm_notam_id_seq') FROM aixm_notam_id_seq me"] at
/usr/share/perl5/A/EAD/TAM/Notam.pm line 191



I've restarted the perl (it's a daemonized process) and postgres but keep
getting the same error. I haven't got a clue why it's looking for schema
"me" !

Any ideas?

Cheers,

Martin.




------------------------------

Message: 2
Date: Wed, 15 Apr 2015 11:56:29 +0100
From: Amias Channer <me@amias.net>
To: martinm@it-helps.co.uk, Bristol and Bath Linux User Group
<bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Perl/postgres problem
Message-ID:
<CAMgU7XUZA9XNn0zC-0Jd00vMv12_mqwxkdCGr_73LSzJgawhxw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello Martin,

I'm guessing you didn't also copy the stored procedures with the data.

me.nextval looks like a stored procedure that is stored in a schema called
'me'

but i haven't used postgres for years so i'm probably wrong.

Its also a good idea to use a naming convention that makes it obvious what
type
of thing you are dealing with. e.g. tblTable , stpStoredProcedure , this
often makes
error messages more helpful.

Cheers
Amias

On 15 April 2015 at 11:29, Martin Moore <martinm@it-helps.co.uk> wrote:

> Debian Jessie, Postgres 9.3
>
> I dumped 2 tables and a seq from one server (postgres 8.4) and loaded into
> another server. All looks OK, but when I try and insert new records I get
> an
> error:
>
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
> execute failed: ERROR: schema "me" does not exist [for Statement "SELECT
> me.nextval('aixm_notam_id_seq') FROM aixm_notam_id_seq me"] at
> /usr/share/perl5/A/EAD/TAM/Notam.pm line 191
>
>
>
> I've restarted the perl (it's a daemonized process) and postgres but keep
> getting the same error. I haven't got a clue why it's looking for schema
> "me" !
>
> Any ideas?
>
> Cheers,
>
> Martin.
>
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150415/1a55493a/attachment-0001.html>

------------------------------

Message: 3
Date: Wed, 15 Apr 2015 12:20:11 +0100
From: "Martin Moore" <martinm@it-helps.co.uk>
To: "'Bristol and Bath Linux User Group'" <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Perl/postgres problem
Message-ID:
<!&!AAAAAAAAAAAYAAAAAAAAAFLxZtQqo65Oo+1jhlUB9DvCgAAAEAAAAIByG8JGqTFLqoVOHcuU7T8BAAAAAA==@it-helps.co.uk>

Content-Type: text/plain; charset="utf-8"

Thanks Amias ? I?m sure the perl doesn?t use stored procs. Nextval is getting the next value from a sequence ? but the sequence is called ?me? and doesn?t exist. A bit of digging shows that ?me? is used the perl DBIx class. So I haven?t a clue what?s broken!



I?m in the process of copying last nights dump and will restore it. That will give me other issues but I least I know what they are and how to fix them!





Martin.



From: parsnip@amias.net [mailto:parsnip@amias.net] On Behalf Of Amias Channer
Sent: 15 April 2015 11:56
To: martinm@it-helps.co.uk; Bristol and Bath Linux User Group
Subject: Re: [bristol] Perl/postgres problem



Hello Martin,



I'm guessing you didn't also copy the stored procedures with the data.



me.nextval looks like a stored procedure that is stored in a schema called 'me'



but i haven't used postgres for years so i'm probably wrong.

Its also a good idea to use a naming convention that makes it obvious what type

of thing you are dealing with. e.g. tblTable , stpStoredProcedure , this often makes

error messages more helpful.



Cheers

Amias



On 15 April 2015 at 11:29, Martin Moore <martinm@it-helps.co.uk> wrote:

Debian Jessie, Postgres 9.3

I dumped 2 tables and a seq from one server (postgres 8.4) and loaded into
another server. All looks OK, but when I try and insert new records I get an
error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
execute failed: ERROR: schema "me" does not exist [for Statement "SELECT
me.nextval('aixm_notam_id_seq') FROM aixm_notam_id_seq me"] at
/usr/share/perl5/A/EAD/TAM/Notam.pm line 191



I've restarted the perl (it's a daemonized process) and postgres but keep
getting the same error. I haven't got a clue why it's looking for schema
"me" !

Any ideas?

Cheers,

Martin.


_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol



_____

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5863 / Virus Database: 4328/9502 - Release Date: 04/10/15

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20150415/e2dddc87/attachment-0001.html>

------------------------------

Message: 4
Date: Wed, 15 Apr 2015 12:52:18 +0100
From: Shane McEwan <shane@mcewan.id.au>
To: bristol@mailman.lug.org.uk
Subject: Re: [bristol] Perl/postgres problem
Message-ID: <552E50F2.2020507@mcewan.id.au>
Content-Type: text/plain; charset=utf-8

On 15/04/15 11:29, Martin Moore wrote:
> Debian Jessie, Postgres 9.3
>
> I dumped 2 tables and a seq from one server (postgres 8.4) and loaded into
> another server. All looks OK, but when I try and insert new records I get an
> error:
>
> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st
> execute failed: ERROR: schema "me" does not exist [for Statement "SELECT
> me.nextval('aixm_notam_id_seq') FROM aixm_notam_id_seq me"] at
> /usr/share/perl5/A/EAD/TAM/Notam.pm line 191
>
>
>
> I've restarted the perl (it's a daemonized process) and postgres but keep
> getting the same error. I haven't got a clue why it's looking for schema
> "me" !

"me" is an alias that DBIx::Class uses. If you look at the end of the
SQL statement you'll see "FROM aixm_notam_id_seq me". It's aliasing
"aixm_notam_id_seq" as "me". "nextval" is a PostgreSQL function that
works on sequences.

I don't know why you're getting the error, though. It looks OK to me.
Perhaps something has changed between version 8.4 and 9.3?

Shane.



------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 596, Issue 1
***************************************

Tidak ada komentar:

Posting Komentar