Renaud Tthonnart writes:
> Could someone give me some explaination about the metatable(s) of
> PostgreSQL?
> Where is it and is there to find in it?
A good way is to start psql with "-E", it'll then show you the queries
it makes from the metatables when you do things like "\d table".
Dan
--
Christopher Sawtell writes:
> chris=# select phone_prefix.prefix order by random() limit 1 || '-' ||
> lpad((random()*1)::int, 4, '0')::text as "Phone Number";
> ERROR: parser: parse error at or near "||"
This sure won't fix everything, but at the very least you need to
parenthesize that fi
Tom Lane writes:
> Re-run configure, and watch to make sure that it finds bison this time.
> You'll need flex too, if you intend to build from CVS sources.
And if you're going to use the ODBC drivers under Linux (or any other
OS that links C "strings" into read only memory) you'll need pretty
rec
A friend asked me to figure out how to access PostgreSQL from Tcl via
ODBC. For posterity, here's the step by step "how I did it" that I
emailed to him. I don't know Tcl, this was just about getting the
compile options correct and doing the proper sysadminning to make
things work.
Comments, sugge
Gilles DAROLD writes:
> With Apache/mod_perl it is very simple to enable DB connection
> persistance.
>
> in your perl script :
>
> use vars qw($dbh);
>
> $dbh ||= DBI::connect($datasrc, $dbuser, $dbpwd);
Even better, Apache::DBI will pool across Perl programs, and you don't
have to change any
Steve Leibel writes:
> I'm converting a mysql database to postgres. Is there an equivalent
> for the enum data type?
No, but you can put the enum data in a separate table and join
them. This also makes the operation of adding entries to the enum list
better defined.
Dan
Rajit Singh writes:
> The thing is, I also want to be able to update the timestamp field
> if I want to...
Here's my solution:
CREATE FUNCTION updated_stamp () RETURNS OPAQUE AS
'BEGIN
IF NEW.updated ISNULL THEN
NEW.updated := ''now'';
END IF;
RETURN N
Raymond Chui writes:
> I am wonder why most of people choose MySQL in Linux
> world rather than PostgreSQL?
I normally stay out of the advocacy wars, but as a recent convert I
figure I'll pipe up.
I switched to PostgreSQL as the back-end to my services at
http://www.flutterby.com/ from MySQL whe