Michael Sims wrote:
>>o Changing database structure is harder. With PG, I usually found it
>> easier to dump, edit, then reload the database to make changes I did
>> in MySQL with ALTER TABLE.
>
> True, changing schema is a major PITA with Postgres. My only real
> complaint about it, in fact
At 07:59 AM 12/30/02 -0600, Michael Sims wrote:
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote:
>, or the types SET and ENUM.
I'm not sure what SET is, never used it,
Color set( 'red', 'green', 'blue' ) can contain only the following
values:
NULL;'blue'; 'green'; 'green,blue';
'
> Either you're confused or I'm confused :)
It's me. This just hasn't been a good week for me. :p
One time I'll get it right!
> mysql_tablename() is used in conjunction with mysql_list_tables() to get the
> names of the tables defined in the specified database. It cannot "get the
> table name
On Monday 30 December 2002 21:57, Chris Boget wrote:
> > >o Pg doesn't have DATE_FORMAT()
> >
> > to_char() accomplishes the same thing, for example:
> > select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
> > from users;
>
> Unless I missed something, that function doesn't work with
> To convert TO a unix timestamp:
> To convert FROM a unix timestamp:
Excellent. Thank you very much for the info!
> And there is the major benefit of using Postgres...
Why do you think I decided to move to Postgres? :P
> not to mention sub-selects, views, unions, etc.
Indeed. And I'm goin
On Monday 30 December 2002 21:33, Chris Boget wrote:
> Due to writing this email *way* too early in the morning, I got
> everything mixed up and didn't say what I meant. The below
> is what I really meant.
>
> > Not sure what you're getting at here. Surely for any particular
> > query, _you_ would
On Mon, 30 Dec 2002 07:57:04 -0600, you wrote:
>> >o Pg doesn't have DATE_FORMAT()
>> to_char() accomplishes the same thing, for example:
>> select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
>> from users;
>
>Unless I missed something, that function doesn't work with unix timestam
> >o Pg doesn't have DATE_FORMAT()
> to_char() accomplishes the same thing, for example:
> select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
> from users;
Unless I missed something, that function doesn't work with unix timestamps.
Is there anythin internal to PG that allows you to
On Mon, 30 Dec 2002 04:11:02 -0700, you wrote:
>The things that bothered me the most:
>
>o Pg doesn't have DATE_FORMAT()
to_char() accomplishes the same thing, for example:
select to_char(lastlogin, 'FMMM-DD- FMHH:MI AM') as lastloginf
from users;
>, or the types SET and ENUM.
I'm not sure
Due to writing this email *way* too early in the morning, I got
everything mixed up and didn't say what I meant. The below
is what I really meant.
> Not sure what you're getting at here. Surely for any particular
> query, _you_ would know what table(s) is/are being used?
That's not necessarily
> Sorry, you've lost me. In your OP you say you wanted the
> "table name", but now you're talking about the "dbname"?
> For dbname, you can use (oddly enough) pg_dbname().
Eeep, I'm ever so sorry. That's what I get for responding
at 4:30a when trying to battle insomnia.
Yes, I am looking for th
On Monday 30 December 2002 19:11, Rick Widmer wrote:
> At 06:20 PM 12/30/02 +0800, Jason Wong wrote:
> >On Monday 30 December 2002 18:13, Boget, Chris wrote:
> > > I'm switching from a MySQL environment to PGSQL and I'm
> > > going through and trying to learn the differences between the
> > > two.
At 04:41 AM 12/30/02 -0600, Boget, Chris wrote:
You can do this in mysql. I just don't know
why you can't do this in pgsql.
The basic answer to why the interfaces to the databases differ is because
the PHP interfaces reflects the C interface provided by the database
authors. Most PHP extension
At 06:20 PM 12/30/02 +0800, Jason Wong wrote:
On Monday 30 December 2002 18:13, Boget, Chris wrote:
> I'm switching from a MySQL environment to PGSQL and I'm
> going through and trying to learn the differences between the
> two.
The things that bothered me the most:
o Pg doesn't have DATE_FOR
On Monday 30 December 2002 18:41, Boget, Chris wrote:
> > > * For PGSQL, you can get the database name, the field name
> > > even the *host name* but you can't get the table name from a
> > > particular query?
> >
> > Not sure what you're getting at here. Surely for any particular
> > query, _you_
> pg_result_seek() should perform a similar function. In most cases
> you wouldn't need to use that because if you're going to be using
> the results more than once you could store them in an array.
Sometimes yes, sometimes no. But a valid point nonetheless.
> > * For PGSQL, you can get the da
On Monday 30 December 2002 18:13, Boget, Chris wrote:
> I'm switching from a MySQL environment to PGSQL and I'm
> going through and trying to learn the differences between the
> two. I've come across some issues that I can't seem to find the
> answers to in the docs or on the web. I'm hoping some
The following is an example demonstrating how to set up a foreign key
constraint in PostgreSQL 7:
CREATE SEQUENCE school_id_seq;
CREATE TABLE school (
school_id INT NOT NULL PRIMARY KEY DEFAULT nextval('school_id_seq'),
school_name VARCHAR(80) NOT NULL
);
CREATE SEQUENCE student_id_seq;
CR
On Sun, 4 Mar 2001, Marcelo Pereira wrote:
> Hi, All.
>
> I have to build a web site and I was
> studying postgreSQL, but, whether I am
> quite wrong or this database does not
> support Foreign Key.
>
> Does anyone use postgreSQL and know
> how handle Foreign Keys ???
Yes, it supports Foreign Ke
19 matches
Mail list logo