Comments (6)
This could be a PostgreSQL version issue. Do the examples also fail with examples/run-tests?
from piggly.
I'll check when I get back to my desk. I think I have a fix that will work. I can send you the code since I can't upload it at work.
Sent from my HTC
----- Reply message -----
From: "kputnam" [email protected]
Date: Fri, Aug 12, 2011 12:13 pm
Subject: [piggly] pg_catalog.int does not exist (#19)
To: [email protected]
This could be a PostgreSQL version issue. Do the examples also fail with examples/run-tests?
Reply to this email directly or view it on GitHub:
#19 (comment)
from piggly.
I ran the example/run-tests and don't see the issue but I think it might be because none of the example procs have a return type of int.
CREATE OR REPLACE FUNCTION public.my_func()
RETURNS "pg_catalog"."int" AS
BEGIN
END;
LANGUAGE plpgsql VOLATILE SECURITY DEFINER;
I tried the following in Postgres 8.3 and 8.4 and it doesn't seem to work.
My fix for this is a little bit of a hack but in lib/piggly/dumper/procedure.rb line:232
Before: q(hash["typens"], shorten(hash["type"])),
After: hash["typens"] == "pg_catalog" ? q(hash["type"]) : q(hash["typens"], shorten(hash["type"])),
This seems to work for the situation where you need to schema qualify for row types and when you don't for primitive types.
from piggly.
Yeah, that's basically what I had in mind for a fix. Might as well get rid of references to the "pg_catalog" schema altogether... the initialize
method for QualifiedName
should probably be
def initialize(name, *names)
@names =
if name == "pg_catalog" and not names.empty?
names
else
[name, *names]
end
end
Feel free to commit this and push when you get a chance.
from piggly.
Still noticing a problem -- QualifiedName#quote
doesn't suppress "pg_catalog".
from piggly.
Finally took the 30 minutes to sit down and figure this out. Should be OK now!
from piggly.
Related Issues (20)
- Parser issue - DML in WITH query HOT 13
- use of select filter HOT 3
- config.dry_run undefined HOT 1
- issue with table return types HOT 1
- error installing piggly gem on windows HOT 11
- declare statement before begin causes parse failure HOT 4
- for loop with literals violates 'loop always iterates more than once' rule HOT 2
- failing to capture calls to secondary procedure for perform call HOT 6
- Replace source using UPDATE pg_proc HOT 2
- another parse issue "RAISE {cr} USING" HOT 1
- Improve keyword parsing HOT 1
- ERROR: zero-length delimited identifier at or near """" (PG::SyntaxError) HOT 2
- No tag with id X (RuntimeError) HOT 12
- gcov/lcov support HOT 2
- Functions that declare a non-trivial cursor fail to compile HOT 2
- Failure to parse a file containing bigint HOT 4
- Improve automated testing HOT 3
- Make the reports prettier!
- Support for latest stored procedure syntax
- `defaults': Couldn't parse default arguments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piggly.