postgresql system column errors

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ashish Mahabal

    #1

    postgresql system column errors


    Hello Hiroshi,

    When I try to use the column name xmin in one of my tables I get
    ERROR: column name "xmin" conflicts with a system column name

    You seem to have been affected by these errors in the past too. Had you
    found a solution?

    Anybody else have any solutions?

    Cheers,
    ashish

    Ashish Mahabal, Caltech Astronomy, Pasadena, CA 91125
    http://www.astro.caltech.edu/~aam aam@astro.calte ch.edu

    Colorless green ideas sleep furiously.

    ---------------------------(end of broadcast)---------------------------
    TIP 7: don't forget to increase your free space map settings

  • Mark Gibson

    #2
    Re: postgresql system column errors

    Ashish Mahabal wrote:
    [color=blue]
    >Hello Hiroshi,
    >
    >When I try to use the column name xmin in one of my tables I get
    >ERROR: column name "xmin" conflicts with a system column name
    >
    >You seem to have been affected by these errors in the past too. Had you
    >found a solution?
    >
    >Anybody else have any solutions?
    >
    >[/color]

    The only thing you can do is change your column name.

    The manual tells you about the system columns here:


    --
    Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk>
    Web Developer & Database Admin
    Cromwell Tools Ltd.
    Leicester, England.


    ---------------------------(end of broadcast)---------------------------
    TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

    Comment

    • Karam Chand

      #3
      PGSQL C API()

      Hello

      I have got an inhouse application which used to
      connect to MySQL using their C API, which is now being
      ported to PostGreSQL :)

      Is there any reference to PGSQL C API() in one page. I
      went thru the docs but they are divided into multiple
      HTMLs which is kinda difficult for me to take a
      printout.

      Any pointers.....?? ?

      Also in MySQL, the structure of resultset returned by
      MySQL goes thru lot of changes with version so there
      is always a possibilty of application crashing if we
      refer to wrong index.....does postgresql suffer from
      same problem...i have gone thru the api and having a
      simple knack of it but not much :)

      regards
      karam



      _______________ _______________ ____
      Do you Yahoo!?
      Yahoo! Finance: Get your refund fast by filing online.


      ---------------------------(end of broadcast)---------------------------
      TIP 7: don't forget to increase your free space map settings

      Comment

      • Tom Lane

        #4
        Re: PGSQL C API()

        Karam Chand <karam_chand03@ yahoo.com> writes:[color=blue]
        > Is there any reference to PGSQL C API() in one page.[/color]

        You probably want to read the libpq chapter.

        The first three or so sections cover everything you
        really need to know about.

        regards, tom lane

        ---------------------------(end of broadcast)---------------------------
        TIP 6: Have you searched our list archives?



        Comment

        • Martijn van Oosterhout

          #5
          Re: postgresql system column errors

          On Tue, Feb 17, 2004 at 11:15:13AM -0800, Ashish Mahabal wrote:[color=blue]
          >
          > Thanx Mark.
          >
          > Thats what I ended up doing. But it seems silly that the name space for
          > system columns and user columns are not separate. Its just like saying
          > that you can not have the same column name in 2 different tables.
          >
          > Just like I can say table1.myCol and table2.myCol, there should have been
          > a way to say system.xmin and myTable.xmin, the default being myTable.xmin
          > when I am doing stuff with myTable. Whereever xmin gets used currently,
          > the source could explicitely say system.xmin. Anyway. hope that is done in
          > some future version.[/color]

          I think you're missing something. Every table has the xmin, xmax, cmin, cmax
          and sometimes oid columns. They're not only in the system tables. These
          columns are what makes transactions work and they exist for every record.

          I hope you're not suggesting a move to myTable.system. xmin ?

          Pick a table and do: select xmin,xmax,cmin, cmax from <table>

          What you're asking is to have the same column name twice in a single table,
          which is obviously silly.
          --
          Martijn van Oosterhout <kleptog@svana. org> http://svana.org/kleptog/[color=blue]
          > If the Catholic church can survive the printing press, science fiction
          > will certainly weather the advent of bookwarez.
          > http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow[/color]

          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.0.6 (GNU/Linux)
          Comment: For info see http://www.gnupg.org

          iD8DBQFANo7GY5T wig3Ge+YRAtQLAK DJ8HEl3jV7pRv7x WrhKm0g2Fgk7gCg sK41
          7kBPjrUUcFa0OX1 GsIxOH/8=
          =xI6K
          -----END PGP SIGNATURE-----

          Comment

          Working...